From fd413a316856dd5d5cd6aa815da07191595c83fb Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Thu, 30 Apr 2015 15:53:36 +0200 Subject: [PATCH] Imported Upstream version 2.7.3 --- AUTHORS | 4 + ChangeLog | 1120 ++++++++++++++++++++ INSTALL | 12 +- INSTALL.nut | 4 +- Makefile.am | 34 +- Makefile.in | 364 ++++--- NEWS | 70 ++ UPGRADING | 24 + aclocal.m4 | 885 ++++++++++------ clients/Makefile.in | 387 ++++--- clients/upsclient.c | 17 +- clients/upslog.c | 9 + common/Makefile.in | 253 +++-- common/common.c | 29 +- conf/Makefile.am | 2 +- conf/Makefile.in | 126 ++- conf/ups.conf.sample | 15 + conf/upsmon.conf.sample | 377 ------- conf/upsmon.conf.sample.in | 7 +- config.guess | 346 +++--- config.sub | 113 +- configure | 1068 ++++++++++++++----- configure.ac | 88 +- data/Makefile.in | 277 ++--- data/cmdvartab | 11 + data/driver.list.in | 79 +- data/html/Makefile.in | 114 +- depcomp | 457 ++++---- docs/FAQ.txt | 185 +++- docs/Makefile.am | 9 +- docs/Makefile.in | 270 ++--- docs/cables.txt | 65 +- docs/chunked.xsl | 5 - docs/common.xsl | 18 + docs/config-notes.txt | 6 +- docs/configure.txt | 10 +- docs/developers.txt | 80 +- docs/docinfo.xml | 10 - docs/docinfo.xml.in | 23 + docs/documentation.txt | 10 +- docs/download.txt | 9 +- docs/features.txt | 2 +- docs/history.txt | 2 +- docs/images/cables/mge-usb-rj45.jpg | Bin 0 -> 13921 bytes docs/man/Makefile.am | 58 +- docs/man/Makefile.in | 183 +++- docs/man/al175.8 | 15 +- docs/man/apcsmart-old.8 | 8 +- docs/man/apcsmart.8 | 78 +- docs/man/apcsmart.txt | 80 +- docs/man/apcupsd-ups.8 | 8 +- docs/man/asciidoc.conf | 4 + docs/man/asem.8 | 87 ++ docs/man/asem.txt | 83 ++ docs/man/bcmxcp.8 | 16 +- docs/man/bcmxcp_usb.8 | 8 +- docs/man/belkin.8 | 8 +- docs/man/belkinunv.8 | 8 +- docs/man/bestfcom.8 | 8 +- docs/man/bestfortress.8 | 8 +- docs/man/bestuferrups.8 | 8 +- docs/man/bestups.8 | 8 +- docs/man/blazer_ser.8 | 8 +- docs/man/blazer_usb.8 | 11 +- docs/man/clone.8 | 8 +- docs/man/dummy-ups.8 | 16 +- docs/man/dummy-ups.txt | 14 +- docs/man/etapro.8 | 8 +- docs/man/everups.8 | 8 +- docs/man/gamatronic.8 | 8 +- docs/man/genericups.8 | 8 +- docs/man/hosts.conf.5 | 8 +- docs/man/isbmex.8 | 8 +- docs/man/ivtscd.8 | 8 +- docs/man/libnutclient.3 | 8 +- docs/man/libnutclient_commands.3 | 8 +- docs/man/libnutclient_devices.3 | 8 +- docs/man/libnutclient_general.3 | 8 +- docs/man/libnutclient_misc.3 | 8 +- docs/man/libnutclient_tcp.3 | 8 +- docs/man/libnutclient_variables.3 | 8 +- docs/man/libupsclient-config.1 | 8 +- docs/man/liebert-esp2.8 | 8 +- docs/man/liebert.8 | 8 +- docs/man/macosx-ups.8 | 8 +- docs/man/masterguard.8 | 8 +- docs/man/metasys.8 | 8 +- docs/man/mge-shut.8 | 8 +- docs/man/mge-utalk.8 | 8 +- docs/man/microdowell.8 | 8 +- docs/man/netxml-ups.8 | 8 +- docs/man/nut-ipmipsu.8 | 11 +- docs/man/nut-recorder.8 | 8 +- docs/man/nut-scanner.8 | 25 +- docs/man/nut-scanner.txt | 4 +- docs/man/nut.conf.5 | 10 +- docs/man/nut.conf.txt | 2 +- docs/man/nutdrv_atcl_usb.8 | 8 +- docs/man/nutdrv_qx.8 | 142 ++- docs/man/nutdrv_qx.txt | 72 +- docs/man/nutscan.3 | 16 +- docs/man/nutscan_add_device_to_device.3 | 8 +- docs/man/nutscan_add_option_to_device.3 | 8 +- docs/man/nutscan_cidr_to_ip.3 | 8 +- docs/man/nutscan_display_parsable.3 | 8 +- docs/man/nutscan_display_ups_conf.3 | 8 +- docs/man/nutscan_free_device.3 | 8 +- docs/man/nutscan_get_serial_ports_list.3 | 8 +- docs/man/nutscan_init.3 | 8 +- docs/man/nutscan_new_device.3 | 8 +- docs/man/nutscan_scan_avahi.3 | 8 +- docs/man/nutscan_scan_eaton_serial.3 | 8 +- docs/man/nutscan_scan_ipmi.3 | 8 +- docs/man/nutscan_scan_nut.3 | 8 +- docs/man/nutscan_scan_snmp.3 | 8 +- docs/man/nutscan_scan_usb.3 | 8 +- docs/man/nutscan_scan_xml_http.3 | 8 +- docs/man/nutupsdrv.8 | 8 +- docs/man/oneac.8 | 8 +- docs/man/optiups.8 | 8 +- docs/man/powercom.8 | 8 +- docs/man/powerman-pdu.8 | 8 +- docs/man/powerpanel.8 | 8 +- docs/man/rhino.8 | 8 +- docs/man/richcomm_usb.8 | 8 +- docs/man/riello_ser.8 | 8 +- docs/man/riello_usb.8 | 8 +- docs/man/safenet.8 | 8 +- docs/man/snmp-ups.8 | 8 +- docs/man/solis.8 | 37 +- docs/man/solis.txt | 14 +- docs/man/tripplite.8 | 8 +- docs/man/tripplite_usb.8 | 14 +- docs/man/tripplite_usb.txt | 9 + docs/man/tripplitesu.8 | 8 +- docs/man/ups.conf.5 | 36 +- docs/man/ups.conf.txt | 31 + docs/man/upsc.8 | 8 +- docs/man/upscli_add_host_cert.3 | 8 +- docs/man/upscli_cleanup.3 | 8 +- docs/man/upscli_connect.3 | 8 +- docs/man/upscli_disconnect.3 | 8 +- docs/man/upscli_fd.3 | 8 +- docs/man/upscli_get.3 | 39 +- docs/man/upscli_get.txt | 18 +- docs/man/upscli_init.3 | 8 +- docs/man/upscli_list_next.3 | 12 +- docs/man/upscli_list_next.txt | 4 +- docs/man/upscli_list_start.3 | 15 +- docs/man/upscli_list_start.txt | 5 +- docs/man/upscli_readline.3 | 8 +- docs/man/upscli_sendline.3 | 8 +- docs/man/upscli_splitaddr.3 | 8 +- docs/man/upscli_splitname.3 | 8 +- docs/man/upscli_ssl.3 | 8 +- docs/man/upscli_strerror.3 | 8 +- docs/man/upscli_upserror.3 | 8 +- docs/man/upsclient.3 | 8 +- docs/man/upscmd.8 | 8 +- docs/man/upscode2.8 | 8 +- docs/man/upsd.8 | 8 +- docs/man/upsd.conf.5 | 11 +- docs/man/upsd.users.5 | 8 +- docs/man/upsdrvctl.8 | 8 +- docs/man/upsimage.cgi.8 | 8 +- docs/man/upslog.8 | 13 +- docs/man/upslog.txt | 12 +- docs/man/upsmon.8 | 12 +- docs/man/upsmon.conf.5 | 12 +- docs/man/upsmon.conf.txt | 5 +- docs/man/upsrw.8 | 8 +- docs/man/upssched.8 | 8 +- docs/man/upssched.conf.5 | 8 +- docs/man/upsset.cgi.8 | 8 +- docs/man/upsset.conf.5 | 8 +- docs/man/upsstats.cgi.8 | 8 +- docs/man/upsstats.html.5 | 8 +- docs/man/usbhid-ups.8 | 36 +- docs/man/usbhid-ups.txt | 13 +- docs/man/victronups.8 | 8 +- docs/new-drivers.txt | 30 +- docs/nut-names.txt | 97 +- docs/nut-qa.txt | 5 +- docs/nutdrv_qx-subdrivers.txt | 97 +- docs/packager-guide.txt | 2 +- docs/scheduling.txt | 2 +- docs/security.txt | 119 ++- docs/xhtml.xsl | 5 - drivers/Makefile.am | 21 +- drivers/Makefile.in | 901 ++++++++++------ drivers/apc-hid.c | 2 + drivers/apcsmart.c | 17 +- drivers/apcsmart.h | 2 +- drivers/asem.c | 373 +++++++ drivers/bcmxcp.c | 915 +++++++++++++--- drivers/bcmxcp.h | 30 + drivers/belkin-hid.c | 28 +- drivers/blazer_usb.c | 9 +- drivers/compaq-mib.c | 8 +- drivers/cps-hid.c | 53 +- drivers/dstate.c | 27 +- drivers/dstate.h | 4 + drivers/eaton-mib.c | 78 +- drivers/genericups.c | 38 + drivers/libhid.c | 10 +- drivers/libhid.h | 3 + drivers/libusb.c | 59 +- drivers/liebert-hid.c | 9 +- drivers/main.c | 27 +- drivers/mge-hid.c | 251 ++++- drivers/netvision-mib.c | 13 +- drivers/nutdrv_qx.c | 504 +++++++-- drivers/nutdrv_qx.h | 20 +- drivers/nutdrv_qx_bestups.c | 705 ++++++++++++ drivers/nutdrv_qx_bestups.h | 29 + drivers/nutdrv_qx_blazer-common.c | 61 +- drivers/nutdrv_qx_blazer-common.h | 2 + drivers/nutdrv_qx_mecer.c | 105 +- drivers/nutdrv_qx_megatec-old.c | 99 +- drivers/nutdrv_qx_megatec.c | 99 +- drivers/nutdrv_qx_mustek.c | 99 +- drivers/nutdrv_qx_q1.c | 89 +- drivers/nutdrv_qx_voltronic-qs-hex.c | 415 ++++++++ drivers/nutdrv_qx_voltronic-qs-hex.h | 29 + drivers/nutdrv_qx_voltronic-qs.c | 90 +- drivers/nutdrv_qx_voltronic.c | 783 +++++++------- drivers/nutdrv_qx_zinto.c | 99 +- drivers/openups-hid.c | 48 +- drivers/openups-hid.h | 7 +- drivers/powercom-hid.c | 205 +++- drivers/powercom.c | 34 +- drivers/powerware-mib.c | 28 +- drivers/riello_ser.c | 351 +++--- drivers/riello_usb.c | 455 ++++---- drivers/solis.c | 32 +- drivers/solis.h | 2 +- drivers/tripplite_usb.c | 254 ++++- drivers/usb-common.h | 2 + drivers/usbhid-ups.c | 41 +- include/Makefile.in | 182 ++-- include/common.h | 2 + include/config.h.in | 26 +- install-sh | 14 +- lib/Makefile.in | 117 +- ltmain.sh | 4 +- m4/libtool.m4 | 12 +- m4/nut_check_asciidoc.m4 | 21 +- missing | 412 +++---- scripts/Aix/nut-aix.spec.in | 330 ++++++ scripts/Makefile.in | 271 ++--- scripts/Solaris/Makefile.in | 114 +- scripts/augeas/Makefile.in | 109 +- scripts/augeas/nutupsconf.aug.in | 9 + scripts/devd/Makefile.in | 114 +- scripts/devd/nut-usb.conf.in | 233 ++-- scripts/hotplug/Makefile.in | 115 +- scripts/hotplug/libhid.usermap | 16 +- scripts/python/Makefile.am | 1 + scripts/python/Makefile.in | 111 +- scripts/python/app/NUT-Monitor | 41 +- scripts/python/app/gui-1.3.glade | 2 +- scripts/python/app/nut-monitor.appdata.xml | 42 + scripts/python/module/PyNUT.py | 37 +- scripts/subdriver/gen-snmp-subdriver.sh | 13 +- scripts/systemd/Makefile.in | 110 +- scripts/systemd/nut-server.service.in | 5 +- scripts/udev/Makefile.am | 10 +- scripts/udev/Makefile.in | 125 ++- scripts/udev/README | 4 +- scripts/udev/nut-usbups.rules.in | 16 +- scripts/upower/95-upower-hid.rules | 7 +- server/Makefile.in | 243 +++-- server/upsd.c | 6 +- test-driver | 139 +++ tests/Makefile.in | 704 +++++++++--- tools/Makefile.am | 3 +- tools/Makefile.in | 260 +++-- tools/nut-ddl-dump.sh | 53 + tools/nut-scanner/Makefile.am | 6 +- tools/nut-scanner/Makefile.in | 454 +++++--- tools/nut-scanner/nutscan-snmp.h | 18 +- tools/nut-scanner/nutscan-usb.h | 7 +- tools/nut-usbinfo.pl | 10 +- 283 files changed, 14978 insertions(+), 6511 deletions(-) delete mode 100644 conf/upsmon.conf.sample delete mode 100644 docs/docinfo.xml create mode 100644 docs/docinfo.xml.in create mode 100644 docs/images/cables/mge-usb-rj45.jpg create mode 100644 docs/man/asem.8 create mode 100644 docs/man/asem.txt create mode 100644 drivers/asem.c create mode 100644 drivers/nutdrv_qx_bestups.c create mode 100644 drivers/nutdrv_qx_bestups.h create mode 100644 drivers/nutdrv_qx_voltronic-qs-hex.c create mode 100644 drivers/nutdrv_qx_voltronic-qs-hex.h create mode 100644 scripts/Aix/nut-aix.spec.in create mode 100644 scripts/python/app/nut-monitor.appdata.xml create mode 100755 test-driver create mode 100755 tools/nut-ddl-dump.sh diff --git a/AUTHORS b/AUTHORS index 320efbe..c179b0c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -170,3 +170,7 @@ D: pwmib support for snmp-ups N: Kjell Claesson E: Kjell.claesson@epost.tidanet.se D: Author of bcmxcp driver, 3-phase work. + +N: Giuseppe Corbelli +E: giuseppe.corbelli@copanitalia.com +D: Author of asem driver diff --git a/ChangeLog b/ChangeLog index 1710194..96dc998 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,1051 @@ +2015-04-22 Arnaud Quette + + * configure.ac: Restore version 2.7.3 for release + * docs/security.txt: Missing link reference update The filename of + the previous GPG release key was not updated, leading to pointing + to the current release key + +2015-04-08 Nick Mayerhofer + + * docs/nutdrv_qx-subdrivers.txt, drivers/nutdrv_qx.c, + drivers/nutdrv_qx.h: nutdrv_qx: clarify docs/inline comments + +2015-04-16 Arnaud Quette + + * configure.ac: bump version to 2.7.3.1 + +2015-04-15 Arnaud Quette + + * configure.ac: update version to 2.7.3 + * docs/security.txt: Update release signature verification The + release manager key has change. Update the documentation to reflect + it, along with keeping necessary for checking the previous releases + * docs/download.txt: Fix formatting issue + * NEWS, UPGRADING: Final update for release 2.7.3 Complete the + release information for NUT 2.7.3 + * docs/maintainer-guide.txt: Store some comments for latter + processing + +2015-04-10 Arnaud Quette + + * drivers/mge-hid.c: Improve Eaton ABM support for USB/HID units As + per clarifications from David G. Miller (Eaton ABM expert) and + customers request, when ABM is enabled, we now both publish the + following as per the ABM information: - the 5 status bits + {charging, discharging, floating, resting, off} under + battery.charger.status - the 2 historical status bits {CHRG, + DISCHRG} under ups.status When ABM is disabled, we just publish the + 2 historical status bits {CHRG, DISCHRG} under ups.status, as per + UPS.PowerSummary.PresentStatus.{Charging,Discharging}, as done + previously + +2015-04-02 Arnaud Quette + + * conf/ups.conf.sample, docs/man/ups.conf.txt, drivers/dstate.c, + drivers/dstate.h, drivers/main.c: Improve synchronous driver flag + implementation The previous commit was suffering a number of + issues. The present commit fixes these, along with adding more + documentation and a better and more understandable implementation + code. Thanks to Daniele Pezzini for the thorough review Closes: + https://github.com/networkupstools/nut/issues/197 + +2015-04-01 Arnaud Quette + + * docs/man/ups.conf.txt, drivers/dstate.c, drivers/dstate.h, + drivers/main.c: Implement synchronous driver flag As per issue + #197, NUT drivers work by default in asynchronous mode. This means + that all data are pushed by the driver on the communication socket + to upsd (Unix socket on Unix, Named pipe on Windows) without + waiting for these data to be actually consumed. With some HW, such + as ePDUs, that can produce a lot of data, asynchronous mode may + cause some congestion, resulting in the socket to be full, and the + driver to appear as not connected. By enabling the 'synchronous' + flag, the driver will wait for data to be consumed by upsd, prior + to publishing more. This can be enabled either globally or per + driver. + +2015-04-07 Arnaud Quette + + * scripts/systemd/nut-server.service.in: Do not Require systemd nut- + driver for nut-server Put the Requires=nut-driver.service in + comment for nut-server systemd unit file. Thus we don't require + drivers to be successfully started! This was a change of behavior + compared to init SysV, and could prevent from accessing + successfully started drivers, or at least to audit a system + Closes: https://github.com/networkupstools/nut/issues/200 + +2015-04-04 Charles Lepple + + * UPGRADING: UPGRADING: mention SSL permissions (#199) + * docs/security.txt: NSS SSL documentation Addresses new behavior as + part of the NSS forking fix (#199). Formatting and wording fixed as + well. + +2015-04-04 Émilien Kia + + * server/upsd.c: Initialize SSL after deamonize and downgrade to + user. Fix issue #190 - upsd: NSS SSL only working in debug mode + https://github.com/networkupstools/nut/issues/190 + +2015-04-02 Arnaud Quette + + * drivers/eaton-mib.c: Better input.realpower handling for Eaton + ePDUs G2/G3 Improve the way we declare and process + input.realpower, in order to address the variations between Eaton + ePDUs G2 and G3 + +2015-03-19 Arnaud Quette + + * docs/nut-names.txt: Document new variables and commands addition + The variables and commands that were added were not described in + the NUT namespace document. These are: input.transfer.delay - + battery.energysave.load - battery.energysave.delay - + battery.charger.status - outlet.1.shutdown.return - + outlet.2.shutdown.return + * drivers/bcmxcp.c: Fix the letter case of ABM and outlets status + For more coherence with NUT status publication, these status are + now lower case + * drivers/bcmxcp.c: Add missing Author + +2014-10-10 gavrilov-i + + * data/cmdvartab, drivers/bcmxcp.c, drivers/bcmxcp.h: drivers/bcmxcp: + advanced features Closes: #158 Added setvar function exec result + parsing Add command to turn load on after shutdown.stayoff and + shutdown.return. Outlet control changed. Outlet control via + commands "outlet.n.load.on/off" like in other drivers. Variable + outlet.n.staus now only for reading. Some code changes in + outlet.n.shutdown.return command - now supporting more than 3 + outlets (up to 9). Add descriptions to new and some old variables + and commands. Add "bypass.start" command, for enabling bypass. For + returning in On-Line mode exec "load.on" command. Additional + checks of UPS vars. Now add zero var only if it could be changed. + +2015-04-01 Arnaud Quette + + * drivers/eaton-mib.c: Workaround input.{power,realpower} for Eaton + ePDUs Add variable declarations to handle missing + input.{power,realpower} on Eaton ePDUs G2 and G3 1phase. On 3phase, + these variables point at SNMP OIDs that sum up the 3 phases + information. These OIDs should also be present on 1phase, however + it's actually not the case. So simply duplicate the L1 declaration + +2015-03-31 Arnaud Quette + + * drivers/powerware-mib.c: Implement battery.charger.status for Eaton + SNMP This new official variable now replaces the historic + 'vendor.specific.abmstatus', as per other similar implementations + (in usbhid-ups and bcmxcp drivers) + +2015-03-27 Arnaud Quette + + * drivers/mge-hid.c: Implement Eaton ABM support for USB/HID units + Add support for Eaton Advanced Battery Monitoring, for USB/HID + units. Information are provided through the new + battery.charger.status. For now, at least, when ABM is enabled, the + historic CHRG and DISCHRG flags are not published anymore in + ups.status + +2015-03-25 Daniele Pezzini + + * drivers/nutdrv_qx_voltronic.c: nutdrv_qx: add support in + 'voltronic' subdriver for P13 protocol + +2015-03-24 Arnaud Quette + + * drivers/mge-hid.c: Complementary Energy Saving data for Eaton USB + devices Add a 2nd HID path for battery.energysave.delay. Depending + on the exact device model, different implementations may be used + +2015-03-22 Daniele Pezzini + + * NEWS: nutdrv_qx: update NEWS about new 'fuji' USB subdriver + +2015-03-21 Daniele Pezzini + + * drivers/nutdrv_qx.c, drivers/nutdrv_qx.h: nutdrv_qx: typedef + testing_t only if TESTING is #defined First reported by GitHub + user @nickma82 + * docs/man/nutdrv_qx.txt, docs/nutdrv_qx-subdrivers.txt: nutdrv_qx: + document 'voltronic-qs-hex' subdriver in man pages + * docs/man/nutdrv_qx.txt, drivers/nutdrv_qx_bestups.c, drivers + /nutdrv_qx_blazer-common.c, drivers/nutdrv_qx_blazer-common.h, + drivers/nutdrv_qx_mecer.c, drivers/nutdrv_qx_megatec-old.c, + drivers/nutdrv_qx_megatec.c, drivers/nutdrv_qx_mustek.c, + drivers/nutdrv_qx_q1.c, drivers/nutdrv_qx_voltronic-qs-hex.c, + drivers/nutdrv_qx_voltronic-qs.c, drivers/nutdrv_qx_zinto.c: + nutdrv_qx: add 'ignoresab' flag to support bogus devices Some + UPSes incorrectly report the 'Shutdown Active' bit (7th bit of the + 'status byte') as always on (=1), consequently making the driver + believe the UPS is nearing a shutdown (and, as a result, ups.status + always contains FSD). To workaround this issue, add a new + 'ignoresab' flag that makes the driver do just what its name tells + (IGNORE Status Active Bit) skipping the relative item in qx2nut + tables. References: - http://lists.alioth.debian.org/pipermail + /nut-upsdev/2015-March/006896.html - + https://github.com/networkupstools/nut/issues/195 + +2015-03-11 Arnaud Quette + + * data/cmdvartab, docs/nut-names.txt: Add some new variable names, + related to ePDUs Add new variables names, related to ePDUs, such + as input.*.load, input.*.realpower and input.*.power + * drivers/eaton-mib.c: Minor update to comments + +2015-02-04 Arnaud Quette + + * drivers/eaton-mib.c: Fix outlet.{power,realpower} data mapping + According to the new mapping using the input collection, these two + data mapping were targeting at the wrong OIDs. + +2015-02-03 Arnaud Quette + + * drivers/eaton-mib.c: Fix and complete a bit Eaton ePDUs support + Add some new data mapping to improve support for Eaton ePDUs. This + commit includes some new NUT data names that requires approval + before being merged + +2015-03-19 Arnaud Quette + + * data/cmdvartab, docs/nut-names.txt, drivers/mge-hid.c: Add more + Energy Saving features for Eaton USB devices Add two new Energy + Saving features: - battery.energysave.delay: to configure the delay + before switching off the UPS if running on battery and load level + low (in minutes) - battery.energysave.realpower: to switch off the + UPS if running on battery and power consumption on UPS output is + lower than this value (expressed in Watts). Note that documentation + in nut-names.txt and cmdvartab was limited to difference with an + upcoming branch merge, that will add the others + * drivers/mge-hid.c: Align Energy Saving variable names Change + ups.load.energysave to battery.energysave.load, to be coherent with + the latest commit made in the bcmxcp driver + +2015-03-10 Arnaud Quette + + * data/cmdvartab, drivers/mge-hid.c: Add a new EnergySaving threshold + for Eaton UPSs Add 'ups.load.energysave' parameter, to enable + energy saving when the power consumption on the UPS output drops + below this value (in percent). This new variable however requires + to go through the NUT RFC process to get approved + +2015-03-19 Arnaud Quette + + * tools/Makefile.am: Also distribute nut-ddl-dump.sh helper script + +2015-03-18 Daniele Pezzini + + * data/driver.list.in: HCL: EUROCASE EA200N 2000VA supported by + nutdrv_qx Protocol: 'megatec' USB subdriver: 'fuji' Reference: ht + tp://thread.gmane.org/gmane.comp.monitoring.nut.user/8808/focus=908 + 1 + * drivers/nutdrv_qx_bestups.c, drivers/nutdrv_qx_blazer-common.c, + drivers/nutdrv_qx_mecer.c, drivers/nutdrv_qx_megatec-old.c, + drivers/nutdrv_qx_megatec.c, drivers/nutdrv_qx_mustek.c, + drivers/nutdrv_qx_q1.c, drivers/nutdrv_qx_voltronic-qs-hex.c, + drivers/nutdrv_qx_voltronic-qs.c, drivers/nutdrv_qx_zinto.c: + nutdrv_qx: remove redundancy in blazer-common-dependent subdrivers + Since main nutdrv_qx driver already sets an alarm when FSD arises + (see nutdrv_qx.c>ups_alarm_set()), there is no need to do so in the + various subdrivers. So, in order to prevent a duplicated alarm + message, remove all unneeded code from the affected subdrivers (all + the ones that depend on nutdrv_qx_blazer-common). + +2015-03-17 Daniele Pezzini + + * data/driver.list.in: HCL: update Mecer ME-1000-WTU (supported by + nutdrv_qx) Tested by @sliverc (Oliver Sauder) on NUT 2.7.1 + Reference: https://github.com/networkupstools/nut/issues/148 + +2015-03-16 Daniele Pezzini + + * docs/man/nutdrv_qx.txt: nutdrv_qx: document USB subdrivers' + glitches + * drivers/nutdrv_qx.c: nutdrv_qx: add workaround in 'fuji' subdriver + to support all shutdown.returns As 'fuji' subdriver discards all + the commands of more than 3 characters, in order to support 'SnRm' + shutdown.returns (and hence the standard 'S.5R0003' shutdown.return + with DEFAULT_{ON,OFF}DELAYs) map 'SnRm' shutdown.returns to the + corresponding 'Sn' commands, meanwhile ignoring ups.delay.start and + making the UPS turn on the load as soon as power is back. + * drivers/nutdrv_qx.c: nutdrv_qx: fix command handling in 'fuji' + subdriver 'fuji' subdriver supported devices only allow one 8 + bytes interrupt as a command/query: make the subdriver discard (and + echo back) all the too long commands. + +2014-11-08 Daniele Pezzini + + * docs/man/nutdrv_qx.txt: nutdrv_qx: update man for the new 'fabula' + and 'fuji' USB subdrivers + +2014-06-26 Daniele Pezzini + + * drivers/nutdrv_qx.c: nutdrv_qx: add new 'fuji' USB subdriver Add a + new USB subdriver ('fuji') to support models manufactured by Fuji + (and others) and accompained by UPSmart2000I software. + +2015-03-15 Charles Lepple + + * docs/developers.txt, docs/new-drivers.txt: doc: document build + dependencies, etc. Closes: + https://github.com/networkupstools/nut/issues/189 + * docs/nutdrv_qx-subdrivers.txt: doc: fold a few long preformatted + lines in nutdrv_qx developer guide + * docs/FAQ.txt: docs: FAQ update This addresses several issues: * + https://github.com/networkupstools/nut/issues/19 * + https://github.com/networkupstools/nut/issues/191 and Closes: + https://github.com/networkupstools/nut/issues/161 + * docs/man/Makefile.am: docs/man: provide additional detail for + missing asciidoc/a2x error + * configure.ac: configure: indicate required version of + Asciidoc/A2X/dblatex Still doesn't address data-only packages like + docbook-xsl, so leaving this issue open. Reference: + https://github.com/networkupstools/nut/issues/162 + * docs/Makefile.am, docs/man/Makefile.am: Pass --nonet to xsltproc + This prevents xsltproc from downloading DocBook XSL files for each + step in the documentation build process. Reference: + https://github.com/networkupstools/nut/issues/172 Still need to + document what to do if the build fails. + +2015-03-10 Arnaud Quette + + * docs/documentation.txt: Reference DDL on the Documentation page + Add a reference to the NUT Devices Dumps Library (DDL) on the + Documentation page, both for the website and the distributed + documentation. There are separate references, to distinguish the + DDL interest from a user and a developer point of view + +2015-03-06 Arnaud Quette + + * tools/nut-ddl-dump.sh: First stab at a helper script to generate + device dumps This preliminary version only generates .dev (static) + dump files. However, a merge with nut-recorder.sh, which generates + .seq files (dynamic simulation) is to be considered, along with an + improved version for the newer .nds format + +2015-02-24 Charles Lepple + + * data/driver.list.in: HCL: CPS Value 1500ELCD-RU @ 2.6.3 Source: + http://news.gmane.org/find- + root.php?message_id=1423241134.6830.8.camel%40ignatev + * data/driver.list.in: HCL: JAWAN JW-UPSLC02 with blazer_usb @ 2.7.2 + Source: http://news.gmane.org/find-root.php?message_id=SNT404%2dEAS + 8312A94DDAF0FAD4B7702BA52A0%40phx.gbl + +2015-02-22 Charles Lepple + + * scripts/python/app/NUT-Monitor, scripts/python/app/gui-1.3.glade: + NUT-Monitor: updated version to 1.3.1 + +2015-02-14 Charles Lepple + + * NEWS, UPGRADING: NEWS/UPGRADING for 2.7.3 + +2015-02-14 Daniele Pezzini + + * docs/man/nutdrv_qx.txt: nutdrv_qx: specify 'bestups' ranges in man + pages + +2015-01-03 Daniele Pezzini + + * drivers/nutdrv_qx_bestups.c: nutdrv_qx: bestups - add support for + 'M' query + +2014-11-02 Daniele Pezzini + + * docs/man/nutdrv_qx.txt, docs/nutdrv_qx-subdrivers.txt: nutdrv_qx: + update man pages for new 'bestups' subdriver + * drivers/Makefile.am, drivers/nutdrv_qx.c, + drivers/nutdrv_qx_bestups.c, drivers/nutdrv_qx_bestups.h: + nutdrv_qx: add BestUPS subdriver (protocol=bestups) A subdriver + using Best Power/Sola Australia protocol as described in + http://www.networkupstools.org/protocols/sola.html Based also on + bestups.c and meant to eventually replace it. + +2015-02-14 Michael Fincham + + * scripts/python/app/NUT-Monitor: Correct unsafe permissions on + ~/.nut-monitor (Debian #777706) fix-permissions-on-start.debdiff + from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777706#24 + Closes: https://github.com/networkupstools/nut/issues/185 + +2015-02-14 Michal Soltys + + * drivers/apcsmart.c: apcsmart: fix SEGV in apc_getcaps() ups ... + +2015-02-13 Michal Soltys + + * drivers/apcsmart.c, drivers/apcsmart.h: apcsmart: fix command set + parsing for protocol version 4 The issue was discovered with + Smart-UPS RT 10000 XL by surr, see + https://github.com/networkupstools/nut/issues/180 When protocol + version is 4, command set query returns string with additional + section after another '.' . This patch updates the code to handle + such string as well. + +2015-02-10 Charles Lepple + + * configure.ac: configure.ac: bump version to 2.7.2.6 for snapshots + * scripts/upower/95-upower-hid.rules: upower: regenerate for Powercom + PID 0001 (PR #121) + * configure.ac: configure.ac: add bug report URL Should be + compatible with Autoconf 2.59 and newer. + +2015-02-04 Arnaud Quette + + * drivers/netvision-mib.c: Improve support for on-battery detection + Add support for upsAlarmOnBattery OID, to better detect on-battery + events (reported by Henning Fehrmann) + * drivers/libhid.c, drivers/libhid.h: Fix compilation warning related + to sign comparison + +2015-01-31 Ryan Underwood + + * drivers/apc-hid.c, scripts/upower/95-upower-hid.rules: Add a + product ID for APC AP9584 USB kit. Resolves + networkupstools/nut#181 + +2015-01-12 Charles Lepple + + * scripts/upower/95-upower-hid.rules: upower: regenerate rules file + for OpenUPS PID 0xd005 + * Makefile.am: Add systemd unit dir fix for 'make distcheck' + +2015-01-11 Sergey Kvachonok + + * configure.ac: Undo ${systemdsystemunitdir} mangling. Running sed + 's/\/lib/\${libdir}/' destroys any ${systemdsystemunitdir} values + that don't start with '/lib' e.g. '/usr/lib64/systemd/system' + becomes '/usr/usr/lib6464/systemd/system'. If a local installation + prefix is needed use appropriately prefixed --with- + systemdsystemunitdir='' parameter instead. + +2015-01-02 Charles Lepple + + * docs/cables.txt, docs/config-notes.txt, docs/configure.txt, + docs/features.txt, docs/history.txt, docs/man/nutdrv_qx.txt, docs + /nut-names.txt, docs/scheduling.txt, docs/security.txt: docs: typo + fixes + +2015-01-01 Charles Lepple + + * docs/cables.txt: docs: MGE NMC pinout Closes + https://github.com/networkupstools/nut/issues/141 + * docs/cables.txt: docs: Best Power cable pinout Closes + https://github.com/networkupstools/nut/issues/164 + * INSTALL.nut: docs: clarify group ownership of directory in + INSTALL.nut Closes + https://github.com/networkupstools/nut/issues/151 + * docs/man/dummy-ups.txt: docs: dummy-ups repeater mode requires `@` + in port name Also reworded parts of the man page. + +2014-12-17 bsalvador + + * drivers/solis.c: Update solis.c to force ScanReceivePack() + +2014-12-12 Andy Juniper + + * clients/upslog.c, docs/man/upslog.txt: upslog: break out of sleep + on SIGUSR1 and log immediately Reference: http://news.gmane.org + /find-root.php?message_id=54863D44.3000902%40freeuk.com + +2014-11-25 Charles Lepple + + * data/driver.list.in: HCL: additional NHS models + +2014-11-17 Charles Lepple + + * data/driver.list.in: HCL: NHS Sistemas de Energia: Expert C + Isolador series Source: http://news.gmane.org/find-root.php?messag + e_id=CADe06rfE5MA%3dyWDZzofPsC7TOgGOU4TRSoi67uMXedymA9L7ow%40mail.g + mail.com + +2014-11-07 Arnaud Quette + + * scripts/subdriver/gen-snmp-subdriver.sh: Various minor fixes to the + SNMP subdriver generator + +2014-11-06 Charles Lepple + + * drivers/openups-hid.c: openups-hid: Fix scale factors for 0xd005 + (0.4) Previous commit had extra scale factors applied. + * drivers/openups-hid.c, drivers/openups-hid.h: openups-hid: voltage + scale factors based on product IDs + * drivers/openups-hid.c: openups-hid: remove a const; this will + require more thought The USB matching routines should have their + parameters marked as "const" to indicate that they do not modify + the matching tables, but that will require more invasive changes. + Roll this back for now. + +2014-11-05 Charles Lepple + + * drivers/openups-hid.c: openups-hid: const and float/double fixups + (0.2) + * drivers/openups-hid.c: openups-hid: add USB ProductID d005 for + OpenUPS2 + +2014-11-05 Arnaud Quette + + * Makefile.am: Store the git start point as a variable For + ChangeLog, we now store the git start point (older reference) in a + separate variable, to make the process more clear + +2014-10-31 Charles Lepple + + * docs/download.txt: Update VMware ESXi package link (from René + Garcia) + +2014-10-29 Charles Lepple + + * scripts/upower/95-upower-hid.rules: upower: Update Belkin and + Liebert rules Follow-up to issue #159. + * drivers/belkin-hid.c, drivers/liebert-hid.c: usbhid-ups: comments + describing Belkin/Liebert/Phoenixtec situation Follow-up to issue + #159. + * data/driver.list.in: HCL: Rucelf UPOII-3000-96-EL supported by + blazer_ser Manufacturer: + http://www.rucelf.ua/en/catalog/upoii-3000-96-el/ Closes: + https://github.com/networkupstools/nut/issues/165 + +2014-10-28 Elio Parisi + + * drivers/riello_usb.c: riello_usb: explicitly claim USB interface + Reference: http://news.gmane.org/find-root.php?message_id=7731ed2f9 + 8014b8a90e695a06d077970%40AM3PR07MB289.eurprd07.prod.outlook.com + and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=738122 + +2014-10-20 Elio Parisi + + * drivers/riello_usb.c: riello_usb: timeouts and error handling + (0.03) Small changes in riello_usb.c that solved some problem with + managing transmission errors between the Raspberry Pi and Riello + ups (thanks to Fredrik Öberg): introducing timeout in reading ups + data in cypress_command; enhanced handling error codes + http://news.gmane.org/find-root.php?message_id=f5294e5579574bcbaf5c + dd95523e0b68%40AM3PR07MB289.eurprd07.prod.outlook.com + * drivers/riello_ser.c: riello_ser: enhanced handling error codes + (0.03) + +2014-10-20 Charles Lepple + + * docs/.gitignore: docs: docinfo.xml is now auto-generated + +2014-10-20 Nik Soggia + + * drivers/Makefile.am: missing -lm in drivers/Makefile.am Both + bcmxcp and bcmxcp_usb use ldexp(), so both need `-lm`. + http://news.gmane.org/find- + root.php?message_id=544515BA.4060804%40niksoggia.it + +2014-10-10 Paul Chavent + + * drivers/belkin-hid.c: drivers : add Liebert GXT3 device. + * drivers/main.c: drivers : fix possible memory leak. In arguments + parsing, if user option is passed. + +2014-09-30 Michal Soltys + + * drivers/apcsmart.c: apcsmart: increase passes in setvar_enum() + Current 6 is not enough for bigger units - especially if we swap to + the value directly preceeding the current setting. + +2014-09-27 Daniele Pezzini + + * configure.ac, docs/Makefile.am, docs/docinfo.xml, + docs/docinfo.xml.in: docs: add NUT version number/date in PDF + documents Reference: + https://github.com/networkupstools/nut/issues/150 + * docs/chunked.xsl, docs/common.xsl, docs/xhtml.xsl: docs: move + DocBook options common to html stylesheets to common.xsl + * docs/Makefile.am, docs/common.xsl: docs: add NUT version + number/date into footer of HTML pages Reference: + https://github.com/networkupstools/nut/issues/150 + +2014-09-28 Arnaud Quette + + * docs/configure.txt: Clarify a bit more Avahi build requirements + * tools/nut-scanner/Makefile.am: Don't reference subdir-object with + $(top_srcdir) Replace references to objects in separate + directories that were using $(top_srcdir) by the expanded version + '../../'. The variable was otherwise part of the path, resulting in + build failures. This completes commit f8abb9b Closes + networkupstools/nut#155 + * configure.ac: Explicitly use subdir-objects in automake init + Closes networkupstools/nut#155 + +2014-09-27 Arnaud Quette + + * configure.ac, m4/nut_check_asciidoc.m4: Also check for source- + highlight at configure time source-highlight is used for + documentation generation. It's however optional, so we just check + for the sake of completion + +2014-09-27 Arnaud Quette + + * docs/man/Makefile.am, docs/man/asciidoc.conf: Add NUT version + number into footer of HTML man pages Override AsciiDoc default for + footer-txt to include NUT version number into footer of HTML man + pages. This commit addresses the 2nd point of + networkupstools/nut#150 + +2014-09-26 Charles Lepple + + * drivers/tripplite_usb.c: tripplite_usb: set input.voltage.nominal + back to 230V (0.30) Keeps the input.voltage and output.voltage + scaling from 0.28 Discussion: + http://article.gmane.org/gmane.comp.monitoring.nut.user/8719 + +2014-09-26 Arnaud Quette + + * conf/upsmon.conf.sample.in, docs/man/nut.conf.txt, + docs/man/upsmon.conf.txt, docs/packager-guide.txt: Replace outdated + references to shutdown.txt shutdown.txt was merged into config- + notes.txt during the AsciiDoc conversion of the whole documentation + and website. This content is now available in the docs/config- + notes.txt file, section [[UPS_shutdown]] "Configuring automatic + shutdowns for low battery events" + * conf/upsmon.conf.sample.in: Fix default value of POWERDOWNFLAG + POWERDOWNFLAG path changed from the hard-coded value /etc/killpower + to the build-time generated @CONFPATH@/killpower. This resulted in + an unexpected value '/etc/nut/killpower', at least on Debian. + (reported by Laurent Bigonville) Closes networkupstools/nut#74 + +2014-09-25 Daniele Pezzini + + * drivers/nutdrv_qx.c: nutdrv_qx: move to ltrim_m()/rtrim_m() + functions + * common/common.c, include/common.h: Add ltrim_m()/rtrim_m() + functions to trim several chars at the same time Also, make + ltrim() / rtrim() wrappers around ltrim_m() / rtrim_m(). + * common/common.c: Make ltrim() modify the input string Also, always + check string length in both ltrim() and rtrim(). Reference: + https://github.com/networkupstools/nut/issues/154 + +2014-09-25 Charles Lepple + + * data/driver.list.in: HCL: sort Tripp Lite models by name, then + increasing power I know this doesn't allow the cell merging code + to do as much, but this should make it easier to find models. + * data/driver.list.in: HCL: add Tripp Lite OMNIVSINT800 + (tripplite_usb) Source: + http://article.gmane.org/gmane.comp.monitoring.nut.user/8713 + * drivers/tripplite_usb.c: tripplite_usb: scale min/max voltages for + SMART protocol (0.29) Observed in a dump file from driver version + 0.11. Scale input.voltage.minimum and input.voltage.maximum the + same way as other voltages. + * drivers/tripplite_usb.c: tripplite_usb: fix voltage scaling for + 240V/1001 (0.28) Reported by Dave Williams: + http://article.gmane.org/gmane.comp.monitoring.nut.user/8713 The + input.voltage and output.voltage scaling for Protocol 1001 did not + factor in the input_voltage_scaled value. + +2014-09-24 Arnaud Quette + + * scripts/python/app/nut-monitor.appdata.xml: Fix compliance of NUT- + Monitor FreeDesktop AppData file Following the upstream update (by + David Goncalves), update the screenshots width and height to + conform to AppData specification: + http://people.freedesktop.org/~hughsient/appdata/ Closes + networkupstools/nut#127 + +2014-05-18 Charles Lepple + + * drivers/genericups.c: genericups: log cable type overrides as they + are parsed Fixes networkupstools/nut#28 Better than nothing, but + without a unit to test against, I don't want to make any more + intrusive changes. + +2014-09-17 Arnaud Quette + + * docs/nut-qa.txt: Minor update and completion Use the new Debian + package tracker URL and add Redhat / Fedora bug tracker + +2014-09-15 Daniele Pezzini + + * data/driver.list.in: HCL: add devices supported by nutdrv_qx - + Fideltronik LUPUS 500 USB Protocol: 'megatec' USB subdriver: + 'fabula' Reference: http://lists.alioth.debian.org/pipermail/nut- + upsuser/2014-June/009059.html - FTUPS FT-1000BS(T) / Voltronic + Power Apex 1KVA Protocol: 'voltronic-qs-hex' USB devices -> USB + subdriver: 'cypress' - FTUPS FT-1000BS / Voltronic Power Imperial + 1KVA Protocol: 'voltronic-qs' USB devices -> USB subdriver: + 'cypress' + +2014-07-11 Daniele Pezzini + + * drivers/nutdrv_qx.c: nutdrv_qx: improve the USB matching procedure + Consider also the iManufacturer/iProduct strings when checking + devices (if subdriver is not specified) to assign the right + subdriver in case the VID:PID couple is not specific enough. + +2014-06-30 Daniele Pezzini + + * drivers/nutdrv_qx.c: nutdrv_qx: add new 'fabula' USB subdriver Add + a new USB subdriver ('fabula') to support models + manufactured/rebranded by Fideltronik and accompained by + UPSilon2000 software. Reference: + http://lists.alioth.debian.org/pipermail/nut- + upsuser/2014-June/009059.html + +2014-09-03 Daniele Pezzini + + * drivers/Makefile.am, drivers/nutdrv_qx.c, drivers + /nutdrv_qx_voltronic-qs-hex.c, drivers/nutdrv_qx_voltronic-qs- + hex.h: nutdrv_qx: add Voltronic-QS-Hex subdriver (protocol + =voltronic-qs-hex) A subdriver using a protocol, specific to UPSes + manufactured by Voltronic Power, partially Hex-encoded (e.g. 'QS' + reply) and supporting some megatec commands. + * docs/nutdrv_qx-subdrivers.txt: nutdrv_qx: update docs about added + support for more complex UPS answers + * drivers/nutdrv_qx.c, drivers/nutdrv_qx.h, + drivers/nutdrv_qx_mecer.c, drivers/nutdrv_qx_megatec-old.c, + drivers/nutdrv_qx_megatec.c, drivers/nutdrv_qx_mustek.c, + drivers/nutdrv_qx_q1.c, drivers/nutdrv_qx_voltronic-qs.c, + drivers/nutdrv_qx_voltronic.c, drivers/nutdrv_qx_zinto.c: + nutdrv_qx: add basic support for more complex UPS answers Add + support (also in 'TESTING' mode) for '\0' chars in raw UPS answers + and the ability to preprocess answers before anything else (e.g.: + for CRC, decoding, ...). Increase verbosity of USB subdrivers and + serial communication. Always print also the return code when + dealing with an error. Update all subdrivers accordingly, bump + versions. + +2014-09-08 Charles Lepple + + * docs/documentation.txt: docs: Add link to Roger Price's openSUSE + writeup + +2014-09-04 Daniele Pezzini + + * drivers/nutdrv_qx.c: nutdrv_qx: prevent a vicious loop when + unexpected answers happen If a 'QX_FLAG_QUICK_POLL' item gets an + unexpected (non-empty) answer and, after returning from + 'qx_ups_walk()', it is not followed by at least one item using a + different 'command', the driver will loop endlessly using the same + 'broken' answer instead of trying to get a new one from the UPS. To + solve this issue, make sure to have an empty 'previous_item' when + starting 'qx_ups_walk()'. Also, bail out of 'qx_ups_walk()' when a + 'QX_FLAG_QUICK_POLL' item can't be preprocessed properly through + 'ups_infoval_set()'. + +2014-09-04 Charles Lepple + + * docs/man/asem.txt: docs: recommend I2C bus name for asem driver + +2014-09-03 Arnaud Quette + + * docs/man/nut-scanner.txt: Fix typo error in nut-scanner doc The + example network range scanned when using 192.168.0.0/25 is actually + 192.168.0.0 to 192.168.0.12*7* not (i.e. not .128) as previously + stated (reported by Evgeny 'Jim' Klimov) Closes + networkupstools/nut#144 + +2014-09-02 Charles Lepple + + * data/driver.list.in, drivers/belkin-hid.c: HCL: Belkin Regulator + PRO-USB 050d:0f51 (0.17) + https://github.com/networkupstools/nut/issues/149 + +2014-08-22 Charles Lepple + + * data/driver.list.in: HCL: Mecer ME-100-WTU with blazer_usb USB + VID:PID = 0665:5161 Tested by @silvec (Oliver Sauder) on NUT 2.6.3 + Reference: https://github.com/networkupstools/nut/issues/148 + +2014-08-19 Charles Lepple + + * docs/documentation.txt: docs: update links for two articles + +2014-08-17 Charles Lepple + + * tools/nut-usbinfo.pl: nut-usbinfo: fix FreeBSD devd.conf to use + $cdev + * scripts/upower/95-upower-hid.rules: 95-upower-hid.rules: updated by + nut-usbinfo.pl URL updated in previous commit. + * tools/nut-usbinfo.pl: nut-usbinfo: change link from Alioth SVN to + GitHub + * scripts/udev/.gitignore: udev: ignore 62-nut-usbups.rules Follow- + up commit to networkupstools/nut#140 + +2014-08-17 Yann E. MORIN + + * conf/Makefile.am: conf/: fix parallel install Do not reference the + upsmon.conf.sample twice, otherwise install, with a high number of + make jobs, may fail, like so: http://autobuild.buildroot.net/result + s/256/2567e13cd5bc702bc3a38a1d6fc8e34022cc7db5/build-end.log --- + This is not a rare occurence, as my testing managed to trigger the + issue in about 1 test out of 10 on average, on a not-so-fast + machine. + +2014-08-16 Charles Lepple + + * tools/nut-usbinfo.pl: nut-usbinfo: ignore *.orig files + +2014-08-14 Émilien Kia + + * configure.ac, docs/man/Makefile.am, m4/nut_check_asciidoc.m4: Test + presence of xmllint for manpages doc generation. + * configure.ac, docs/man/Makefile.am, m4/nut_check_asciidoc.m4: Test + presence of xsltproc for manpages doc generation. + +2014-08-04 Charles Lepple + + * docs/man/ups.conf.txt, drivers/libusb.c: Remove redundant + usb_set_altinterface(), unless user requests it Adds flag/value to + USB driver options. Closes networkupstools/nut#138 + +2014-08-09 Charles Lepple + + * drivers/blazer_usb.c, drivers/libusb.c, drivers/nutdrv_qx.c, + drivers/tripplite_usb.c, drivers/usb-common.h, drivers/usbhid- + ups.c: libusb.c: consolidate USB-related addvar() calls + * drivers/cps-hid.c: usbhid-ups (CPS): determine battery.voltage + scale factor at runtime If the battery.voltage reading is greater + than 1.4x battery.voltage.nominal, apply a scale factor of 2/3 to + bring the voltage back in line. Closes networkupstools/nut#142 + +2014-08-08 Arnaud Quette + + * docs/man/nut-scanner.txt: Fix typo error Fix a typo error on "-B" + option (reported by Evgeny 'Jim' Klimov) + +2014-08-05 Arnaud Quette + + * scripts/python/Makefile.am: Distribute FreeDesktop AppData file for + NUT Monitor FreeDesktop AppData file for NUT Monitor was not + distributed, waiting for some approval + +2014-08-01 Arnaud Quette + + * scripts/udev/Makefile.am, scripts/udev/README: Fix USB permission + issues related to Linux / udev Rename udev rules file to 62-nut- + usbups.rules, to prevent NUT USB privileges from being overwritten + Closes #140 + * docs/cables.txt: Fix typo error on Eaton / MGE USB-RJ45 cable + +2014-07-14 Charles Lepple + + * scripts/Aix/.gitignore: Ignore generated AIX spec file + +2014-07-14 Giuseppe Corbelli + + * AUTHORS, docs/man/asem.txt: asem: additional documentation + http://article.gmane.org/gmane.comp.monitoring.nut.devel/6741 + +2014-07-13 Charles Lepple + + * docs/man/upscli_get.txt: upscli_get(): mention SIGPIPE handling + Closes: #132 + * data/driver.list.in: HCL: distinguish between Tripp Lite old and + new protocol 3005 + +2014-07-13 Arnaud Quette + + * scripts/python/app/nut-monitor.appdata.xml: Complete FreeDesktop + AppData file for NUT Monitor As per Richard Hughes comments, in + #127, complete the description field + +2014-07-12 Arnaud Quette + + * scripts/Aix/nut-aix.spec.in: Minor adjustments as per Github + comments + * docs/configure.txt: Add missing documentation for configure option + The new asem driver introduced --with-linux_i2c, for which + documentation was missing in configure documentation + +2014-07-11 Charles Lepple + + * NEWS, data/driver.list.in, docs/man/Makefile.am, docs/man/asem.txt, + docs/man/index.txt: asem: documentation + +2014-07-07 Giuseppe Corbelli + + * configure.ac, data/driver.list.in, drivers/Makefile.am, + drivers/asem.c: Support for ASEM UPS on Linux/i2c Patch from + http://article.gmane.org/gmane.comp.monitoring.nut.devel/6723 + Thread: http://news.gmane.org/find- + root.php?message_id=53A83FCB.1080808%40copanitalia.com Builds on + Ubuntu 12.10 and 14.04; requires libi2c-dev + +2014-07-05 Charles Lepple + + * drivers/tripplite_usb.c: tripplite_usb: fix typos in bin2d() and + control_outlet() (0.27) + * drivers/tripplite_usb.c: tripplite_usb: control_outlet() for + protocol 3005 (0.26) + * drivers/tripplite_usb.c: tripplite_usb: Additional 3005 protocol + support (0.25) http://news.gmane.org/find-root.php?message_id=CAFe + iwyG8HCfg%2dQqxcwhnm1Yo0z0F0BLyOPCYX%2d4yMMFg8sB4QQ%40mail.gmail.co + m + * drivers/tripplite_usb.c: tripplite_usb: basic support for 3005 + binary protocol (0.24) Based on logs from SMART500RT1U + +2014-07-04 vesnn + + * drivers/powercom.c: Update powercom.c Fix Powercom Imperial + initialization for models since 2009 with USB interface. + +2014-06-23 Arnaud Quette + + * scripts/python/app/nut-monitor.appdata.xml: Create a FreeDesktop + AppData file for NUT Monitor appData files provide to users long + descriptions, screenshots and other useful information on + application. This will mainly serve for Software Center like + applications + +2014-06-19 Charles Lepple + + * data/driver.list.in: HCL: Lacerda New Orion 800VA with blazer_usb + http://news.gmane.org/find-root.php?message_id=CANDysWwqgTUMYU03QbP + T8JxEtLd38mvwfTMMhZqS%3d%2diGpdvJDA%40mail.gmail.com + +2014-06-17 Charles Lepple + + * data/driver.list.in: HCL: add APC-Microsol entry for solis + * drivers/solis.c: solis: silence clang warnings about extra + parentheses Since we're in the neighborhood (#133)... Typically, + the idiom is either: if ( a == b ) for equality checking, or: if + ( ( a = b ) ) for assignment with a comparison. + * drivers/solis.c, drivers/solis.h: solis: eliminate fixed-length + string buffer for model name The new APC model name overflows the + buffer. (#133) + +2014-06-16 bsalvador + + * drivers/solis.c: Update on solis.c to add more support to Back-UPS + 1200BR + * drivers/solis.c: Update solis.c to support Microsol-APC Unit. + Added support to Back-UPS 1200BR (Microsol-APC) unit. + +2014-06-15 Charles Lepple + + * docs/man/upscli_get.txt, docs/man/upscli_list_next.txt, + docs/man/upscli_list_start.txt: docs: synchronize upscli_* + numq/numa with header There were a few leftover signed int + parameters in the man pages, but the headers and implementation use + 'unsigned int'. Closes: + https://github.com/networkupstools/nut/issues/131 + * docs/man/solis.txt: docs: mention APC in Microsol driver man page + * docs/man/apcsmart.txt: docs: point APC Microsol users from apcsmart + to solis Also make some of the formatting and grammar self- + consistent. + * drivers/solis.c: solis: recognize APC BZ1200-BR and BZ2200BI-BR + (0.62) Patch suggested by Bruno Salvador for BZ1200-BR, and also + tested by Douglas A. Augusto on BZ2200BI-BR. Reference: * + http://forums.freenas.org/index.php?threads/nobreak-bz1200-br-back- + ups-rs-1200va-600w-bivolt-115-nt.20247/ * http://news.gmane.org + /find-root.php?message_id=CACu22%2d3Nn2R%3dQQe9uy%5fPXHRduaPaFgCp2S + w4ra57Ow2qDQcOJQ%40mail.gmail.com + +2014-06-08 Arnaud Quette + + * scripts/subdriver/gen-snmp-subdriver.sh: Inline documentation fixes + +2014-06-03 george + + * scripts/python/module/PyNUT.py: Fixed version description. + * scripts/python/module/PyNUT.py: Added author information, bumped + version. According to the semantic versioning scheme + (http://semver.org/), adding features that do not break backwards + compatibility with previous releases means that the minor version + number should be incremented. + * scripts/python/module/PyNUT.py: Change format of raise keyword. + Fixes PyNUT Python 3 compatibility. + * scripts/python/module/PyNUT.py: PyNUT: Create a custom exception + class. This maintains backwards compatibility, and allows calling + programs to use "except PyNUTError" instead of "except Exception" + when using PyNUT methods. See + https://wiki.python.org/moin/HandlingExceptions for more + information. + * scripts/python/module/PyNUT.py: Fix error when raising without an + Exception. Raising without a valid exception is invalid: >>> + raise Traceback (most recent call last): File "", line 1, in + TypeError: exceptions must be old-style classes or derived + from BaseException, not NoneType >>> raise Exception Traceback + (most recent call last): File "", line 1, in + Exception Changing this to "raise Exception" fixes this problem. + +2014-06-01 Charles Lepple + + * docs/man/tripplite_usb.txt, drivers/tripplite_usb.c: tripplite_usb: + last tweaks, for now. Initialize bv_12V to a dummy value, since + gcc can't see that it is used in the union of both conditionals + where it is set. Also, align the documentation with the strange + definition of empty used by the Tripp Lite state-of-charge + approximation. + * drivers/tripplite_usb.c: tripplite_usb: silence warning (0.23) + Pedantic, to be sure, but someone might try the driver with a + protocol not listed, and sure enough, bv_12V won't be initialized. + * docs/man/tripplite_usb.txt, drivers/tripplite_usb.c: tripplite_usb: + expose battery_min/_max as variables (0.22) http://news.gmane.org + /find- + root.php?message_id=21370.36829.817425.464627%40godel.bruda.ca + +2014-05-27 Charles Lepple + + * data/driver.list.in: HCL: GRAFENTHAL PR-3000-HS supported by snmp- + ups Tested with 2.6.5-3 (0.68) on Windows (IETF MIB 1.4). Some + NUT variables are zero - further testing may be needed. Reference: + http://news.gmane.org/find-root.php?message_id=75FC7A5479BA4A4E8ADF + 76BC3AD3E568581EC753%40MS03.MACLE.DE + +2014-05-23 Charles Lepple + + * drivers/tripplite_usb.c: tripplite_usb: use dv/dq charge + calculation for all models (0.21) + +2014-05-20 Andrew Burdo + + * drivers/powercom-hid.c: Add comments for some values. + * drivers/usbhid-ups.c: Reuse variable. + * drivers/usbhid-ups.c: Add default case. + +2014-05-18 Charles Lepple + + * scripts/upower/95-upower-hid.rules: upower: regenerate rules file + USB VID:PID = 10af:0004 This dependency graph makes my head spin. + * configure.ac: configure.ac: version to 2.7.2.5 for snapshots + +2014-05-13 Daniele Pezzini + + * drivers/compaq-mib.c: compaq-mib: comment out no longer used items + As per 31827d5faa86377efb7a92b7aec322cc4c7a275f + +2014-05-03 Daniele Pezzini + + * docs/download.txt: docs: add Void Linux in download/Binary packages + Reference: https://github.com/networkupstools/nut/issues/125 + +2014-05-03 Charles Lepple + + * docs/Makefile.am: docs: add mge-usb-rj45.jpg to distribution + +2014-05-02 Arnaud Quette + + * docs/images/cables/mge-usb-rj45.jpg: Add MGE information on USB- + RJ45 cable The illustration matching the previous commit was still + needed on the nut repository, and not on the nut-website on + * docs/cables.txt: Add MGE information on USB-RJ45 cable These + information were provided by MGE years ago, and were waiting for + counter testing. Martin De Graaf - Loyer has now fixed this. Note + that the matching illustration will be committed on the new nut- + website repository + +2014-04-29 Andrew Burdo + + * drivers/powercom-hid.c, drivers/usbhid-ups.c: Bump versions. + * data/driver.list.in, docs/man/usbhid-ups.txt: Update documentation. + * drivers/usbhid-ups.c: Reconnect on interrupt read error. + * drivers/libhid.c, drivers/libhid.h, drivers/powercom-hid.c, drivers + /usbhid-ups.c: Reading from the interrupt pipe implies that you use + INPUT flagged objects. + * drivers/powercom-hid.c: Remove erroneous status. + * drivers/powercom-hid.c: Comment non-compliant variables. + +2014-04-17 Andrew Burdo + + * drivers/libhid.c, drivers/libhid.h, drivers/powercom-hid.c, drivers + /usbhid-ups.c: Add support for 0d9f:0001 (USB HID, Powercom). + 2014-04-17 Arnaud Quette * NEWS, UPGRADING, configure.ac: Update for release 2.7.2 Complete @@ -68,6 +1116,78 @@ * UPGRADING: Added note about --enable-option-checking=fatal Closes #99 (really) +2014-03-05 Émilien Kia + + * scripts/Aix/nut-aix.spec.in: Make web source path independant from + specific version. + * scripts/Aix/nut-aix.spec.in: Use configure-dependant variables + instead of statically defined ones for user and group. + * configure.ac: Use $target_cpu instead of calling uname to know cpu + type. Fix crosscompilation. + +2013-06-14 Vaclav Krpec + + * scripts/Aix/nut-aix.spec.in, scripts/Aix/nut.init: AIX: packaging & + init script improvements (cherry picked from commit + ce195e3a2eff1abbd8e192f4d3e278017d7ffb21) + +2013-06-12 Vaclav Krpec + + * scripts/Aix/nut.init: Fixed client startup detection (cherry + picked from commit 23df5e811cc9008bfa0a37bd174b59890a3760a6) + * scripts/Aix/nut-aix.spec.in: Fixed AIX RPM specfile (cherry picked + from commit 11ba37bf36dcda0398c8c62fab838dd00e54c5db) + +2013-06-11 Vaclav Krpec + + * scripts/Aix/nut-aix.spec.in: Allow libneon-based XML driver & + scanning for AIX (cherry picked from commit + 4c2e89ec584b2015b22f4599d1571c26f2f94e3d) + +2013-06-10 Vaclav Krpec + + * clients/Makefile.am: Fix of AIX-specific parseconf linking bug + Added dummy do_upsconf_args to binaries that use libcommon to + satisfy the linker. libcommon links libparseconf, which calls + do_upsconf_args supplied from above as an implementation-specific + routine. (cherry picked from commit + 0078f9383d3a7af4f3edfed6c78de387a12c6b2b) + +2013-04-25 Vaclav Krpec + + * clients/Makefile.am, clients/upsclient.c, configure.ac: + linupsclient: NUT scanning on AIX bugfix 1/ A simmilar bug like in + Solaris is in AIX itself---non-blocking connect may return -1 while + errno == 0. Shall be treated as EINPROGRESS. 2/ Linking of + libupsclent.so on AIX requires libcommon, otherwise scanning for + NUT crashes with SIGSEGV on unresolved usplogx (cherry picked from + commit 16177f99bc995852bb86d2183958f24f11993632) + +2013-03-13 Vaclav Krpec + + * Makefile.am: AIX packages: make package does the trick (cherry + picked from commit 1d25bd2868339decace5b3028c834746f2824670) + +2013-03-12 Vaclav Krpec + + * scripts/Aix/nut-aix.spec.in, scripts/Aix/nut.init: AIX packaging: + nut-client uninstal bugfix Packages clean uninstallation + (lost/forgotten commit) (cherry picked from commit + f6dd1aec5d2157a3ba3654621fa8e2ac88b060f9) + +2013-03-08 Vaclav Krpec + + * clients/upsclient.c, configure.ac: Solaris/i386: non-blocking + connect WA (cherry picked from commit + d2b466b9ee5402074ccbf7f2967433350affdbcc) + +2013-03-04 Vaclav Krpec + + * Makefile.am, configure.ac, scripts/Aix/nut-aix.spec.in, + scripts/Aix/nut.init: AIX packaging AIX init script and RPM spec. + file added (cherry picked from commit + 3851525edcb417f96a5d1c12fb786b85095b54d4) + 2014-03-03 Charles Lepple * data/driver.list.in: HCL: various updates * Closes diff --git a/INSTALL b/INSTALL index a1e89e1..2099840 100644 --- a/INSTALL +++ b/INSTALL @@ -1,7 +1,7 @@ Installation Instructions ************************* -Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, +Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, @@ -12,8 +12,8 @@ without warranty of any kind. Basic Installation ================== - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following + Briefly, the shell command `./configure && make && make install' +should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented @@ -309,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: +an Autoconf limitation. Until the limitation is lifted, you can use +this workaround: - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== @@ -367,4 +368,3 @@ operates. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. - diff --git a/INSTALL.nut b/INSTALL.nut index bc754cc..160b558 100644 --- a/INSTALL.nut +++ b/INSTALL.nut @@ -141,7 +141,7 @@ State path creation Create the state path directory for the driver(s) and server to use for storing UPS status data and other auxiliary files, and make it -owned by the user you created. +group-writable by the group of the system user you created. mkdir -p /var/state/ups chmod 0770 /var/state/ups @@ -183,7 +183,7 @@ drivers; this should allow you to follow the below instructions. However, don't forget to set up the correct permissions later!). -NOTE: if you are using something like devfs or udev, make sure +NOTE: if you are using something like udev or devd, make sure these permissions stay set across a reboot. If they revert to the old values, your drivers may fail to start. diff --git a/Makefile.am b/Makefile.am index 2d67519..aebe618 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,6 +21,7 @@ DISTCHECK_FLAGS = --with-all --with-ssl --with-doc=auto DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-doc=auto DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \ + --with-systemdsystemunitdir='$${prefix}/lib/systemd/system' \ --with-hotplug-dir='$${prefix}/etc/hotplug' \ --with-udev-dir='$${prefix}/etc/udev' \ --with-devd-dir='$${prefix}/etc/devd' @@ -36,15 +37,23 @@ distcheck-light: distcleancheck: @: +# ---------------------------------------------------------------------- # Automatically generate the ChangeLog from Git logs: MAINTAINERCLEAN_FILES = ChangeLog + +# Older boundary of the ChangeLog commits range +# It can be a tag ('v2.2.0'), a commit hash, a date, ... +# See gitrevisions for more information on specifying ranges +GITLOG_START_POINT=v2.6.0 + # Force ChangeLog regeneration upon make dist (due to nonexistant 'dummy-stamp'), # in case it has already been generated previously dummy-stamp: ChangeLog: tools/gitlog2changelog.py dummy-stamp - $(top_srcdir)/tools/gitlog2changelog.py v2.6.0 || \ + $(top_srcdir)/tools/gitlog2changelog.py $(GITLOG_START_POINT) || \ echo "gitlog2changelog.py failed to generate the ChangeLog. See https://github.com/networkupstools/nut/commits/master" > $@ +# ---------------------------------------------------------------------- # Maintainers targets: distribution signature and hashes dist-sig: gpg --detach-sign nut-@PACKAGE_VERSION@.tar.gz @@ -113,14 +122,17 @@ package: cd scripts/HP-UX; \ make package; \ mv NUT_HPUX_package.depot NUT_HPUX_package@PACKAGE_VERSION@.depot; \ - else \ - if test `uname -s` = "SunOS"; then \ - make; \ - rm -rf @prefix@; \ - make install; \ - cd scripts/Solaris; \ - make package; \ - make uninstall; \ - rm -rf @prefix@; \ - fi; \ + elif test `uname -s` = "SunOS"; then \ + make; \ + rm -rf @prefix@; \ + make install; \ + cd scripts/Solaris; \ + make package; \ + make uninstall; \ + rm -rf @prefix@; \ + elif test `uname -s` = "AIX"; then \ + make dist; \ + cp scripts/Aix/nut-aix.spec /usr/src/packages/SPECS; \ + cp scripts/Aix/nut.init nut-*.tar.gz /usr/src/packages/SOURCES; \ + rpm -ba /usr/src/packages/SPECS/nut-aix.spec; \ fi; diff --git a/Makefile.in b/Makefile.in index f702014..44ffd6b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,23 +16,51 @@ # top-level Makefile for NUT VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -54,14 +81,16 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/configure \ +DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ + $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(top_srcdir)/scripts/Aix/nut-aix.spec.in \ + $(top_srcdir)/scripts/avahi/nut.service.in \ $(top_srcdir)/scripts/HP-UX/nut.psf.in \ $(top_srcdir)/scripts/HP-UX/postinstall.in \ - $(top_srcdir)/scripts/avahi/nut.service.in \ - $(top_srcdir)/scripts/ufw/nut.ufw.profile.in AUTHORS COPYING \ - ChangeLog INSTALL NEWS TODO compile config.guess config.sub \ - depcomp install-sh ltmain.sh missing + $(top_srcdir)/scripts/ufw/nut.ufw.profile.in COPYING TODO \ + compile config.guess config.sub depcomp install-sh missing \ + ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -90,18 +119,32 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = scripts/avahi/nut.service scripts/HP-UX/nut.psf \ +CONFIG_CLEAN_FILES = scripts/Aix/nut-aix.spec \ + scripts/avahi/nut.service scripts/HP-UX/nut.psf \ scripts/HP-UX/postinstall scripts/ufw/nut.ufw.profile CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -109,11 +152,32 @@ am__can_run_installinfo = \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) @@ -124,6 +188,7 @@ am__remove_distdir = \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi +am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -151,6 +216,7 @@ am__relativize = \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best +DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -158,6 +224,7 @@ distcleancheck_listfiles = find . -type f -print A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -264,12 +331,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -314,6 +384,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -356,14 +427,21 @@ EXTRA_DIST = INSTALL.nut LICENSE-GPL2 LICENSE-GPL3 MAINTAINERS UPGRADING DISTCHECK_FLAGS = --with-all --with-ssl --with-doc=auto DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-doc=auto DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \ + --with-systemdsystemunitdir='$${prefix}/lib/systemd/system' \ --with-hotplug-dir='$${prefix}/etc/hotplug' \ --with-udev-dir='$${prefix}/etc/udev' \ --with-devd-dir='$${prefix}/etc/devd' +# ---------------------------------------------------------------------- # Automatically generate the ChangeLog from Git logs: MAINTAINERCLEAN_FILES = ChangeLog +# Older boundary of the ChangeLog commits range +# It can be a tag ('v2.2.0'), a commit hash, a date, ... +# See gitrevisions for more information on specifying ranges +GITLOG_START_POINT = v2.6.0 + # ---------------------------------------------------------------------- # targets from old build system (pre-automake). # supported for a period of time for backward "compatibility". @@ -405,6 +483,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): +scripts/Aix/nut-aix.spec: $(top_builddir)/config.status $(top_srcdir)/scripts/Aix/nut-aix.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ scripts/avahi/nut.service: $(top_builddir)/config.status $(top_srcdir)/scripts/avahi/nut.service.in cd $(top_builddir) && $(SHELL) ./config.status $@ scripts/HP-UX/nut.psf: $(top_builddir)/config.status $(top_srcdir)/scripts/HP-UX/nut.psf.in @@ -424,22 +504,25 @@ distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -454,57 +537,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -520,12 +558,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -537,15 +570,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -554,9 +583,31 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) @@ -624,40 +675,42 @@ distdir: $(DISTFILES) || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) + $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + $(am__post_remove_distdir) dist-shar: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) + $(am__post_remove_distdir) -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -668,8 +721,6 @@ distcheck: dist GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ @@ -681,18 +732,19 @@ distcheck: dist *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod u+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && ../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -715,7 +767,7 @@ distcheck: dist && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 - $(am__remove_distdir) + $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' @@ -839,14 +891,13 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \ - dist-zip distcheck distclean distclean-generic \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + clean-libtool cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-generic \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ @@ -856,7 +907,7 @@ uninstall-am: install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am + ps ps-am tags tags-am uninstall uninstall-am distcheck-light: @@ -869,13 +920,15 @@ distcheck-light: # find . -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';' distcleancheck: @: + # Force ChangeLog regeneration upon make dist (due to nonexistant 'dummy-stamp'), # in case it has already been generated previously dummy-stamp: ChangeLog: tools/gitlog2changelog.py dummy-stamp - $(top_srcdir)/tools/gitlog2changelog.py v2.6.0 || \ + $(top_srcdir)/tools/gitlog2changelog.py $(GITLOG_START_POINT) || \ echo "gitlog2changelog.py failed to generate the ChangeLog. See https://github.com/networkupstools/nut/commits/master" > $@ +# ---------------------------------------------------------------------- # Maintainers targets: distribution signature and hashes dist-sig: gpg --detach-sign nut-@PACKAGE_VERSION@.tar.gz @@ -938,16 +991,19 @@ package: cd scripts/HP-UX; \ make package; \ mv NUT_HPUX_package.depot NUT_HPUX_package@PACKAGE_VERSION@.depot; \ - else \ - if test `uname -s` = "SunOS"; then \ - make; \ - rm -rf @prefix@; \ - make install; \ - cd scripts/Solaris; \ - make package; \ - make uninstall; \ - rm -rf @prefix@; \ - fi; \ + elif test `uname -s` = "SunOS"; then \ + make; \ + rm -rf @prefix@; \ + make install; \ + cd scripts/Solaris; \ + make package; \ + make uninstall; \ + rm -rf @prefix@; \ + elif test `uname -s` = "AIX"; then \ + make dist; \ + cp scripts/Aix/nut-aix.spec /usr/src/packages/SPECS; \ + cp scripts/Aix/nut.init nut-*.tar.gz /usr/src/packages/SOURCES; \ + rpm -ba /usr/src/packages/SPECS/nut-aix.spec; \ fi; # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/NEWS b/NEWS index c45fc6a..1e6fbde 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,76 @@ If you're upgrading from an earlier version, see the UPGRADING file. For a complete and more detailed list of changes, please refer to the ChangeLog file. +--------------------------------------------------------------------------- +Release notes for NUT 2.7.3 - what's new since 2.7.2: + + - reverted POWERDOWNFLAG to /etc/killpower as in 2.6.5 (packagers may want to + put this in another filesystem, though) + + - configure/make fixes for ${systemdsystemunitdir} + + - apcsmart: fix command set parsing for protocol version 4 (e.g. Smart-UPS + RT 10000 XL) + + - upslog: SIGUSR1 forces an immediate log entry + + - riello_usb/_ser: USB interface claim fix; improved error handling + + - usbhid-ups: add support for OpenUPS2 (PID: D005), Liebert GXT3 (PID: 0008) + APC AP9584 Serial->USB kit (PID: 0000), and some Powercom models + (PID: 0001). Fixed scaling for Cyberpower 0764:0501. + + - USB core: do not call usb_set_altinterface(0) by default + + - nutdrv_qx: added fabula, fuji USB and Voltronic-QS-HEX subdrivers; add + bestups subdriver to supersede the old standalone bestups driver + + - NUT Monitor: added FreeDesktop AppData file (including screenshots) + + - renamed udev rules file to 62-nut-usbups.rules (permissions fix) + + - added AIX packaging + + - asem: added a driver for the UPS in ASEM PB1300 embedded PCs + + - solis: updated to support APC Microsol units sold in Brazil + + - tripplite_usb: updated to use dv/dq charge calculation for all models (also + exposes battery_min and battery max as configuration variables); added + binary 3005 protocol support (such as for SMART500RT1U) + + - genericups: better debugging while parsing the cable description flags + + - all drivers: a new 'synchronous' driver flag is available for very verbose + units, such as some ePDUs + + - Eaton: + * Add support for EnergySaving features for Eaton UPSs (HID USB/SHUT and + XCP USB/serial) + * Fix and complete Eaton ePDUs G2/G3 support + * ABM (Advanced Battery Monitoring) support through battery.charger.status + in HID (USB and SHUT), XCP (USB and serial) and SNMP (Powerware XUPS + MIB) + + - support for new devices: + APC Back-UPS 1200BR and Back-UPS BZ2200BI-BR (Microsol) + ASEM SPA PB1300 UPS + Belkin Regulator PRO-USB + Cyber Power Systems Value 1500ELCD-RU + EUROCASE EA200N 2000VA + Fideltronik LUPUS 500 + Flight Technic & International (FTUPS) FT-1000BS and FT-1000BS(T) + Grafenthal PR-3000-HS + JAWAN JW-UPSLC02 + Lacerda New Orion 800VA + Mecer ME-1000-WTU + NHS Sistemas de Energia Expert C Online 6000/8000/10000 + NHS Sistemas de Energia Expert S Online 6000/8000/10000 + Powercom BNT-xxxAP (USB product id: 0001) + Rucelf UPOII-3000-96-EL + Tripp Lite OMNIVSINT800 + Voltronic Power Apex 1KVA and Imperial 1KVA + --------------------------------------------------------------------------- Release notes for NUT 2.7.2 - what's new since 2.7.1: diff --git a/UPGRADING b/UPGRADING index f2d19c0..3b14a40 100644 --- a/UPGRADING +++ b/UPGRADING @@ -7,6 +7,30 @@ This file lists changes that affect users who installed older versions of this software. When upgrading from an older version, be sure to check this file to see if you need to make changes to your system. +Changes from 2.7.2 to 2.7.3 +--------------------------- + +- The linkman:nutdrv_qx[8] driver will eventually supersede linkman:bestups[8]. + It has been tested on a U-series Patriot Pro II. Please test the new driver + on your hardware during your next maintenance window, and report any bugs. + +- If you are upgrading from a new install of 2.7.1 or 2.7.2, double-check the + value of POWERDOWNFLAG in $prefix/etc/upsmon.conf - it has been restored to + /etc/killpower as in 2.6.5 and earlier. + +- If you use upslog with a large sleep value, you may be interested in adding + `killall -SIGUSR1 upslog` to any OB/OL script actions. This will force + upslog to write a log entry to catch short power transients. + +- Be sure that your SSL keys are readable by the NUT system user. The SSL + subsystem is now initialized after `upsd` forks, to work around issues in the + NSS library. + +- The systemd nut-server.service does not Require nut-driver to be started + successfully. This was previously preventing upsd startup, even for just + one driver failure among many. This also matches the behavior of sysV + initscripts. + Changes from 2.7.1 to 2.7.2 --------------------------- diff --git a/aclocal.m4 b/aclocal.m4 index 4e5d1df..709a8d0 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,8 +1,7 @@ -# generated automatically by aclocal 1.11.6 -*- Autoconf -*- +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, -# Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -12,16 +11,17 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# longlong.m4 serial 14 -dnl Copyright (C) 1999-2007, 2009-2010 Free Software Foundation, Inc. +# longlong.m4 serial 17 +dnl Copyright (C) 1999-2007, 2009-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -29,8 +29,8 @@ dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. # Define HAVE_LONG_LONG_INT if 'long long int' works. -# This fixes a bug in Autoconf 2.61, but can be removed once we -# assume 2.62 everywhere. +# This fixes a bug in Autoconf 2.61, and can be faster +# than what's in Autoconf 2.62 through 2.68. # Note: If the type 'long long int' exists but is only 32 bits large # (as on some very old compilers), HAVE_LONG_LONG_INT will not be @@ -38,44 +38,48 @@ dnl From Paul Eggert. AC_DEFUN([AC_TYPE_LONG_LONG_INT], [ + AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], - [AC_LINK_IFELSE( - [_AC_TYPE_LONG_LONG_SNIPPET], - [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. - dnl If cross compiling, assume the bug isn't important, since - dnl nobody cross compiles for this platform as far as we know. - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[@%:@include - @%:@ifndef LLONG_MAX - @%:@ define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - @%:@ define LLONG_MAX (HALF - 1 + HALF) - @%:@endif]], - [[long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0;]])], - [ac_cv_type_long_long_int=yes], - [ac_cv_type_long_long_int=no], - [ac_cv_type_long_long_int=yes])], - [ac_cv_type_long_long_int=no])]) + [ac_cv_type_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. + dnl If cross compiling, assume the bug is not important, since + dnl nobody cross compiles for this platform as far as we know. + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[@%:@include + @%:@ifndef LLONG_MAX + @%:@ define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + @%:@ define LLONG_MAX (HALF - 1 + HALF) + @%:@endif]], + [[long long int n = 1; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0;]])], + [], + [ac_cv_type_long_long_int=no], + [:]) + fi + fi]) if test $ac_cv_type_long_long_int = yes; then AC_DEFINE([HAVE_LONG_LONG_INT], [1], - [Define to 1 if the system has the type `long long int'.]) + [Define to 1 if the system has the type 'long long int'.]) fi ]) # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. -# This fixes a bug in Autoconf 2.61, but can be removed once we -# assume 2.62 everywhere. +# This fixes a bug in Autoconf 2.61, and can be faster +# than what's in Autoconf 2.62 through 2.68. # Note: If the type 'unsigned long long int' exists but is only 32 bits # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT @@ -86,13 +90,16 @@ AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], [ AC_CACHE_CHECK([for unsigned long long int], [ac_cv_type_unsigned_long_long_int], - [AC_LINK_IFELSE( - [_AC_TYPE_LONG_LONG_SNIPPET], - [ac_cv_type_unsigned_long_long_int=yes], - [ac_cv_type_unsigned_long_long_int=no])]) + [ac_cv_type_unsigned_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + AC_LINK_IFELSE( + [_AC_TYPE_LONG_LONG_SNIPPET], + [], + [ac_cv_type_unsigned_long_long_int=no]) + fi]) if test $ac_cv_type_unsigned_long_long_int = yes; then AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], - [Define to 1 if the system has the type `unsigned long long int'.]) + [Define to 1 if the system has the type 'unsigned long long int'.]) fi ]) @@ -287,25 +294,77 @@ else fi[]dnl ])# PKG_CHECK_MODULES -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software -# Foundation, Inc. + +# PKG_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable pkgconfigdir as the location where a module +# should install pkg-config .pc files. By default the directory is +# $libdir/pkgconfig, but the default can be changed by passing +# DIRECTORY. The user can override through the --with-pkgconfigdir +# parameter. +AC_DEFUN([PKG_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, + [with_pkgconfigdir=]pkg_default) +AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_INSTALLDIR + + +# PKG_NOARCH_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable noarch_pkgconfigdir as the location where a +# module should install arch-independent pkg-config .pc files. By +# default the directory is $datadir/pkgconfig, but the default can be +# changed by passing DIRECTORY. The user can override through the +# --with-noarch-pkgconfigdir parameter. +AC_DEFUN([PKG_NOARCH_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([noarch-pkgconfigdir], + [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, + [with_noarch_pkgconfigdir=]pkg_default) +AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_NOARCH_INSTALLDIR + + +# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# ------------------------------------------- +# Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])# PKG_CHECK_VAR + +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 - # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' +[am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.6], [], +m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -321,24 +380,22 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.6])dnl +[AM_AUTOMAKE_VERSION([1.14.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 - # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and @@ -357,7 +414,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you +# harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, @@ -375,30 +432,26 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 9 - # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl @@ -417,16 +470,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, -# 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 12 -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing @@ -436,7 +487,7 @@ fi])]) # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was @@ -449,12 +500,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], @@ -462,8 +514,8 @@ AC_CACHE_CHECK([dependency style of $depcc], # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're @@ -503,16 +555,16 @@ AC_CACHE_CHECK([dependency style of $depcc], : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -521,8 +573,8 @@ AC_CACHE_CHECK([dependency style of $depcc], test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else @@ -530,7 +582,7 @@ AC_CACHE_CHECK([dependency style of $depcc], fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -578,7 +630,7 @@ AM_CONDITIONAL([am__fastdep$1], [ # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl @@ -588,9 +640,13 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' @@ -605,20 +661,18 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -631,7 +685,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -643,21 +697,19 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` @@ -675,7 +727,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will +# is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], @@ -685,18 +737,21 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 16 - # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -709,7 +764,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl +[AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -738,31 +793,40 @@ AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl @@ -773,34 +837,79 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi ]) -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -822,15 +931,12 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, -# Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 - # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. @@ -844,16 +950,14 @@ if test x"${install_sh}" != xset; then install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi -AC_SUBST(install_sh)]) +AC_SUBST([install_sh])]) -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], @@ -870,20 +974,17 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, -# 2011 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 - # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. -# Default is to disable them, unless `enable' is passed literally. -# For symmetry, `disable' may be passed as well. Anyway, the user +# Default is to disable them, unless 'enable' is passed literally. +# For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), @@ -894,10 +995,11 @@ AC_DEFUN([AM_MAINTAINER_MODE], AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], -[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful - (and sometimes confusing) to the casual installer], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE @@ -905,18 +1007,14 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) ] ) -AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) - # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 - # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -934,7 +1032,7 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -959,52 +1057,14 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 - # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -1012,11 +1072,10 @@ AC_DEFUN([AM_MISSING_PROG], $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) - # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl @@ -1029,54 +1088,22 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) + AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, -# Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 - # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], @@ -1086,7 +1113,7 @@ AC_DEFUN([_AM_MANGLE_OPTION], # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ @@ -1100,24 +1127,82 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -1128,32 +1213,40 @@ case `pwd` in esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$[2]" = conftest.file ) then @@ -1163,46 +1256,118 @@ else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT(yes)]) +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) -# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- -# One issue with vendor `install' (even GNU) is that you can't +# One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize +# always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 - # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. @@ -1216,18 +1381,16 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory @@ -1237,76 +1400,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar +# AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. + +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - # tar/untar a dummy directory, and stop if the command works + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR diff --git a/clients/Makefile.in b/clients/Makefile.in index e004931..7e58b62 100644 --- a/clients/Makefile.in +++ b/clients/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -21,23 +20,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -67,8 +94,9 @@ sbin_PROGRAMS = upsmon$(EXEEXT) upssched$(EXEEXT) @WITH_CGI_TRUE@ upsimage.cgi$(EXEEXT) upsset.cgi$(EXEEXT) @WITH_SSL_TRUE@am__append_4 = $(LIBSSL_LIBS) subdir = clients -DIST_COMMON = $(am__include_HEADERS_DIST) $(dist_bin_SCRIPTS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(dist_bin_SCRIPTS) $(top_srcdir)/depcomp \ + $(am__include_HEADERS_DIST) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -131,18 +159,24 @@ LTLIBRARIES = $(lib_LTLIBRARIES) libnutclient_la_LIBADD = am_libnutclient_la_OBJECTS = nutclient.lo libnutclient_la_OBJECTS = $(am_libnutclient_la_OBJECTS) -libnutclient_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(libnutclient_la_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +libnutclient_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) $(libnutclient_la_LDFLAGS) \ + $(LDFLAGS) -o $@ am__DEPENDENCIES_1 = @WITH_SSL_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) libupsclient_la_DEPENDENCIES = ../common/libcommonclient.la \ $(am__DEPENDENCIES_2) am_libupsclient_la_OBJECTS = upsclient.lo libupsclient_la_OBJECTS = $(am_libupsclient_la_OBJECTS) -libupsclient_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libupsclient_la_LDFLAGS) $(LDFLAGS) -o $@ +libupsclient_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(libupsclient_la_LDFLAGS) $(LDFLAGS) \ + -o $@ PROGRAMS = $(bin_PROGRAMS) $(cgiexec_PROGRAMS) $(sbin_PROGRAMS) am_upsc_OBJECTS = upsc.$(OBJEXT) upsc_OBJECTS = $(am_upsc_OBJECTS) @@ -190,28 +224,58 @@ upsstats_cgi_LDADD = $(LDADD) upsstats_cgi_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) SCRIPTS = $(dist_bin_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(libnutclient_la_SOURCES) $(libupsclient_la_SOURCES) \ $(upsc_SOURCES) $(upscmd_SOURCES) $(upsimage_cgi_SOURCES) \ $(upslog_SOURCES) $(upsmon_SOURCES) $(upsrw_SOURCES) \ @@ -230,12 +294,30 @@ am__can_run_installinfo = \ am__include_HEADERS_DIST = upsclient.h ../include/parseconf.h \ nutclient.h HEADERS = $(include_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -342,12 +424,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -392,6 +477,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -482,6 +568,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): + install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ @@ -508,16 +595,20 @@ uninstall-libLTLIBRARIES: clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + libnutclient.la: $(libnutclient_la_OBJECTS) $(libnutclient_la_DEPENDENCIES) $(EXTRA_libnutclient_la_DEPENDENCIES) - $(libnutclient_la_LINK) -rpath $(libdir) $(libnutclient_la_OBJECTS) $(libnutclient_la_LIBADD) $(LIBS) + $(AM_V_CXXLD)$(libnutclient_la_LINK) -rpath $(libdir) $(libnutclient_la_OBJECTS) $(libnutclient_la_LIBADD) $(LIBS) + libupsclient.la: $(libupsclient_la_OBJECTS) $(libupsclient_la_DEPENDENCIES) $(EXTRA_libupsclient_la_DEPENDENCIES) - $(libupsclient_la_LINK) -rpath $(libdir) $(libupsclient_la_OBJECTS) $(libupsclient_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(libupsclient_la_LINK) -rpath $(libdir) $(libupsclient_la_OBJECTS) $(libupsclient_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ @@ -527,10 +618,12 @@ install-binPROGRAMS: $(bin_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -551,7 +644,8 @@ uninstall-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -573,10 +667,12 @@ install-cgiexecPROGRAMS: $(cgiexec_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -597,7 +693,8 @@ uninstall-cgiexecPROGRAMS: @list='$(cgiexec_PROGRAMS)'; test -n "$(cgiexecdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(cgiexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(cgiexecdir)" && rm -f $$files @@ -619,10 +716,12 @@ install-sbinPROGRAMS: $(sbin_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -643,7 +742,8 @@ uninstall-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files @@ -656,33 +756,42 @@ clean-sbinPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + upsc$(EXEEXT): $(upsc_OBJECTS) $(upsc_DEPENDENCIES) $(EXTRA_upsc_DEPENDENCIES) @rm -f upsc$(EXEEXT) - $(LINK) $(upsc_OBJECTS) $(upsc_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upsc_OBJECTS) $(upsc_LDADD) $(LIBS) + upscmd$(EXEEXT): $(upscmd_OBJECTS) $(upscmd_DEPENDENCIES) $(EXTRA_upscmd_DEPENDENCIES) @rm -f upscmd$(EXEEXT) - $(LINK) $(upscmd_OBJECTS) $(upscmd_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upscmd_OBJECTS) $(upscmd_LDADD) $(LIBS) + upsimage.cgi$(EXEEXT): $(upsimage_cgi_OBJECTS) $(upsimage_cgi_DEPENDENCIES) $(EXTRA_upsimage_cgi_DEPENDENCIES) @rm -f upsimage.cgi$(EXEEXT) - $(LINK) $(upsimage_cgi_OBJECTS) $(upsimage_cgi_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upsimage_cgi_OBJECTS) $(upsimage_cgi_LDADD) $(LIBS) + upslog$(EXEEXT): $(upslog_OBJECTS) $(upslog_DEPENDENCIES) $(EXTRA_upslog_DEPENDENCIES) @rm -f upslog$(EXEEXT) - $(LINK) $(upslog_OBJECTS) $(upslog_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upslog_OBJECTS) $(upslog_LDADD) $(LIBS) + upsmon$(EXEEXT): $(upsmon_OBJECTS) $(upsmon_DEPENDENCIES) $(EXTRA_upsmon_DEPENDENCIES) @rm -f upsmon$(EXEEXT) - $(LINK) $(upsmon_OBJECTS) $(upsmon_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upsmon_OBJECTS) $(upsmon_LDADD) $(LIBS) + upsrw$(EXEEXT): $(upsrw_OBJECTS) $(upsrw_DEPENDENCIES) $(EXTRA_upsrw_DEPENDENCIES) @rm -f upsrw$(EXEEXT) - $(LINK) $(upsrw_OBJECTS) $(upsrw_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upsrw_OBJECTS) $(upsrw_LDADD) $(LIBS) + upssched$(EXEEXT): $(upssched_OBJECTS) $(upssched_DEPENDENCIES) $(EXTRA_upssched_DEPENDENCIES) @rm -f upssched$(EXEEXT) - $(LINK) $(upssched_OBJECTS) $(upssched_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upssched_OBJECTS) $(upssched_LDADD) $(LIBS) + upsset.cgi$(EXEEXT): $(upsset_cgi_OBJECTS) $(upsset_cgi_DEPENDENCIES) $(EXTRA_upsset_cgi_DEPENDENCIES) @rm -f upsset.cgi$(EXEEXT) - $(LINK) $(upsset_cgi_OBJECTS) $(upsset_cgi_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upsset_cgi_OBJECTS) $(upsset_cgi_LDADD) $(LIBS) + upsstats.cgi$(EXEEXT): $(upsstats_cgi_OBJECTS) $(upsstats_cgi_DEPENDENCIES) $(EXTRA_upsstats_cgi_DEPENDENCIES) @rm -f upsstats.cgi$(EXEEXT) - $(LINK) $(upsstats_cgi_OBJECTS) $(upsstats_cgi_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upsstats_cgi_OBJECTS) $(upsstats_cgi_LDADD) $(LIBS) install-dist_binSCRIPTS: $(dist_bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ @@ -739,46 +848,52 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsstats.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -807,26 +922,15 @@ uninstall-includeHEADERS: files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -838,15 +942,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -855,6 +955,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -1006,25 +1121,25 @@ uninstall-am: uninstall-binPROGRAMS uninstall-cgiexecPROGRAMS \ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-cgiexecPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool clean-sbinPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-cgiexecPROGRAMS \ - install-data install-data-am install-dist_binSCRIPTS \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-includeHEADERS \ - install-info install-info-am install-libLTLIBRARIES \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-sbinPROGRAMS install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-cgiexecPROGRAMS uninstall-dist_binSCRIPTS \ - uninstall-includeHEADERS uninstall-libLTLIBRARIES \ - uninstall-sbinPROGRAMS +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-cgiexecPROGRAMS clean-generic \ + clean-libLTLIBRARIES clean-libtool clean-sbinPROGRAMS \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-cgiexecPROGRAMS install-data \ + install-data-am install-dist_binSCRIPTS install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-includeHEADERS install-info \ + install-info-am install-libLTLIBRARIES install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-cgiexecPROGRAMS \ + uninstall-dist_binSCRIPTS uninstall-includeHEADERS \ + uninstall-libLTLIBRARIES uninstall-sbinPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/clients/upsclient.c b/clients/upsclient.c index 797786b..43c0e79 100644 --- a/clients/upsclient.c +++ b/clients/upsclient.c @@ -20,6 +20,7 @@ */ #include "config.h" /* safe because it doesn't contain prototypes */ +#include "nut_platform.h" #ifdef HAVE_PTHREAD /* this include is needed on AIX to have errno stored in thread local storage */ @@ -41,6 +42,20 @@ #include "common.h" #include "timehead.h" +/* WA for Solaris/i386 bug: non-blocking connect sets errno to ENOENT */ +#if (defined NUT_PLATFORM_SOLARIS && CPU_TYPE == i386) + #define SOLARIS_i386_NBCONNECT_ENOENT(status) (ENOENT == (status)) +#else + #define SOLARIS_i386_NBCONNECT_ENOENT(status) (0) +#endif /* end of Solaris/i386 WA for non-blocking connect */ + +/* WA for AIX bug: non-blocking connect sets errno to 0 */ +#if (defined NUT_PLATFORM_AIX) + #define AIX_NBCONNECT_0(status) (0 == (status)) +#else + #define AIX_NBCONNECT_0(status) (0) +#endif /* end of AIX WA for non-blocking connect */ + #ifdef WITH_NSS #include #include @@ -916,7 +931,7 @@ int upscli_tryconnect(UPSCONN_t *ups, const char *host, int port, int flags,stru } while ((v = connect(sock_fd, ai->ai_addr, ai->ai_addrlen)) < 0) { - if(errno == EINPROGRESS) { + if(errno == EINPROGRESS || SOLARIS_i386_NBCONNECT_ENOENT(errno) || AIX_NBCONNECT_0(errno)) { FD_ZERO(&wfds); FD_SET(sock_fd, &wfds); select(sock_fd+1,NULL,&wfds,NULL, diff --git a/clients/upslog.c b/clients/upslog.c index 7c534c7..325cdc9 100644 --- a/clients/upslog.c +++ b/clients/upslog.c @@ -77,6 +77,11 @@ static void set_exit_flag(int sig) exit_flag = sig; } +static void set_print_now_flag(int sig) +{ + /* no need to do anything, the signal will cause sleep to be interrupted */ +} + /* handlers: reload on HUP, exit on INT/QUIT/TERM */ static void setup_signals(void) { @@ -97,6 +102,10 @@ static void setup_signals(void) fatal_with_errno(EXIT_FAILURE, "Can't install SIGQUIT handler"); if (sigaction(SIGTERM, &sa, NULL) < 0) fatal_with_errno(EXIT_FAILURE, "Can't install SIGTERM handler"); + + sa.sa_handler = set_print_now_flag; + if (sigaction(SIGUSR1, &sa, NULL) < 0) + fatal_with_errno(EXIT_FAILURE, "Can't install SIGUSR1 handler"); } static void help(const char *prog) diff --git a/common/Makefile.in b/common/Makefile.in index daa0324..6a5149e 100644 --- a/common/Makefile.in +++ b/common/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,23 +17,51 @@ # Network UPS Tools: common VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -55,8 +82,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = common -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in atexit.c \ - setenv.c snprintf.c strerror.c +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am strerror.c \ + atexit.c setenv.c snprintf.c $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -89,25 +116,50 @@ LTLIBRARIES = $(noinst_LTLIBRARIES) libcommon_la_DEPENDENCIES = libparseconf.la @LTLIBOBJS@ am_libcommon_la_OBJECTS = common.lo state.lo upsconf.lo libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = libcommonclient_la_DEPENDENCIES = libparseconf.la @LTLIBOBJS@ am_libcommonclient_la_OBJECTS = common.lo state.lo libcommonclient_la_OBJECTS = $(am_libcommonclient_la_OBJECTS) libparseconf_la_LIBADD = am_libparseconf_la_OBJECTS = parseconf.lo libparseconf_la_OBJECTS = $(am_libparseconf_la_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libcommon_la_SOURCES) $(libcommonclient_la_SOURCES) \ $(libparseconf_la_SOURCES) DIST_SOURCES = $(libcommon_la_SOURCES) $(libcommonclient_la_SOURCES) \ @@ -117,12 +169,30 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -229,12 +299,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -279,6 +352,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -351,18 +425,23 @@ $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + libcommon.la: $(libcommon_la_OBJECTS) $(libcommon_la_DEPENDENCIES) $(EXTRA_libcommon_la_DEPENDENCIES) - $(LINK) $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS) + libcommonclient.la: $(libcommonclient_la_OBJECTS) $(libcommonclient_la_DEPENDENCIES) $(EXTRA_libcommonclient_la_DEPENDENCIES) - $(LINK) $(libcommonclient_la_OBJECTS) $(libcommonclient_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libcommonclient_la_OBJECTS) $(libcommonclient_la_LIBADD) $(LIBS) + libparseconf.la: $(libparseconf_la_OBJECTS) $(libparseconf_la_DEPENDENCIES) $(EXTRA_libparseconf_la_DEPENDENCIES) - $(LINK) $(libparseconf_la_OBJECTS) $(libparseconf_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libparseconf_la_OBJECTS) $(libparseconf_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -380,25 +459,28 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsconf.Plo@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -406,26 +488,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -437,15 +508,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -454,6 +521,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -595,18 +677,19 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/common/common.c b/common/common.c index ce3c573..d7c74d3 100644 --- a/common/common.c +++ b/common/common.c @@ -586,13 +586,21 @@ char *xstrdup(const char *string) /* modify in - strip all trailing instances of */ char *rtrim(char *in, const char sep) +{ + char seps[2] = { sep, '\0' }; + + return rtrim_m(in, seps); +} + +/* modify in - strip all trailing instances of each char in */ +char *rtrim_m(char *in, const char *seps) { char *p; - if (in) { + if (in && strlen(in)) { p = &in[strlen(in) - 1]; - while ((p >= in) && (*p == sep)) + while ((p >= in) && (strchr(seps, *p) != NULL)) *p-- = '\0'; } return in; @@ -601,16 +609,19 @@ char *rtrim(char *in, const char sep) /* modify in - strip all leading instances of */ char* ltrim(char *in, const char sep) { - char *p; + char seps[2] = { sep, '\0' }; - if (in) { - p = in; + return ltrim_m(in, seps); +} - while ((*p != '\0') && (*p == sep)) - *p++ = *in++; - - p = '\0'; +/* modify in - strip all leading instances of each char in */ +char* ltrim_m(char *in, const char *seps) +{ + if (in && strlen(in)) { + while ((*in != '\0') && (strchr(seps, *in) != NULL)) + memmove(in, in + 1, strlen(in)); } + return in; } diff --git a/conf/Makefile.am b/conf/Makefile.am index 681f33c..95c0173 100644 --- a/conf/Makefile.am +++ b/conf/Makefile.am @@ -2,7 +2,7 @@ INSTALL_0600 = $(INSTALL) -m 0600 -SECFILES = upsmon.conf.sample upsd.conf.sample upsd.users.sample +SECFILES = upsd.conf.sample upsd.users.sample PUBFILES = nut.conf.sample ups.conf.sample CGIPUB = hosts.conf.sample upsset.conf.sample upsstats.html.sample \ upsstats-single.html.sample diff --git a/conf/Makefile.in b/conf/Makefile.in index 6b374f8..4afc1f8 100644 --- a/conf/Makefile.in +++ b/conf/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,23 +17,51 @@ # Network UPS Tools: conf VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -55,9 +82,10 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = conf -DIST_COMMON = $(am__dist_sysconf_DATA_DIST) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/upsmon.conf.sample.in \ - $(srcdir)/upssched.conf.sample.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/upsmon.conf.sample.in \ + $(srcdir)/upssched.conf.sample.in \ + $(am__dist_sysconf_DATA_DIST) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -86,6 +114,18 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = upsmon.conf.sample upssched.conf.sample CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -93,9 +133,9 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -am__dist_sysconf_DATA_DIST = upsmon.conf.sample upsd.conf.sample \ - upsd.users.sample nut.conf.sample ups.conf.sample \ - hosts.conf.sample upsset.conf.sample upsstats.html.sample \ +am__dist_sysconf_DATA_DIST = upsd.conf.sample upsd.users.sample \ + nut.conf.sample ups.conf.sample hosts.conf.sample \ + upsset.conf.sample upsstats.html.sample \ upsstats-single.html.sample am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -126,10 +166,12 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(sysconfdir)" DATA = $(dist_sysconf_DATA) $(nodist_sysconf_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -236,12 +278,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -286,6 +331,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -308,7 +354,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ INSTALL_0600 = $(INSTALL) -m 0600 -SECFILES = upsmon.conf.sample upsd.conf.sample upsd.users.sample +SECFILES = upsd.conf.sample upsd.users.sample PUBFILES = nut.conf.sample ups.conf.sample CGIPUB = hosts.conf.sample upsset.conf.sample upsstats.html.sample \ upsstats-single.html.sample @@ -402,11 +448,11 @@ uninstall-nodist_sysconfDATA: @list='$(nodist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sysconfdir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) @@ -545,17 +591,19 @@ uninstall-am: uninstall-dist_sysconfDATA uninstall-nodist_sysconfDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dist_sysconfDATA \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-nodist_sysconfDATA install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dist_sysconfDATA install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man \ + install-nodist_sysconfDATA install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-dist_sysconfDATA uninstall-nodist_sysconfDATA + mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am uninstall-dist_sysconfDATA \ + uninstall-nodist_sysconfDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/conf/ups.conf.sample b/conf/ups.conf.sample index 365a6f7..d8faef2 100644 --- a/conf/ups.conf.sample +++ b/conf/ups.conf.sample @@ -75,6 +75,21 @@ # # The default is 45 seconds. # +# synchronous: optional. The driver work by default in asynchronous +# mode (i.e *synchronous=no*). This means that all data +# are pushed by the driver on the communication socket to +# upsd (Unix socket on Unix, Named pipe on Windows) without +# waiting for these data to be actually consumed. With +# some HW, such as ePDUs, that can produce a lot of data, +# asynchronous mode may cause some congestion, resulting in +# the socket to be full, and the driver to appear as not +# connected. By enabling the 'synchronous' flag +# (value = 'yes'), the driver will wait for data to be +# consumed by upsd, prior to publishing more. This can be +# enabled either globally or per driver. +# +# The default is 'no' (i.e. asynchronous mode) for backward +# compatibility of the driver behavior. # # Anything else is passed through to the hardware-specific part of # the driver. diff --git a/conf/upsmon.conf.sample b/conf/upsmon.conf.sample deleted file mode 100644 index 9b44237..0000000 --- a/conf/upsmon.conf.sample +++ /dev/null @@ -1,377 +0,0 @@ -# Network UPS Tools: example upsmon configuration -# -# This file contains passwords, so keep it secure. - -# -------------------------------------------------------------------------- -# RUN_AS_USER -# -# By default, upsmon splits into two processes. One stays as root and -# waits to run the SHUTDOWNCMD. The other one switches to another userid -# and does everything else. -# -# The default nonprivileged user is set at compile-time with -# 'configure --with-user=...'. -# -# You can override it with '-u ' when starting upsmon, or just -# define it here for convenience. -# -# Note: if you plan to use the reload feature, this file (upsmon.conf) -# must be readable by this user! Since it contains passwords, DO NOT -# make it world-readable. Also, do not make it writable by the upsmon -# user, since it creates an opportunity for an attack by changing the -# SHUTDOWNCMD to something malicious. -# -# For best results, you should create a new normal user like "nutmon", -# and make it a member of a "nut" group or similar. Then specify it -# here and grant read access to the upsmon.conf for that group. -# -# This user should not have write access to upsmon.conf. -# -# RUN_AS_USER nut - -# -------------------------------------------------------------------------- -# MONITOR ("master"|"slave") -# -# List systems you want to monitor. Not all of these may supply power -# to the system running upsmon, but if you want to watch it, it has to -# be in this section. -# -# You must have at least one of these declared. -# -# is a UPS identifier in the form @[:] -# like ups@localhost, su700@mybox, etc. -# -# Examples: -# -# - "su700@mybox" means a UPS called "su700" on a system called "mybox" -# -# - "fenton@bigbox:5678" is a UPS called "fenton" on a system called -# "bigbox" which runs upsd on port "5678". -# -# The UPS names like "su700" and "fenton" are set in your ups.conf -# in [brackets] which identify a section for a particular driver. -# -# If the ups.conf on host "doghouse" has a section called "snoopy", the -# identifier for it would be "snoopy@doghouse". -# -# is an integer - the number of power supplies that this UPS -# feeds on this system. Most computers only have one power supply, so this -# is normally set to 1. You need a pretty big or special box to have any -# other value here. -# -# You can also set this to 0 for a system that doesn't supply any power, -# but you still want to monitor. Use this when you want to hear about -# changes for a given UPS without shutting down when it goes critical, -# unless is 0. -# -# and must match an entry in that system's -# upsd.users. If your username is "monmaster" and your password is -# "blah", the upsd.users would look like this: -# -# [monmaster] -# password = blah -# upsmon master (or slave) -# -# "master" means this system will shutdown last, allowing the slaves -# time to shutdown first. -# -# "slave" means this system shuts down immediately when power goes critical. -# -# Examples: -# -# MONITOR myups@bigserver 1 monmaster blah master -# MONITOR su700@server.example.com 1 upsmon secretpass slave -# MONITOR myups@localhost 1 upsmon pass master (or slave) - -# -------------------------------------------------------------------------- -# MINSUPPLIES -# -# Give the number of power supplies that must be receiving power to keep -# this system running. Most systems have one power supply, so you would -# put "1" in this field. -# -# Large/expensive server type systems usually have more, and can run with -# a few missing. The HP NetServer LH4 can run with 2 out of 4, for example, -# so you'd set that to 2. The idea is to keep the box running as long -# as possible, right? -# -# Obviously you have to put the redundant supplies on different UPS circuits -# for this to make sense! See big-servers.txt in the docs subdirectory -# for more information and ideas on how to use this feature. - -MINSUPPLIES 1 - -# -------------------------------------------------------------------------- -# SHUTDOWNCMD "" -# -# upsmon runs this command when the system needs to be brought down. -# -# This should work just about everywhere ... if it doesn't, well, change it. - -SHUTDOWNCMD "/sbin/shutdown -h +0" - -# -------------------------------------------------------------------------- -# NOTIFYCMD -# -# upsmon calls this to send messages when things happen -# -# This command is called with the full text of the message as one argument. -# The environment string NOTIFYTYPE will contain the type string of -# whatever caused this event to happen. -# -# Note that this is only called for NOTIFY events that have EXEC set with -# NOTIFYFLAG. See NOTIFYFLAG below for more details. -# -# Making this some sort of shell script might not be a bad idea. For more -# information and ideas, see docs/scheduling.txt -# -# Example: -# NOTIFYCMD /usr/local/ups/bin/notifyme - -# -------------------------------------------------------------------------- -# POLLFREQ -# -# Polling frequency for normal activities, measured in seconds. -# -# Adjust this to keep upsmon from flooding your network, but don't make -# it too high or it may miss certain short-lived power events. - -POLLFREQ 5 - -# -------------------------------------------------------------------------- -# POLLFREQALERT -# -# Polling frequency in seconds while UPS on battery. -# -# You can make this number lower than POLLFREQ, which will make updates -# faster when any UPS is running on battery. This is a good way to tune -# network load if you have a lot of these things running. -# -# The default is 5 seconds for both this and POLLFREQ. - -POLLFREQALERT 5 - -# -------------------------------------------------------------------------- -# HOSTSYNC - How long upsmon will wait before giving up on another upsmon -# -# The master upsmon process uses this number when waiting for slaves to -# disconnect once it has set the forced shutdown (FSD) flag. If they -# don't disconnect after this many seconds, it goes on without them. -# -# Similarly, upsmon slave processes wait up to this interval for the -# master upsmon to set FSD when a UPS they are monitoring goes critical - -# that is, on battery and low battery. If the master doesn't do its job, -# the slaves will shut down anyway to avoid damage to the file systems. -# -# This "wait for FSD" is done to avoid races where the status changes -# to critical and back between polls by the master. - -HOSTSYNC 15 - -# -------------------------------------------------------------------------- -# DEADTIME - Interval to wait before declaring a stale ups "dead" -# -# upsmon requires a UPS to provide status information every few seconds -# (see POLLFREQ and POLLFREQALERT) to keep things updated. If the status -# fetch fails, the UPS is marked stale. If it stays stale for more than -# DEADTIME seconds, the UPS is marked dead. -# -# A dead UPS that was last known to be on battery is assumed to have gone -# to a low battery condition. This may force a shutdown if it is providing -# a critical amount of power to your system. -# -# Note: DEADTIME should be a multiple of POLLFREQ and POLLFREQALERT. -# Otherwise you'll have "dead" UPSes simply because upsmon isn't polling -# them quickly enough. Rule of thumb: take the larger of the two -# POLLFREQ values, and multiply by 3. - -DEADTIME 15 - -# -------------------------------------------------------------------------- -# POWERDOWNFLAG - Flag file for forcing UPS shutdown on the master system -# -# upsmon will create a file with this name in master mode when it's time -# to shut down the load. You should check for this file's existence in -# your shutdown scripts and run 'upsdrvctl shutdown' if it exists. -# -# See the shutdown.txt file in the docs subdirectory for more information. - -POWERDOWNFLAG /etc/nut/killpower - -# -------------------------------------------------------------------------- -# NOTIFYMSG - change messages sent by upsmon when certain events occur -# -# You can change the default messages to something else if you like. -# -# NOTIFYMSG "message" -# -# NOTIFYMSG ONLINE "UPS %s on line power" -# NOTIFYMSG ONBATT "UPS %s on battery" -# NOTIFYMSG LOWBATT "UPS %s battery is low" -# NOTIFYMSG FSD "UPS %s: forced shutdown in progress" -# NOTIFYMSG COMMOK "Communications with UPS %s established" -# NOTIFYMSG COMMBAD "Communications with UPS %s lost" -# NOTIFYMSG SHUTDOWN "Auto logout and shutdown proceeding" -# NOTIFYMSG REPLBATT "UPS %s battery needs to be replaced" -# NOTIFYMSG NOCOMM "UPS %s is unavailable" -# NOTIFYMSG NOPARENT "upsmon parent process died - shutdown impossible" -# -# Note that %s is replaced with the identifier of the UPS in question. -# -# Possible values for : -# -# ONLINE : UPS is back online -# ONBATT : UPS is on battery -# LOWBATT : UPS has a low battery (if also on battery, it's "critical") -# FSD : UPS is being shutdown by the master (FSD = "Forced Shutdown") -# COMMOK : Communications established with the UPS -# COMMBAD : Communications lost to the UPS -# SHUTDOWN : The system is being shutdown -# REPLBATT : The UPS battery is bad and needs to be replaced -# NOCOMM : A UPS is unavailable (can't be contacted for monitoring) -# NOPARENT : The process that shuts down the system has died (shutdown impossible) - -# -------------------------------------------------------------------------- -# NOTIFYFLAG - change behavior of upsmon when NOTIFY events occur -# -# By default, upsmon sends walls (global messages to all logged in users) -# and writes to the syslog when things happen. You can change this. -# -# NOTIFYFLAG [+][+] ... -# -# NOTIFYFLAG ONLINE SYSLOG+WALL -# NOTIFYFLAG ONBATT SYSLOG+WALL -# NOTIFYFLAG LOWBATT SYSLOG+WALL -# NOTIFYFLAG FSD SYSLOG+WALL -# NOTIFYFLAG COMMOK SYSLOG+WALL -# NOTIFYFLAG COMMBAD SYSLOG+WALL -# NOTIFYFLAG SHUTDOWN SYSLOG+WALL -# NOTIFYFLAG REPLBATT SYSLOG+WALL -# NOTIFYFLAG NOCOMM SYSLOG+WALL -# NOTIFYFLAG NOPARENT SYSLOG+WALL -# -# Possible values for the flags: -# -# SYSLOG - Write the message in the syslog -# WALL - Write the message to all users on the system -# EXEC - Execute NOTIFYCMD (see above) with the message -# IGNORE - Don't do anything -# -# If you use IGNORE, don't use any other flags on the same line. - -# -------------------------------------------------------------------------- -# RBWARNTIME - replace battery warning time in seconds -# -# upsmon will normally warn you about a battery that needs to be replaced -# every 43200 seconds, which is 12 hours. It does this by triggering a -# NOTIFY_REPLBATT which is then handled by the usual notify structure -# you've defined above. -# -# If this number is not to your liking, override it here. - -RBWARNTIME 43200 - -# -------------------------------------------------------------------------- -# NOCOMMWARNTIME - no communications warning time in seconds -# -# upsmon will let you know through the usual notify system if it can't -# talk to any of the UPS entries that are defined in this file. It will -# trigger a NOTIFY_NOCOMM by default every 300 seconds unless you -# change the interval with this directive. - -NOCOMMWARNTIME 300 - -# -------------------------------------------------------------------------- -# FINALDELAY - last sleep interval before shutting down the system -# -# On a master, upsmon will wait this long after sending the NOTIFY_SHUTDOWN -# before executing your SHUTDOWNCMD. If you need to do something in between -# those events, increase this number. Remember, at this point your UPS is -# almost depleted, so don't make this too high. -# -# Alternatively, you can set this very low so you don't wait around when -# it's time to shut down. Some UPSes don't give much warning for low -# battery and will require a value of 0 here for a safe shutdown. -# -# Note: If FINALDELAY on the slave is greater than HOSTSYNC on the master, -# the master will give up waiting for the slave to disconnect. - -FINALDELAY 5 - -# -------------------------------------------------------------------------- -# CERTPATH - path to certificates (database directory or directory with CA's) -# -# When compiled with SSL support, you can enter the certificate path here. -# -# With NSS: -# Certificates are stored in a dedicated database (splitted in 3 files). -# Specify the path of the database directory. -# -# CERTPATH /etc/nut/cert/upsmon -# -# With OpenSSL: -# Directory containing CA certificates in PEM format, used to verify -# the server certificate presented by the upsd server. The files each -# contain one CA certificate. The files are looked up by the CA subject -# name hash value, which must hence be available. -# -# CERTPATH /usr/ssl/certs -# -# See 'docs/security.txt' or the Security chapter of NUT user manual -# for more information on the SSL support in NUT. - -# -------------------------------------------------------------------------- -# CERTIDENT - self certificate name and database password -# CERTIDENT -# -# When compiled with SSL support with NSS, you can specify the certificate -# name to retrieve from database to authenticate itself and the password -# required to access certificate related private key. -# -# CERTIDENT "my nut monitor" "MyPasSw0rD" -# -# See 'docs/security.txt' or the Security chapter of NUT user manual -# for more information on the SSL support in NUT. - -# -------------------------------------------------------------------------- -# CERTHOST - security properties for an host -# CERTHOST -# -# When compiled with SSL support with NSS, you can specify security directive -# for each server you can contact. -# Each entry maps server name with the expected certificate name and flags -# indicating if the server certificate is verified and if the connection -# must be secure. -# -# CERTHOST localhost "My nut server" 1 1 -# -# See 'docs/security.txt' or the Security chapter of NUT user manual -# for more information on the SSL support in NUT. - -# -------------------------------------------------------------------------- -# CERTVERIFY - make upsmon verify all connections with certificates -# CERTVERIFY 1 -# -# When compiled with SSL support, make upsmon verify all connections with -# certificates. -# Without this, there is no guarantee that the upsd is the right host. -# Enabling this greatly reduces the risk of man in the middle attacks. -# This effectively forces the use of SSL, so don't use this unless -# all of your upsd hosts are ready for SSL and have their certificates -# in order. -# When compiled with NSS support of SSL, can be overriden for host -# specified with a CERTHOST directive. - - -# -------------------------------------------------------------------------- -# FORCESSL - force upsmon to use SSL -# FORCESSL 1 -# -# When compiled with SSL, specify that a secured connection must be used -# to communicate with upsd. -# If you don't use 'CERTVERIFY 1', then this will at least make sure -# that nobody can sniff your sessions without a large effort. Setting -# this will make upsmon drop connections if the remote upsd doesn't -# support SSL, so don't use it unless all of them have it running. -# When compiled with NSS support of SSL, can be overriden for host -# specified with a CERTHOST directive. diff --git a/conf/upsmon.conf.sample.in b/conf/upsmon.conf.sample.in index 6bb6a04..8703eb4 100644 --- a/conf/upsmon.conf.sample.in +++ b/conf/upsmon.conf.sample.in @@ -194,9 +194,12 @@ DEADTIME 15 # to shut down the load. You should check for this file's existence in # your shutdown scripts and run 'upsdrvctl shutdown' if it exists. # -# See the shutdown.txt file in the docs subdirectory for more information. +# See the config-notes.txt file in the docs subdirectory for more information. +# Refer to the section: +# [[UPS_shutdown]] "Configuring automatic shutdowns for low battery events" +# or refer to the online version. -POWERDOWNFLAG @CONFPATH@/killpower +POWERDOWNFLAG /etc/killpower # -------------------------------------------------------------------------- # NOTIFYMSG - change messages sent by upsmon when certain events occur diff --git a/config.guess b/config.guess index d622a44..1f5c50c 100755 --- a/config.guess +++ b/config.guess @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2012-02-10' +timestamp='2014-03-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -22,19 +20,17 @@ timestamp='2012-02-10' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -54,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -200,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} @@ -302,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -801,10 +820,13 @@ EOF i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; - i*:MSYS*:*) + *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) @@ -852,21 +874,21 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -879,59 +901,54 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -950,54 +967,63 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1201,6 +1227,9 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1227,19 +1256,31 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1256,7 +1297,7 @@ EOF NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1330,157 +1371,6 @@ EOF exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - cat >&2 <. @@ -26,11 +20,12 @@ timestamp='2012-04-18' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -73,9 +68,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -123,7 +116,7 @@ esac maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) @@ -156,7 +149,7 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; @@ -259,10 +252,12 @@ case $basic_machine in | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | be32 | be64 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ @@ -270,10 +265,11 @@ case $basic_machine in | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -287,23 +283,26 @@ case $basic_machine in | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | open8 \ - | or32 \ + | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ + | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ @@ -328,7 +327,7 @@ case $basic_machine in c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -370,13 +369,13 @@ case $basic_machine in | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ @@ -385,11 +384,13 @@ case $basic_machine in | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -403,18 +404,22 @@ case $basic_machine in | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ @@ -788,11 +793,15 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze*) basic_machine=microblaze-xilinx ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -820,6 +829,10 @@ case $basic_machine in basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos @@ -828,7 +841,7 @@ case $basic_machine in basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) - basic_machine=i386-pc + basic_machine=i686-pc os=-msys ;; mvs) @@ -1019,7 +1032,11 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1346,29 +1363,29 @@ case $os in -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1492,9 +1509,6 @@ case $os in -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; @@ -1543,6 +1557,9 @@ case $basic_machine in c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; hexagon-*) os=-elf ;; diff --git a/configure b/configure index 2fd661d..3210ecd 100755 --- a/configure +++ b/configure @@ -1,6 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for nut 2.7.2. +# Generated by GNU Autoconf 2.69 for nut 2.7.3. +# +# Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -272,10 +274,11 @@ fi $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: https://github.com/networkupstools/nut/issues about +$0: your system, including any error possibly output before +$0: this message. Then install a modern shell, or manually +$0: run the script under such a shell if you do have one." fi exit 1 fi @@ -587,9 +590,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='nut' PACKAGE_TARNAME='nut' -PACKAGE_VERSION='2.7.2' -PACKAGE_STRING='nut 2.7.2' -PACKAGE_BUGREPORT='' +PACKAGE_VERSION='2.7.3' +PACKAGE_STRING='nut 2.7.3' +PACKAGE_BUGREPORT='https://github.com/networkupstools/nut/issues' PACKAGE_URL='' ac_unique_file="server/upsd.c" @@ -682,6 +685,9 @@ LIBSSL_CFLAGS NUT_NETVERSION TREE_VERSION OS_NAME +now +SYSTEM_AIX_FALSE +SYSTEM_AIX_TRUE HAVE_ASPELL_FALSE HAVE_ASPELL_TRUE ASPELL @@ -723,6 +729,9 @@ HAVE_ASCIIDOC_FALSE HAVE_ASCIIDOC_TRUE WITH_ASCIIDOC_FALSE WITH_ASCIIDOC_TRUE +SOURCE_HIGHLIGHT +XMLLINT +XSLTPROC DBLATEX A2X ASCIIDOC @@ -738,6 +747,8 @@ WITH_OPENSSL_FALSE WITH_OPENSSL_TRUE WITH_NSS_FALSE WITH_NSS_TRUE +WITH_LINUX_I2C_FALSE +WITH_LINUX_I2C_TRUE WITH_MACOSX_FALSE WITH_MACOSX_TRUE WITH_FREEIPMI_FALSE @@ -795,6 +806,10 @@ CPPFLAGS LDFLAGS CFLAGS CC +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -871,6 +886,7 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking +enable_silent_rules enable_dependency_tracking enable_maintainer_mode with_all @@ -897,6 +913,7 @@ with_freeipmi with_freeipmi_includes with_freeipmi_libs with_macosx_ups +with_linux_i2c with_ssl with_nss with_openssl @@ -1494,7 +1511,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures nut 2.7.2 to adapt to many kinds of systems. +\`configure' configures nut 2.7.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1565,7 +1582,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of nut 2.7.2:";; + short | recursive ) echo "Configuration of nut 2.7.3:";; esac cat <<\_ACEOF @@ -1573,10 +1590,15 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] @@ -1588,7 +1610,7 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-all enable serial, usb, snmp, neon, ipmi, powerman, cgi, - dev, avahi + dev, avahi, linux_i2c --with-dev build and install the development files (no) --with-serial build and install serial drivers (yes) --with-usb build and install USB drivers (auto) @@ -1622,6 +1644,7 @@ Optional Packages: linker flags for the FreeIPMI library --with-macosx_ups build and install Mac OS X Power Sources meta-driver (auto) + --with-linux_i2c build and install i2c drivers (auto) --with-ssl enable SSL support (either NSS or OpenSSL) (auto) --with-nss enable SSL support using Mozilla NSS (auto) --with-openssl enable SSL support using OpenSSL (auto) @@ -1698,7 +1721,7 @@ Some influential environment variables: Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to the package provider. +Report bugs to . _ACEOF ac_status=$? fi @@ -1761,7 +1784,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -nut configure 2.7.2 +nut configure 2.7.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1920,6 +1943,10 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ------------------------------------------------------------ ## +## Report this to https://github.com/networkupstools/nut/issues ## +## ------------------------------------------------------------ ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 @@ -2347,7 +2374,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by nut $as_me 2.7.2, which was +It was created by nut $as_me 2.7.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2857,7 +2884,7 @@ test -n "$target_alias" && *-aix*) echo 'aix' ;; *-freebsd*) echo 'freebsd' ;; *-darwin*) echo 'darwin' ;; - *solaris*) echo 'Linux x86_64 + *solaris*) echo 'Linux unknown ' ;; *-hpux*) echo 'hpux' ;; esac @@ -2980,7 +3007,7 @@ $as_echo "$dist_cv_build_flavor" >&6; } ac_config_headers="$ac_config_headers include/config.h" -am__api_version='1.11' +am__api_version='1.14' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -3077,9 +3104,6 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -3090,32 +3114,40 @@ case `pwd` in esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$2" = conftest.file ) then @@ -3127,6 +3159,16 @@ Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -3137,8 +3179,8 @@ test "$program_suffix" != NONE && ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -3149,12 +3191,12 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then @@ -3166,10 +3208,10 @@ if test x"${install_sh}" != xset; then esac fi -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. +# will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. @@ -3308,12 +3350,6 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -3396,6 +3432,45 @@ else fi rmdir .tst 2>/dev/null +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." @@ -3418,7 +3493,7 @@ fi # Define the identity of the package. PACKAGE='nut' - VERSION='2.7.2' + VERSION='2.7.3' cat >>confdefs.h <<_ACEOF @@ -3446,12 +3521,22 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' @@ -3459,6 +3544,49 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro to enable system extensions" >&5 $as_echo_n "checking for autoconf macro to enable system extensions... " >&6; } @@ -3483,7 +3611,7 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -4316,6 +4444,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -4327,8 +4514,8 @@ else # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're @@ -4363,16 +4550,16 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -4381,8 +4568,8 @@ else test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else @@ -4390,7 +4577,7 @@ else fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -5526,6 +5713,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -5537,8 +5783,8 @@ else # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're @@ -5573,16 +5819,16 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -5591,8 +5837,8 @@ else test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else @@ -5600,7 +5846,7 @@ else fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -5654,131 +5900,6 @@ else fi -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -6185,8 +6306,8 @@ else # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're @@ -6221,16 +6342,16 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -6239,8 +6360,8 @@ else test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else @@ -6248,7 +6369,7 @@ else fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -6903,6 +7024,63 @@ cat >>confdefs.h <<_ACEOF _ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 +$as_echo_n "checking for unsigned long long int... " >&6; } +if ${ac_cv_type_unsigned_long_long_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_type_unsigned_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* For now, do not test the preprocessor; as of 2007 there are too many + implementations with broken preprocessors. Perhaps this can + be revisited in 2012. In the meantime, code should not expect + #if to work with literals wider than 32 bits. */ + /* Test literals. */ + long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + unsigned long long int ull = 18446744073709551615ULL; + /* Test constant expressions. */ + typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) + ? 1 : -1)]; + typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63; +int +main () +{ +/* Test availability of runtime routines for shift and division. */ + long long int llmax = 9223372036854775807ll; + unsigned long long int ullmax = 18446744073709551615ull; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll) + | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) + | (ullmax / ull) | (ullmax % ull)); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + ac_cv_type_unsigned_long_long_int=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 +$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } + if test $ac_cv_type_unsigned_long_long_int = yes; then + +$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h + + fi + for ac_func in vsnprintf snprintf do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -6963,75 +7141,47 @@ $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 $as_echo_n "checking for long long int... " >&6; } if ${ac_cv_type_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - /* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63; -int -main () -{ -/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull)); - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if test "$cross_compiling" = yes; then : ac_cv_type_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + if test "$cross_compiling" = yes; then : + : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - #ifndef LLONG_MAX - # define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - # define LLONG_MAX (HALF - 1 + HALF) - #endif + #ifndef LLONG_MAX + # define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + # define LLONG_MAX (HALF - 1 + HALF) + #endif int main () { long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - ac_cv_type_long_long_int=yes + else ac_cv_type_long_long_int=no fi @@ -7039,11 +7189,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi -else - ac_cv_type_long_long_int=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + fi + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 $as_echo "$ac_cv_type_long_long_int" >&6; } @@ -7778,6 +7925,7 @@ if test "${with_all+set}" = set; then : if test -z "${with_dev}"; then with_dev="${withval}"; fi if test -z "${with_avahi}"; then with_avahi="${withval}"; fi if test -z "${with_ipmi}"; then with_ipmi="${withval}"; fi + if test -z "${with_linux_i2c}"; then with_linux_i2c="${withval}"; fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"${withval}\"" >&5 $as_echo "\"${withval}\"" >&6; } else @@ -9918,6 +10066,115 @@ _ACEOF +# Check whether --with-linux_i2c was given. +if test "${with_linux_i2c+set}" = set; then : + withval=$with_linux_i2c; nut_with_linux_i2c="${withval}" +else + nut_with_linux_i2c="auto" + +fi + + +if test "${nut_with_linux_i2c}" != no; then + case ${target_os} in + linux* ) + ac_fn_c_check_decl "$LINENO" "i2c_smbus_read_word_data" "ac_cv_have_decl_i2c_smbus_read_word_data" "#include + #include + + +" +if test "x$ac_cv_have_decl_i2c_smbus_read_word_data" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_I2C_SMBUS_READ_WORD_DATA $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + nut_with_linux_i2c="yes" +else + nut_with_linux_i2c="no" +fi +ac_fn_c_check_decl "$LINENO" "i2c_smbus_write_word_data" "ac_cv_have_decl_i2c_smbus_write_word_data" "#include + #include + + +" +if test "x$ac_cv_have_decl_i2c_smbus_write_word_data" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_I2C_SMBUS_WRITE_WORD_DATA $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + nut_with_linux_i2c="yes" +else + nut_with_linux_i2c="no" +fi +ac_fn_c_check_decl "$LINENO" "i2c_smbus_read_block_data" "ac_cv_have_decl_i2c_smbus_read_block_data" "#include + #include + + +" +if test "x$ac_cv_have_decl_i2c_smbus_read_block_data" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_I2C_SMBUS_READ_BLOCK_DATA $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + nut_with_linux_i2c="yes" +else + nut_with_linux_i2c="no" +fi + + ;; + * ) + nut_with_linux_i2c="no" + ;; + esac +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build i2c based drivers" >&5 +$as_echo_n "checking whether to build i2c based drivers... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_linux_i2c} " >&5 +$as_echo "${nut_with_linux_i2c} " >&6; } + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature + fi + echo "build i2c based drivers: ${nut_with_linux_i2c} " >> conf_nut_report_feature + + + if test "${nut_with_linux_i2c}" = "yes"; then + WITH_LINUX_I2C_TRUE= + WITH_LINUX_I2C_FALSE='#' +else + WITH_LINUX_I2C_TRUE='#' + WITH_LINUX_I2C_FALSE= +fi + + if test "${nut_with_linux_i2c}" = "yes"; then + +cat >>confdefs.h <<_ACEOF +#define WITH_LINUX_I2C 1 +_ACEOF + + fi + + + nut_ssl_lib="" @@ -11248,8 +11505,162 @@ $as_echo_n "checking for dblatex version... " >&6; } $as_echo "${DBLATEX_VERSION} found" >&6; } fi + for ac_prog in xsltproc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_XSLTPROC+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $XSLTPROC in + [\\/]* | ?:[\\/]*) + ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +XSLTPROC=$ac_cv_path_XSLTPROC +if test -n "$XSLTPROC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 +$as_echo "$XSLTPROC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$XSLTPROC" && break +done + + if test -n "${XSLTPROC}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltproc version" >&5 +$as_echo_n "checking for xsltproc version... " >&6; } + XSLTPROC_VERSION="`${XSLTPROC} --version 2>/dev/null`" + XSLTPROC_VERSION="${XSLTPROC_VERSION##* }" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${XSLTPROC_VERSION} found" >&5 +$as_echo "${XSLTPROC_VERSION} found" >&6; } fi + for ac_prog in xmllint +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_XMLLINT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $XMLLINT in + [\\/]* | ?:[\\/]*) + ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +XMLLINT=$ac_cv_path_XMLLINT +if test -n "$XMLLINT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5 +$as_echo "$XMLLINT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$XMLLINT" && break +done + + if test -n "${XMLLINT}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmllint version" >&5 +$as_echo_n "checking for xmllint version... " >&6; } + XMLLINT_VERSION="`${XMLLINT} --version 2>/dev/null`" + XMLLINT_VERSION="${XMLLINT_VERSION##* }" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${XMLLINT_VERSION} found" >&5 +$as_echo "${XMLLINT_VERSION} found" >&6; } + fi + + for ac_prog in source-highlight +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_SOURCE_HIGHLIGHT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $SOURCE_HIGHLIGHT in + [\\/]* | ?:[\\/]*) + ac_cv_path_SOURCE_HIGHLIGHT="$SOURCE_HIGHLIGHT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_SOURCE_HIGHLIGHT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +SOURCE_HIGHLIGHT=$ac_cv_path_SOURCE_HIGHLIGHT +if test -n "$SOURCE_HIGHLIGHT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOURCE_HIGHLIGHT" >&5 +$as_echo "$SOURCE_HIGHLIGHT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$SOURCE_HIGHLIGHT" && break +done + + +fi + case "${nut_with_doc}" in yes|all|auto) @@ -11266,8 +11677,8 @@ esac for nut_doc_build_target in ${nut_doc_build_list}; do case "${nut_doc_build_target}" in html-single) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if asciidoc version can build ${nut_doc_build_target}" >&5 -$as_echo_n "checking if asciidoc version can build ${nut_doc_build_target}... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if asciidoc version can build ${nut_doc_build_target} (minimum required 8.6.3)" >&5 +$as_echo_n "checking if asciidoc version can build ${nut_doc_build_target} (minimum required 8.6.3)... " >&6; } @@ -11315,8 +11726,8 @@ $as_echo "no" >&6; } ;; html-chunked) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if a2x version can build ${nut_doc_build_target}" >&5 -$as_echo_n "checking if a2x version can build ${nut_doc_build_target}... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if a2x version can build ${nut_doc_build_target} (minimum required 8.6.3)" >&5 +$as_echo_n "checking if a2x version can build ${nut_doc_build_target} (minimum required 8.6.3)... " >&6; } @@ -11364,8 +11775,8 @@ $as_echo "no" >&6; } ;; pdf) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dblatex version can build ${nut_doc_build_target}" >&5 -$as_echo_n "checking if dblatex version can build ${nut_doc_build_target}... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dblatex version can build ${nut_doc_build_target} (minimum required 0.2.5)" >&5 +$as_echo_n "checking if dblatex version can build ${nut_doc_build_target} (minimum required 0.2.5)... " >&6; } @@ -11428,7 +11839,7 @@ no) if test -z "${DOC_NOBUILD_LIST}"; then nut_with_doc="yes" else - as_fn_error $? "\"Unable to build ${DOC_NOBUILD_LIST} documentation\"" "$LINENO" 5 + as_fn_error $? "\"Unable to build ${DOC_NOBUILD_LIST} documentation (check for 'no' results above)\"" "$LINENO" 5 fi ;; esac @@ -11526,6 +11937,38 @@ $as_echo "no" >&6; } fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if xsltproc is present (mandatory for man page regeneration)" >&5 +$as_echo_n "checking if xsltproc is present (mandatory for man page regeneration)... " >&6; } +if test -n "${XSLTPROC}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + nut_have_asciidoc="no" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if xmllint is present (mandatory for man page regeneration)" >&5 +$as_echo_n "checking if xmllint is present (mandatory for man page regeneration)... " >&6; } +if test -n "${XMLLINT}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + nut_have_asciidoc="no" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if source-highlight is present (preferable for documentation generation)" >&5 +$as_echo_n "checking if source-highlight is present (preferable for documentation generation)... " >&6; } +if test -n "${SOURCE_HIGHLIGHT}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build and install documentation" >&5 $as_echo_n "checking whether to build and install documentation... " >&6; } @@ -13785,7 +14228,7 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -13810,7 +14253,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ;; esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -13829,7 +14275,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -22532,7 +22981,6 @@ if test -n "${systemdsystemunitdir}"; then systemdsystemshutdowndir="${libdir}/systemd/system-shutdown" { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${systemdsystemunitdir}" >&5 $as_echo "using ${systemdsystemunitdir}" >&6; } - systemdsystemunitdir="`echo ${systemdsystemunitdir} | sed 's/\/lib/\${libdir}/'`" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -22830,6 +23278,21 @@ else fi + if test "xAIX" = "x`uname -s 2>/dev/null`"; then + SYSTEM_AIX_TRUE= + SYSTEM_AIX_FALSE='#' +else + SYSTEM_AIX_TRUE='#' + SYSTEM_AIX_FALSE= +fi + + + +cat >>confdefs.h <<_ACEOF +#define CPU_TYPE $target_cpu +_ACEOF + + conftemp="${sysconfdir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" @@ -22870,6 +23333,7 @@ cat >>confdefs.h <<_ACEOF _ACEOF +now=`TZ=UTC date +%Y-%m-%d` @@ -22920,7 +23384,9 @@ _ACEOF -ac_config_files="$ac_config_files clients/Makefile common/Makefile conf/Makefile conf/upsmon.conf.sample conf/upssched.conf.sample data/html/header.html data/html/Makefile data/Makefile data/driver.list docs/Makefile docs/man/Makefile drivers/Makefile include/Makefile lib/libupsclient-config lib/libupsclient.pc lib/libnutclient.pc lib/libnutscan.pc lib/Makefile scripts/augeas/Makefile scripts/augeas/nutnutconf.aug scripts/augeas/nutupsconf.aug scripts/augeas/nutupsdconf.aug scripts/augeas/nutupsdusers.aug scripts/augeas/nutupsmonconf.aug scripts/augeas/nutupsschedconf.aug scripts/augeas/nuthostsconf.aug scripts/augeas/nutupssetconf.aug scripts/avahi/nut.service scripts/devd/Makefile scripts/devd/nut-usb.conf scripts/hotplug/Makefile scripts/hotplug/libhidups scripts/HP-UX/nut.psf scripts/HP-UX/postinstall scripts/python/Makefile scripts/systemd/Makefile scripts/systemd/nut-driver.service scripts/systemd/nut-monitor.service scripts/systemd/nut-server.service scripts/systemd/nutshutdown scripts/Solaris/Makefile scripts/Solaris/pkginfo scripts/Solaris/postinstall scripts/Solaris/preremove scripts/Solaris/nut scripts/udev/Makefile scripts/udev/nut-ipmipsu.rules scripts/udev/nut-usbups.rules scripts/ufw/nut.ufw.profile scripts/Makefile server/Makefile tools/Makefile tools/nut-scanner/Makefile tests/Makefile Makefile" + + +ac_config_files="$ac_config_files clients/Makefile common/Makefile conf/Makefile conf/upsmon.conf.sample conf/upssched.conf.sample data/html/header.html data/html/Makefile data/Makefile data/driver.list docs/Makefile docs/docinfo.xml docs/man/Makefile drivers/Makefile include/Makefile lib/libupsclient-config lib/libupsclient.pc lib/libnutclient.pc lib/libnutscan.pc lib/Makefile scripts/Aix/nut-aix.spec scripts/augeas/Makefile scripts/augeas/nutnutconf.aug scripts/augeas/nutupsconf.aug scripts/augeas/nutupsdconf.aug scripts/augeas/nutupsdusers.aug scripts/augeas/nutupsmonconf.aug scripts/augeas/nutupsschedconf.aug scripts/augeas/nuthostsconf.aug scripts/augeas/nutupssetconf.aug scripts/avahi/nut.service scripts/devd/Makefile scripts/devd/nut-usb.conf scripts/hotplug/Makefile scripts/hotplug/libhidups scripts/HP-UX/nut.psf scripts/HP-UX/postinstall scripts/python/Makefile scripts/systemd/Makefile scripts/systemd/nut-driver.service scripts/systemd/nut-monitor.service scripts/systemd/nut-server.service scripts/systemd/nutshutdown scripts/Solaris/Makefile scripts/Solaris/pkginfo scripts/Solaris/postinstall scripts/Solaris/preremove scripts/Solaris/nut scripts/udev/Makefile scripts/udev/nut-ipmipsu.rules scripts/udev/nut-usbups.rules scripts/ufw/nut.ufw.profile scripts/Makefile server/Makefile tools/Makefile tools/nut-scanner/Makefile tests/Makefile Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -23031,6 +23497,14 @@ LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -23100,6 +23574,10 @@ if test -z "${WITH_MACOSX_TRUE}" && test -z "${WITH_MACOSX_FALSE}"; then as_fn_error $? "conditional \"WITH_MACOSX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${WITH_LINUX_I2C_TRUE}" && test -z "${WITH_LINUX_I2C_FALSE}"; then + as_fn_error $? "conditional \"WITH_LINUX_I2C\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${WITH_NSS_TRUE}" && test -z "${WITH_NSS_FALSE}"; then as_fn_error $? "conditional \"WITH_NSS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -23172,6 +23650,10 @@ if test -z "${HAVE_ASPELL_TRUE}" && test -z "${HAVE_ASPELL_FALSE}"; then as_fn_error $? "conditional \"HAVE_ASPELL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${SYSTEM_AIX_TRUE}" && test -z "${SYSTEM_AIX_FALSE}"; then + as_fn_error $? "conditional \"SYSTEM_AIX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -23569,7 +24051,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by nut $as_me 2.7.2, which was +This file was extended by nut $as_me 2.7.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23629,13 +24111,13 @@ $config_headers Configuration commands: $config_commands -Report bugs to the package provider." +Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -nut config.status 2.7.2 +nut config.status 2.7.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -24152,6 +24634,7 @@ do "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; "data/driver.list") CONFIG_FILES="$CONFIG_FILES data/driver.list" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; + "docs/docinfo.xml") CONFIG_FILES="$CONFIG_FILES docs/docinfo.xml" ;; "docs/man/Makefile") CONFIG_FILES="$CONFIG_FILES docs/man/Makefile" ;; "drivers/Makefile") CONFIG_FILES="$CONFIG_FILES drivers/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; @@ -24160,6 +24643,7 @@ do "lib/libnutclient.pc") CONFIG_FILES="$CONFIG_FILES lib/libnutclient.pc" ;; "lib/libnutscan.pc") CONFIG_FILES="$CONFIG_FILES lib/libnutscan.pc" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; + "scripts/Aix/nut-aix.spec") CONFIG_FILES="$CONFIG_FILES scripts/Aix/nut-aix.spec" ;; "scripts/augeas/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/augeas/Makefile" ;; "scripts/augeas/nutnutconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutnutconf.aug" ;; "scripts/augeas/nutupsconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupsconf.aug" ;; @@ -24793,7 +25277,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -24806,7 +25290,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -24840,21 +25324,19 @@ $as_echo X"$mf" | continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || diff --git a/configure.ac b/configure.ac index ce8b2c5..f87be6d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,9 @@ dnl +------------------------------------------------------------------+ -dnl | Network UPS Tools: configure.in | +dnl | Network UPS Tools: configure.ac | dnl +------------------------------------------------------------------+ dnl NUT version number is defined here, with a Git suffix in include/nut_version.h -AC_INIT(nut, 2.7.2) +AC_INIT(nut, 2.7.3, [https://github.com/networkupstools/nut/issues]) AC_CONFIG_SRCDIR(server/upsd.c) AC_CONFIG_MACRO_DIR([m4]) echo "Network UPS Tools version ${PACKAGE_VERSION}" @@ -11,7 +11,7 @@ AC_CANONICAL_SYSTEM NUT_CHECK_OS AC_CONFIG_HEADER(include/config.h) AC_PREFIX_DEFAULT(/usr/local/ups) -AM_INIT_AUTOMAKE +AM_INIT_AUTOMAKE([subdir-objects]) dnl we need Autoconf 2.60 or better to enable features of Posix that are extensions to C AC_MSG_CHECKING(for autoconf macro to enable system extensions) @@ -23,7 +23,7 @@ m4_version_prereq(2.60, [ ]) dnl Use "./configure --enable-maintainer-mode" to keep Makefile.in and Makefile -dnl in sync after SVN updates. +dnl in sync after Git updates. AM_MAINTAINER_MODE dnl PKG_PROG_PKG_CONFIG @@ -42,6 +42,8 @@ dnl However, automatically define the tree version (mostly for AC_SUBST) TREE_VERSION="`echo ${PACKAGE_VERSION} | awk '{ print substr($0,1,3) }'`" AC_DEFINE_UNQUOTED(TREE_VERSION, "${TREE_VERSION}", [NUT tree version]) +dnl Should not be necessary, since old servers have well-defined errors for +dnl unsupported commands: NUT_NETVERSION="1.2" AC_DEFINE_UNQUOTED(NUT_NETVERSION, "${NUT_NETVERSION}", [NUT network protocol version]) @@ -221,7 +223,7 @@ dnl check for --with-all (or --without-all, or --with-all=auto) flag AC_MSG_CHECKING(for --with-all) AC_ARG_WITH(all, - AS_HELP_STRING([--with-all], [enable serial, usb, snmp, neon, ipmi, powerman, cgi, dev, avahi]), + AS_HELP_STRING([--with-all], [enable serial, usb, snmp, neon, ipmi, powerman, cgi, dev, avahi, linux_i2c]), [ if test -n "${withval}"; then dnl Note: we allow "no" as a positive value, because @@ -235,6 +237,7 @@ AC_ARG_WITH(all, if test -z "${with_dev}"; then with_dev="${withval}"; fi if test -z "${with_avahi}"; then with_avahi="${withval}"; fi if test -z "${with_ipmi}"; then with_ipmi="${withval}"; fi + if test -z "${with_linux_i2c}"; then with_linux_i2c="${withval}"; fi AC_MSG_RESULT("${withval}") else AC_MSG_RESULT(not given) @@ -464,6 +467,35 @@ NUT_REPORT_FEATURE([build Mac OS X meta-driver], [${nut_with_macosx_ups}], [${nut_macosx_ups_lib}], [WITH_MACOSX], [Define to enable Mac OS X meta-driver]) +dnl ---------------------------------------------------------------------- +dnl checks related to --with_linux_i2c +dnl Check for i2c header on Linux, used for ASEM UPS driver +NUT_ARG_WITH([linux_i2c], [build and install i2c drivers], [auto]) +if test "${nut_with_linux_i2c}" != no; then + case ${target_os} in + linux* ) + AC_CHECK_DECLS( + [i2c_smbus_read_word_data, i2c_smbus_write_word_data, i2c_smbus_read_block_data], + [nut_with_linux_i2c="yes"], + [nut_with_linux_i2c="no"], + [#include + #include + ] + ) + ;; + * ) + nut_with_linux_i2c="no" + ;; + esac +fi +NUT_REPORT_FEATURE( + [build i2c based drivers], + [${nut_with_linux_i2c}], + [], + [WITH_LINUX_I2C], + [Define to enable I2C support] +) + dnl ---------------------------------------------------------------------- dnl Check for with-ssl, and --with-nss or --with-openssl dnl Only one can be enabled at a time, with a preference for OpenSSL @@ -611,7 +643,7 @@ esac for nut_doc_build_target in ${nut_doc_build_list}; do case "${nut_doc_build_target}" in html-single) - AC_MSG_CHECKING([if asciidoc version can build ${nut_doc_build_target}]) + AC_MSG_CHECKING([if asciidoc version can build ${nut_doc_build_target} (minimum required 8.6.3)]) AX_COMPARE_VERSION([${ASCIIDOC_VERSION}], [ge], [8.6.3], [ AC_MSG_RESULT(yes) DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" @@ -622,7 +654,7 @@ for nut_doc_build_target in ${nut_doc_build_list}; do ;; html-chunked) - AC_MSG_CHECKING([if a2x version can build ${nut_doc_build_target}]) + AC_MSG_CHECKING([if a2x version can build ${nut_doc_build_target} (minimum required 8.6.3)]) AX_COMPARE_VERSION([${A2X_VERSION}], [ge], [8.6.3], [ AC_MSG_RESULT(yes) DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" @@ -633,7 +665,7 @@ for nut_doc_build_target in ${nut_doc_build_list}; do ;; pdf) - AC_MSG_CHECKING([if dblatex version can build ${nut_doc_build_target}]) + AC_MSG_CHECKING([if dblatex version can build ${nut_doc_build_target} (minimum required 0.2.5)]) AX_COMPARE_VERSION([${DBLATEX_VERSION}], [ge], [0.2.5], [ AC_MSG_RESULT(yes) DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" @@ -659,7 +691,7 @@ no) if test -z "${DOC_NOBUILD_LIST}"; then nut_with_doc="yes" else - AC_MSG_ERROR(["Unable to build ${DOC_NOBUILD_LIST} documentation"]) + AC_MSG_ERROR(["Unable to build ${DOC_NOBUILD_LIST} documentation (check for 'no' results above)"]) fi ;; esac @@ -681,6 +713,31 @@ AX_COMPARE_VERSION([${A2X_VERSION}], [ge], [8.6.3], [ nut_have_asciidoc="no" ]) +dnl TODO: test for docbook-xsl files (maybe build a test man page?) +dnl https://github.com/networkupstools/nut/issues/162 +AC_MSG_CHECKING([if xsltproc is present (mandatory for man page regeneration)]) +if test -n "${XSLTPROC}"; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) + nut_have_asciidoc="no" +fi + +AC_MSG_CHECKING([if xmllint is present (mandatory for man page regeneration)]) +if test -n "${XMLLINT}"; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) + nut_have_asciidoc="no" +fi + +AC_MSG_CHECKING([if source-highlight is present (preferable for documentation generation)]) +if test -n "${SOURCE_HIGHLIGHT}"; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + NUT_REPORT_FEATURE([build and install documentation], [${nut_with_doc}], [], [WITH_ASCIIDOC], [Define to enable Asciidoc support]) @@ -1010,7 +1067,6 @@ dnl files will try to get intalled to the actual system directories if test -n "${systemdsystemunitdir}"; then systemdsystemshutdowndir="${libdir}/systemd/system-shutdown" AC_MSG_RESULT(using ${systemdsystemunitdir}) - systemdsystemunitdir="`echo ${systemdsystemunitdir} | sed 's/\/lib/\${libdir}/'`" else AC_MSG_RESULT(no) fi @@ -1112,6 +1168,12 @@ dnl check for spell checking deps AC_PATH_PROGS([ASPELL], [aspell], [none]) AM_CONDITIONAL([HAVE_ASPELL], [test "x$ASPELL" != "xnone"]) +dnl AIX system +AM_CONDITIONAL([SYSTEM_AIX], [test "xAIX" = "x`uname -s 2>/dev/null`"]) + +dnl processor type +AC_DEFINE_UNQUOTED(CPU_TYPE, $target_cpu, [Define processor type]) + dnl expand ${sysconfdir} and write it out conftemp="${sysconfdir}" eval conftemp=\"${conftemp}\" @@ -1140,6 +1202,10 @@ eval conftemp=\"${conftemp}\" SBINDIR=${conftemp} AC_DEFINE_UNQUOTED(SBINDIR, "${conftemp}", [Default path for system executables]) +dnl Current date +now=`TZ=UTC date +%Y-%m-%d` + +AC_SUBST(now) AC_SUBST(OS_NAME) AC_SUBST(TREE_VERSION) AC_SUBST(NUT_NETVERSION) @@ -1201,6 +1267,7 @@ AC_OUTPUT([ data/Makefile data/driver.list docs/Makefile + docs/docinfo.xml docs/man/Makefile drivers/Makefile include/Makefile @@ -1209,6 +1276,7 @@ AC_OUTPUT([ lib/libnutclient.pc lib/libnutscan.pc lib/Makefile + scripts/Aix/nut-aix.spec scripts/augeas/Makefile scripts/augeas/nutnutconf.aug scripts/augeas/nutupsconf.aug diff --git a/data/Makefile.in b/data/Makefile.in index 96bf232..5a010e3 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,23 +17,51 @@ # Network UPS Tools: data VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -55,8 +82,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = data -DIST_COMMON = $(dist_data_DATA) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/driver.list.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/driver.list.in $(dist_data_DATA) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -85,15 +112,28 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = driver.list CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -130,9 +170,29 @@ am__installdirs = "$(DESTDIR)$(datadir)" "$(DESTDIR)$(datadir)" DATA = $(dist_data_DATA) $(nodist_data_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -165,6 +225,7 @@ am__relativize = \ A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -271,12 +332,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -321,6 +385,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -431,22 +496,25 @@ uninstall-nodist_dataDATA: dir='$(DESTDIR)$(datadir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -461,57 +529,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -527,12 +550,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -544,15 +562,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -561,6 +575,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -724,24 +753,22 @@ ps-am: uninstall-am: uninstall-dist_dataDATA uninstall-nodist_dataDATA -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dist_dataDATA install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-nodist_dataDATA install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-dist_dataDATA \ - uninstall-nodist_dataDATA +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dist_dataDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-nodist_dataDATA \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-dist_dataDATA uninstall-nodist_dataDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/data/cmdvartab b/data/cmdvartab index 8bef408..ef68d70 100644 --- a/data/cmdvartab +++ b/data/cmdvartab @@ -20,6 +20,7 @@ VARDESC ups.firmware "UPS firmware" VARDESC ups.firmware.aux "Auxiliary device firmware" VARDESC ups.temperature "UPS temperature (degrees C)" VARDESC ups.load "Load on UPS (percent of full)" +VARDESC ups.load.energysave "Load on UPS that triggers energysave (percent)" VARDESC ups.load.high "Load when UPS switches to overload condition (percent)" VARDESC ups.id "UPS system identifier" VARDESC ups.delay.start "Interval to wait before (re)starting the load (seconds)" @@ -67,6 +68,10 @@ VARDESC input.transfer.boost.low "Low voltage boosting transfer point (V)" VARDESC input.transfer.boost.high "High voltage boosting transfer point (V)" VARDESC input.transfer.trim.low "Low voltage trimming transfer point (V)" VARDESC input.transfer.trim.high "High voltage trimming transfer point (V)" +VARDESC input.transfer.delay "Delay before transfer to mains" +VARDESC input.load "Load on (ePDU) input (percent of full)" +VARDESC input.realpower "Current sum value of all (ePDU) phases real power (W)" +VARDESC input.power "Current sum value of all (ePDU) phases apparent power (VA)" VARDESC output.voltage "Output voltage (V)" VARDESC output.voltage.nominal "Nominal output voltage (V)" @@ -94,6 +99,10 @@ VARDESC battery.packs.bad "Number of bad battery packs" VARDESC battery.type "Battery chemistry" VARDESC battery.protection "Prevent deep discharge of battery" VARDESC battery.energysave "Switch off when running on battery and no/low load" +VARDESC battery.energysave.load "Switch off UPS if on battery and load level lower (percent)" +VARDESC battery.energysave.delay "Delay before switch off UPS if on battery and load level low (min)" +VARDESC battery.energysave.realpower "Switch off UPS if on battery and load level lower (Watts)" +VARDESC battery.charger.status "Battery charger status" VARDESC ambient.temperature "Ambient temperature (degrees C)" VARDESC ambient.temperature.alarm "Ambient temperature alarm is active" @@ -179,8 +188,10 @@ CMDDESC beeper.mute "Temporarily mute the UPS beeper" CMDDESC beeper.toggle "Toggle the UPS beeper" CMDDESC outlet.1.load.off "Turn off the load on outlet 1 immediately" CMDDESC outlet.1.load.on "Turn on the load on outlet 1 immediately" +CMDDESC outlet.1.shutdown.return "Turn off the outlet 1 and return when power is back" CMDDESC outlet.2.load.off "Turn off the load on outlet 2 immediately" CMDDESC outlet.2.load.on "Turn on the load on outlet 2 immediately" +CMDDESC outlet.2.shutdown.return "Turn off the outlet 2 and return when power is back" # The following two commands should *only* be defined when you need # to compose a 'shutdown.return' command by sending both a switch-off diff --git a/data/driver.list.in b/data/driver.list.in index 45db598..a0e82fb 100644 --- a/data/driver.list.in +++ b/data/driver.list.in @@ -48,6 +48,8 @@ "AEG Power Solutions" "ups" "2" "PROTECT HOME" "" "blazer_ser or blazer_usb" +"APC" "ups" "2" "Back-UPS 1200BR (Microsol)" "" "solis" +"APC" "ups" "2" "Back-UPS BZ2200BI-BR (Microsol)" "" "solis" "APC" "ups" "1" "Back-UPS Pro" "" "apcsmart" "APC" "ups" "1" "Matrix-UPS" "" "apcsmart" "APC" "ups" "1" "Smart-UPS" "" "apcsmart" @@ -91,6 +93,8 @@ "ARTronic" "ups" "2" "ARTon Platinium Combo 3.1 10/15/20 kVA" "USB" "blazer_usb" "ARTronic" "ups" "2" "ARTon Platinium RT 1/2/3/6/10 kVA" "USB" "blazer_usb" +"ASEM SPA" "UPS" "5" "PB1300 UPS" "i2c" "asem" + "ATEK" "ups" "2" "Defensor 1K Tower / Rack" "USB" "blazer_usb" "ATEK" "ups" "2" "Defensor 2K Tower / Rack" "USB" "blazer_usb" "ATEK" "ups" "2" "Defensor 3K Tower / Rack" "USB" "blazer_usb" @@ -120,6 +124,7 @@ "Belkin" "ups" "2" "F6H375-USB" "USB (<= 2005 models, vendor id: 050d)" "usbhid-ups" "Belkin" "ups" "2" "F6H375-USB" "USB (2007 models, vendor id: 0665)" "blazer_usb" "Belkin" "ups" "2" "Office Series F6C550-AVR" "USB" "usbhid-ups" +"Belkin" "ups" "3" "Regulator PRO-USB" "USB (~2000, product id: 0f51)" "usbhid-ups" "Belkin" "ups" "2" "Regulator Pro" "F6C525-SER, F6C625-SER" "belkin" "Belkin" "ups" "1" "Resource" "" "genericups upstype=4" "Belkin" "ups" "2" "Small Enterprise F6C1500-TW-RK" "serial port" "belkin" @@ -203,6 +208,7 @@ "Cyber Power Systems" "ups" "2" "Value 400E" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "2" "Value 600E" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "2" "Value 800E" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "Value 1500ELCD-RU" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "2" "CP900AVR" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "2" "CP1000AVRLCD" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "2" "CP1350AVRLCD" "USB" "usbhid-ups" @@ -319,6 +325,8 @@ "ETA" "ups" "1" "mini+UPS" "WinNT/Upsoft cable" "genericups upstype=7" "ETA" "ups" "1" "mini+UPS PRO" "UPS Explorer cable" "etapro" +"EUROCASE" "ups" "2" "EA200N 2000VA" "USB" "nutdrv_qx" # http://partis.cz/index.php?gid=2551 + "EVER" "ups" "1" "NET DPC series" "Serial port" "everups" "EVER" "ups" "1" "AP Pro series" "Serial port" "everups" "EVER" "ups" "1" "625/1000" "" "safenet" @@ -341,6 +349,7 @@ "Fairstone" "ups" "1" "L525/L625/L750" "" "safenet" "Fideltronik" "ups" "1" "Ares 700 and larger" "" "genericups upstype=6" +"Fideltronik" "ups" "2" "LUPUS 500" "USB" "nutdrv_qx" "Fideltronik" "ups" "1" "Other Ares models" "" "genericups upstype=19" "Fiskars" "ups" "4" "PowerRite MAX" "" "upscode2" @@ -348,6 +357,10 @@ "Fiskars" "ups" "4" "PowerServer 30" "" "upscode2" "Fiskars" "ups" "4" "9200" "UPS Information Unit" "upscode2" +"Flight Technic & International (FTUPS)" "ups" "2" "FT-1000BS" "Serial" "nutdrv_qx" +"Flight Technic & International (FTUPS)" "ups" "2" "FT-1000BS" "USB" "nutdrv_qx" +"Flight Technic & International (FTUPS)" "ups" "2" "FT-1000BS(T)" "Serial" "nutdrv_qx" +"Flight Technic & International (FTUPS)" "ups" "2" "FT-1000BS(T)" "USB" "nutdrv_qx" "Flight Technic & International (FTUPS)" "ups" "2" "Smart On Line UPS 1KVA" "Serial" "nutdrv_qx" "Flight Technic & International (FTUPS)" "ups" "2" "Smart On Line UPS 1KVA" "USB" "nutdrv_qx" "Flight Technic & International (FTUPS)" "ups" "2" "(various)" "Serial" "nutdrv_qx" @@ -372,6 +385,8 @@ "Gemini" "ups" "1" "UPS625/UPS1000" "" "safenet" +"Grafenthal" "ups" "2" "PR-3000-HS" "SNMP/Web Minislot card (ref 149G0006)" "snmp-ups" # http://grafenthal.de/produkte/usv/online/pr-hs-serie/pr-3000-hs/?L=3et8 + "Gtec" "ups" "2" "ZP120N-1K / ZP120N-1KS / ZP120N-2K / ZP120N-2KS / ZP120N-3K / ZP120N-3KS" "" "blazer_usb" "Gtec" "ups" "2" "ZP120N-6K / ZP120N-6KS / ZP120N-10K-11 / ZP120N-10KS-11" "" "blazer_usb" "Gtec" "ups" "2" "ZP120N-10K-31-00 / ZP120N-10K-31-07 / ZP120N-10K-31-09 / ZP120N-10K-31-99 / ZP120N-20K" "USB port" "blazer_usb" @@ -445,6 +460,8 @@ "Jageson Technology" "ups" "1" "Jasuny USPS" "" "genericups upstype=4" +"JAWAN" "ups" "2" "JW-UPSLC02" "USB" "blazer_usb" + "Kanji" "ups" "1" "800 VA" "USB" "nutdrv_atcl_usb" "Kebo" "ups" "2" "1200D/D Series" "" "blazer_ser" @@ -457,6 +474,8 @@ "Krauler" "ups" "2" "UP-D1200VA" "USB" "blazer_usb" "Krauler" "ups" "2" "UP-M500VA" "USB" "blazer_usb" +"Lacerda" "ups" "2" "New Orion 800VA" "USB" "blazer_usb" + "LDLC" "ups" "2" "UPS-1200D" "" "blazer_usb langid_fix=0x4095" "Lestar" "ups" "2" "MD-800E" "" "blazer_ser" @@ -478,6 +497,7 @@ "Maxxtro" "ups" "2" "UPS 600 VA" "serial port" "blazer_ser" +"Mecer" "ups" "2" "ME-1000-WTU" "USB" "nutdrv_qx" # http://www.comx-computers.co.za/download/mecer/ME-1000-WTU.pdf "Mecer" "ups" "2" "ME-2000" "" "blazer_ser" "Meta System" "ups" "1" "HF Line" "1..4 boards" "metasys" @@ -696,6 +716,14 @@ "Neus" "ups" "2" "400va / 600va" "" "blazer_ser" +"NHS Sistemas de Energia" "ups" "5" "Expert C Online 6000" "" "gamatronic" # http://www.nhs.com.br/produtos_interna/id/TWpFeQ== +"NHS Sistemas de Energia" "ups" "5" "Expert C Online 8000" "" "gamatronic" +"NHS Sistemas de Energia" "ups" "5" "Expert C Online 10000" "" "gamatronic" +"NHS Sistemas de Energia" "ups" "5" "Expert S Online 6000" "" "gamatronic" +"NHS Sistemas de Energia" "ups" "5" "Expert S Online 8000" "" "gamatronic" +"NHS Sistemas de Energia" "ups" "5" "Expert S Online 10000" "" "gamatronic" +"NHS Sistemas de Energia" "ups" "5" "Expert S Online 10000" "" "gamatronic" + "Nitram" "ups" "1" "Elite 500" "" "genericups upstype=8" "Nitram" "ups" "1" "Elite 2002" "" "genericups upstype=16" "Nitram" "ups" "1" "Elite 2005" "" "powerpanel" @@ -760,6 +788,7 @@ "Powercom" "ups" "4" "(various)" "USB (<= 2009 models, product id: 0002)" "powercom (requires 'usbserial' kernel module)" "Powercom" "ups" "5" "(various)" "USB (2009 models, product id: 00a?)" "usbhid-ups (experimental)" "Powercom" "ups" "5" "BNT-xxxAP" "USB (product id: 0004)" "usbhid-ups (experimental)" +"Powercom" "ups" "1" "BNT-xxxAP" "USB (product id: 0001)" "usbhid-ups (experimental)" "POWEREX" "ups" "2" "VI 1000 LED" "" "blazer_usb" @@ -864,6 +893,8 @@ "Rocketfish" "ups" "2" "RF-1000VA / RF-1025VA" "" "usbhid-ups" +"Rucelf" "ups" "2" "Rucelf UPOII-3000-96-EL" "" "blazer_ser" # http://www.rucelf.ua/en/catalog/upoii-3000-96-el/ + "SmartLabs" "pdu" "1" "2412S Power Line Modem" "for X10/Insteon" "powerman-pdu (experimental)" "SMS (Brazil)" "ups" "2" "Manager III" "" "blazer_ser" @@ -913,16 +944,6 @@ "Tecnoware" "ups" "2" "Easy Power 1200" "" "blazer_ser" "Tecnoware" "ups" "2" "UPS ERA LCD 0.65" "" "blazer_usb langid_fix=0x409" -"Tripp Lite" "ups" "1" "INTERNETOFFICE700" "USB (older; product ID: 0001)" "tripplite_usb" -"Tripp Lite" "ups" "2" "OMNIVS1000" "USB (older; product ID: 0001)" "tripplite_usb" -"Tripp Lite" "ups" "1" "OMNIVS1500XL" "USB" "tripplite_usb" -"Tripp Lite" "ups" "1" "SMART700USB" "USB" "tripplite_usb" -"Tripp Lite" "ups" "1" "SMART1500RM2U" "USB (older; product ID: 0001)" "tripplite_usb" -"Tripp Lite" "ups" "1" "SMART550USB" "USB (older; product ID: 0001)" "tripplite_usb" -"Tripp Lite" "ups" "1" "OMNISMART500" "USB (older; product ID: 0001)" "tripplite_usb" -"Tripp Lite" "ups" "1" "SMART2200RMXL2U" "USB (older; product ID: 0001)" "tripplite_usb (experimental)" -"Tripp Lite" "ups" "1" "SmartUPS" "" "tripplite" -"Tripp Lite" "ups" "1" "SmartOnline" "" "tripplitesu" "Tripp Lite" "ups" "1" "(various)" "Lan 2.2 interface - black 73-0844 cable" "genericups upstype=5" "Tripp Lite" "ups" "2" "1500 LCD" "USB" "usbhid-ups" "Tripp Lite" "ups" "3" "AVR550U" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=930&txtModelID=3090 @@ -952,23 +973,39 @@ "Tripp Lite" "ups" "3" "INTERNET750U" "USB (protocol 1007)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3142 "Tripp Lite" "ups" "3" "INTERNET900U" "USB (protocol 1007)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=930&txtModelID=3657 "Tripp Lite" "ups" "3" "INTERNETOFFICE500" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=930&txtModelID=11 +"Tripp Lite" "ups" "1" "INTERNETOFFICE700" "USB (older; product ID: 0001)" "tripplite_usb" "Tripp Lite" "ups" "3" "INTERNETOFFICE700" "USB (protocol 2012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=930&txtModelID=14 "Tripp Lite" "ups" "3" "OMNI650LCD" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3195 "Tripp Lite" "ups" "3" "OMNI900LCD" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=3082 "Tripp Lite" "ups" "2" "OMNI1000LCD" "USB" "usbhid-ups" "Tripp Lite" "ups" "3" "OMNISMART300PNP" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=19 +"Tripp Lite" "ups" "1" "OMNISMART500" "USB (older; product ID: 0001)" "tripplite_usb" "Tripp Lite" "ups" "3" "OMNISMART500" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=21 "Tripp Lite" "ups" "3" "OMNISMART700" "USB (protocol 2012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=23 -"Tripp Lite" "ups" "3" "OMNIVS1000" "USB (protocol 2012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=2656 +"Tripp Lite" "ups" "2" "OMNIVSINT800" "USB (older; product ID: 0001)" "tripplite_usb" "Tripp Lite" "ups" "3" "OMNIVS800" "USB (protocol 2012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=2729 +"Tripp Lite" "ups" "2" "OMNIVS1000" "USB (older; product ID: 0001)" "tripplite_usb" +"Tripp Lite" "ups" "3" "OMNIVS1000" "USB (protocol 2012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=2656 +"Tripp Lite" "ups" "1" "OMNIVS1500XL" "USB" "tripplite_usb" "Tripp Lite" "ups" "3" "POS500" "USB (protocol 2007)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3742 "Tripp Lite" "ups" "3" "SM2200RMDVTAA" "USB (protocol 3014)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=4648 +"Tripp Lite" "ups" "1" "SmartUPS" "" "tripplite" +"Tripp Lite" "ups" "1" "SmartOnline" "" "tripplitesu" +"Tripp Lite" "ups" "1" "SMART550USB" "USB (older; product ID: 0001)" "tripplite_usb" +"Tripp Lite" "ups" "3" "SMART550USB" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=2002 +"Tripp Lite" "ups" "3" "SMART550USBWD" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=2591 +"Tripp Lite" "ups" "1" "SMART700USB" "USB" "tripplite_usb" +"Tripp Lite" "ups" "3" "SMART750RMXL2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3020 +"Tripp Lite" "ups" "3" "SMART750SLT" "USB (protocol 3014)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3007 +"Tripp Lite" "ups" "3" "SMART750USB" "USB (protocol 2012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=2679 +"Tripp Lite" "ups" "3" "SMART750XLA" "USB (protocol 3014)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3820 "Tripp Lite" "ups" "3" "SMART1000LCD" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=3071 "Tripp Lite" "ups" "3" "SMART1000RM2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=2657 "Tripp Lite" "ups" "3" "SMART1000RMXL2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=5262 "Tripp Lite" "ups" "3" "SMART1050SLT" "USB (protocol 3012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3253 "Tripp Lite" "ups" "3" "SMART1050SLTAA" "USB (protocol 3012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=4389 "Tripp Lite" "ups" "3" "SMART1200LCD" "USB (protocol 2009)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3193 +"Tripp Lite" "ups" "1" "SMART1500RM2U" "USB (older; product ID: 0001)" "tripplite_usb" "Tripp Lite" "ups" "3" "SMART1500CRMXL" "USB (protocol 3014)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3826 "Tripp Lite" "ups" "3" "SMART1500LCD" "USB (protocol 2009)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=3151 "Tripp Lite" "ups" "3" "SMART1500LCDXL" "USB (protocol 2012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=4978 @@ -980,6 +1017,7 @@ "Tripp Lite" "ups" "3" "SMART2200CRMXL" "USB (protocol 3014)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3825 "Tripp Lite" "ups" "3" "SMART2200RM2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=4403 "Tripp Lite" "ups" "3" "SMART2200RM2UN" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=5428 +"Tripp Lite" "ups" "1" "SMART2200RMXL2U" "USB (older; product ID: 0001)" "tripplite_usb (experimental)" "Tripp Lite" "ups" "3" "SMART2200RMXL2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3264 "Tripp Lite" "ups" "3" "SMART2200RMXL2UP" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=4672 "Tripp Lite" "ups" "3" "SMART2200RMXLN" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=5427 @@ -994,13 +1032,8 @@ "Tripp Lite" "ups" "3" "SMART3000RMXL2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=4418 "Tripp Lite" "ups" "3" "SMART3000RMXLN" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=5425 "Tripp Lite" "ups" "3" "SMART3000SLT" "USB (protocol 3013)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3490 -"Tripp Lite" "ups" "3" "SMART500RT1U" "USB (protocol 3005)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=2853 -"Tripp Lite" "ups" "3" "SMART550USB" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=2002 -"Tripp Lite" "ups" "3" "SMART550USBWD" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=2591 -"Tripp Lite" "ups" "3" "SMART750RMXL2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3020 -"Tripp Lite" "ups" "3" "SMART750SLT" "USB (protocol 3014)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3007 -"Tripp Lite" "ups" "3" "SMART750USB" "USB (protocol 2012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=2679 -"Tripp Lite" "ups" "3" "SMART750XLA" "USB (protocol 3014)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3820 +"Tripp Lite" "ups" "2" "SMART500RT1U" "USB (older; product ID 0001, protocol 3005)" "tripplite_usb" +"Tripp Lite" "ups" "3" "SMART500RT1U" "USB (newer; protocol/product ID 3005)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=2853 "Tripp Lite" "ups" "3" "SMX1000LCD" "USB (protocol 2005)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3200 "Tripp Lite" "ups" "3" "SMX1000RT2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=2798 "Tripp Lite" "ups" "3" "SMX1050SLT" "USB (protocol 3012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3249 @@ -1013,6 +1046,9 @@ "Tripp Lite" "ups" "3" "SMX3000XLRT2UA" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=5658 "Tripp Lite" "ups" "3" "SMX500RT1U" "USB (protocol 3005)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=2691 "Tripp Lite" "ups" "3" "SMX750SLT" "USB (protocol 3014)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3021 +"Tripp Lite" "ups" "3" "SU750RTXL2U" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3194 +"Tripp Lite" "ups" "3" "SU750RTXLCD2U" "USB (protocol 4004)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=5070 +"Tripp Lite" "ups" "3" "SU750XL" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3299 "Tripp Lite" "ups" "3" "SU1000RTXL2UA" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=934&txtModelID=2948 "Tripp Lite" "ups" "3" "SU1000RTXLCD2U" "USB (protocol 4004)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=745&txtModelID=4980 "Tripp Lite" "ups" "3" "SU1000XLA" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=934&txtModelID=3180 @@ -1032,9 +1068,6 @@ "Tripp Lite" "ups" "3" "SU3000RTXR3UHW" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=934&txtModelID=4976 "Tripp Lite" "ups" "3" "SU3000XL" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=934&txtModelID=3601 "Tripp Lite" "ups" "3" "SU3000XLCD" "USB (protocol 4004)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=744&txtModelID=5342 -"Tripp Lite" "ups" "3" "SU750RTXL2U" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3194 -"Tripp Lite" "ups" "3" "SU750RTXLCD2U" "USB (protocol 4004)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=5070 -"Tripp Lite" "ups" "3" "SU750XL" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3299 "Tripp Lite" "ups" "3" "SUINT1000RTXL2UA" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3983 "Tripp Lite" "ups" "3" "SUINT1500RTXL2UA" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=934&txtModelID=2720 "Tripp Lite" "ups" "3" "SUINT2200RTXL2UA" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=934&txtModelID=3970 @@ -1084,10 +1117,14 @@ "Vivaldi" "ups" "1" "EA200 LED" "USB" "richcomm_usb" +"Voltronic Power" "ups" "2" "Apex 1KVA" "Serial" "nutdrv_qx" +"Voltronic Power" "ups" "2" "Apex 1KVA" "USB" "nutdrv_qx" "Voltronic Power" "ups" "2" "Frigate TX 1KVA" "Serial" "nutdrv_qx" "Voltronic Power" "ups" "2" "Frigate TX 1KVA" "USB" "nutdrv_qx" "Voltronic Power" "ups" "2" "Galleon 1KVA" "Serial" "nutdrv_qx" "Voltronic Power" "ups" "2" "Galleon 1KVA" "USB" "nutdrv_qx" +"Voltronic Power" "ups" "2" "Imperial 1KVA" "Serial" "nutdrv_qx" +"Voltronic Power" "ups" "2" "Imperial 1KVA" "USB" "nutdrv_qx" "Voltronic Power" "ups" "2" "Prosine 800" "Serial" "nutdrv_qx" "Voltronic Power" "ups" "2" "Prosine 800" "USB" "nutdrv_qx" "Voltronic Power" "ups" "2" "Vesta LED 850VA" "USB" "nutdrv_qx" diff --git a/data/html/Makefile.in b/data/html/Makefile.in index 602ffcf..8ec093f 100644 --- a/data/html/Makefile.in +++ b/data/html/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -53,8 +80,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = data/html -DIST_COMMON = README $(am__dist_html_DATA_DIST) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/header.html.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/header.html.in $(am__dist_html_DATA_DIST) README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -83,6 +110,18 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = header.html CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -120,10 +159,12 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(htmldir)" DATA = $(dist_html_DATA) $(nodist_html_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -230,12 +271,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -280,6 +324,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -390,11 +435,11 @@ uninstall-nodist_htmlDATA: @list='$(nodist_html_DATA)'; test -n "$(htmldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(htmldir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) @@ -533,16 +578,17 @@ uninstall-am: uninstall-dist_htmlDATA uninstall-nodist_htmlDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dist_htmlDATA install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-nodist_htmlDATA install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am uninstall uninstall-am uninstall-dist_htmlDATA \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dist_htmlDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-nodist_htmlDATA \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am uninstall-dist_htmlDATA \ uninstall-nodist_htmlDATA diff --git a/depcomp b/depcomp index 25a39e6..4ebd5b3 100755 --- a/depcomp +++ b/depcomp @@ -1,10 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2012-03-27.16; # UTC +scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,9 +27,9 @@ scriptversion=2012-03-27.16; # UTC case $1 in '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] @@ -57,11 +56,65 @@ EOF ;; esac +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + # A tabulation character. tab=' ' # A newline character. nl=' ' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 @@ -75,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" +# Avoid interferences from the environment. +gccflag= dashmflag= + # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case @@ -86,32 +142,32 @@ if test "$depmode" = hp; then fi if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvisualcpp + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then - # This is just like msvc7 but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvc7 + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 fi if test "$depmode" = xlc; then - # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. - gccflag=-qmakedep=gcc,-MF - depmode=gcc + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc fi case "$depmode" in @@ -134,8 +190,7 @@ gcc3) done "$@" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -143,13 +198,17 @@ gcc3) ;; gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then @@ -157,15 +216,14 @@ gcc) fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. + # The second -e expression handles DOS-style file names with drive + # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. @@ -174,15 +232,15 @@ gcc) ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' "$nl" < "$tmpdepfile" | ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -200,8 +258,7 @@ sgi) "$@" -MDupdate "$tmpdepfile" fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -209,7 +266,6 @@ sgi) if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" - # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in @@ -217,19 +273,15 @@ sgi) # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr "$nl" ' ' >> "$depfile" + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" - # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" ;; @@ -247,9 +299,8 @@ aix) # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u @@ -262,9 +313,7 @@ aix) "$@" -M fi stat=$? - - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi @@ -273,65 +322,113 @@ aix) do test -f "$tmpdepfile" && break done - if test -f "$tmpdepfile"; then - # Each line is of the form 'foo.o: dependent.h'. - # Do two passes, one to just change these to - # '$object: dependent.h' and one to simply 'dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" + aix_post_process_depfile ;; -icc) - # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. - # However on - # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using '\': - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - # tcc 0.9.26 (FIXME still under development at the moment of writing) - # will emit a similar output, but also prepend the continuation lines - # with horizontal tabulation characters. +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" - # Each line is of the form 'foo.o: dependent.h', - # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\' : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to - # '$object: dependent.h' and one to simply 'dependent.h:'. - sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ - < "$tmpdepfile" > "$depfile" - sed ' - s/[ '"$tab"'][ '"$tab"']*/ /g - s/^ *// - s/ *\\*$// - s/^[^:]*: *// - /^$/d - /:$/d - s/$/ :/ - ' < "$tmpdepfile" >> "$depfile" + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -342,9 +439,8 @@ hp2) # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d @@ -355,8 +451,7 @@ hp2) "$@" +Maked fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi @@ -366,76 +461,61 @@ hp2) test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" else - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in 'foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; msvc7) if test "$libtool" = yes; then @@ -446,8 +526,7 @@ msvc7) "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" - if test "$stat" = 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -473,6 +552,7 @@ $ { G p }' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; @@ -524,13 +604,14 @@ dashmstdout) # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' "$nl" < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -583,10 +664,12 @@ makedepend) # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; @@ -622,10 +705,10 @@ cpp) esac done - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" @@ -657,15 +740,15 @@ msvisualcpp) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; + set fnord "$@" + shift + shift + ;; *) - set fnord "$@" "$arg" - shift - shift - ;; + set fnord "$@" "$arg" + shift + shift + ;; esac done "$@" -E 2>/dev/null | diff --git a/docs/FAQ.txt b/docs/FAQ.txt index 0eff1a4..8ce0b14 100644 --- a/docs/FAQ.txt +++ b/docs/FAQ.txt @@ -10,15 +10,6 @@ right? If not, go read it now, then come back to this file if your question wasn't answered in there. -== upsstats says 'Error: can't open template file (upsstats.html)'. -Go into your configuration path (/usr/local/ups/etc by default) and -copy the sample template files over to their real names. The sample -template files are installed with 'make install' and can -also be found inside the source distribution in the conf directory. - -== upsmon fails the login and says 'username required' now. -Go read the link:UPGRADING[UPGRADING] file again. - == My UPS driver now says it's 'broken', and won't start. What now? Or a variation like... @@ -108,6 +99,19 @@ tcp-wrappers or kernel firewall rules. This isn't a NUT-specific limitation - it applies equally to your web server or mailer daemon. +== Which UPS should I buy? + +One with a no-questions-asked money-back guarantee. Seriously. The NUT +developers cannot take responsibility for recommending an UPS (see the LICENSE +file for more details on the explicit lack of warranty), only to find out that +the manufacturer has changed the internals of the UPS without changing the +model name. + +That said, from time to time, certain vendors have helped out by providing +hardware for testing, results of their testing efforts, or protocol +specifications. We try to publish this information on the NUT website, so you +can take this into consideration when selecting an UPS brand. + == I have an APC Smart-UPS connected with a grey APC serial cable and it won't work. The Back-UPS type in the genericups driver works but then I don't get to use @@ -158,7 +162,7 @@ hardware properly. *Answer 1* -I try to follow the "tool for the job" philosophy. It may mean +We try to follow the "tool for the job" philosophy. It may mean more programs running, but the flexibility you get is usually worth it. @@ -172,7 +176,8 @@ Besides, if upsmon were rolled into upsd, upsd would get even bigger than it is now. You'd have one less process, but the RAM consumption would be pretty close to now. -See data-room.txt for more configuration ideas and explanations. +See the "Data Room" section in docs/config-notes.txt for more configuration +ideas and explanations. *Answer 2* @@ -225,7 +230,7 @@ driver supports the older Best hardware. There is a similar problem with the tripplite_usb driver: it only supports the older, proprietary protocol. Newer standards-compliant Tripp Lite UPS models are supported by usbhid-ups. We name drivers based on the information -available at that time, which often is incomplete. +available at the time the driver was first written, which often is incomplete. == What's this about 'data stale'? @@ -237,9 +242,9 @@ If this happens to you, make sure your driver is still running. Also look at the syslog. Sometimes the driver loses the connection to the UPS, and that will also make the data go stale. -Note: some very slow machines have trouble keeping up with the -serial ports during periods of extreme load. My old 486 used to -flip between "stale" and "OK" while running backups. +This might also happen on certain virtualization platforms. If you cannot +reproduce the problem on a physical machine, please report the bug to the +virtualization software vendor. If this happens a lot, you might consider cranking up DEADTIME in the upsmon.conf to suppress some of the warnings for shorter @@ -250,8 +255,8 @@ what's going on with the UPS. Note: some drivers occasionally need more time to update than the default value of MAXAGE (in upsd.conf) allows. As a result, they are temporarily marked stale even though everything is fine. This -can happen with MGE Ellipse equipment - see the mge-shut man page. -In such cases, you can raise the value of MAXAGE to avoid these +can happen with MGE Ellipse equipment - see the mge-shut or usbhid-ups man +pages. In such cases, you can raise the value of MAXAGE to avoid these warnings; try a value like 25 or 30. == Why do the client programs say 'Driver not connected' when I try to run them? @@ -267,6 +272,17 @@ Note: if you jumped in with both feet and didn't follow the INSTALL.nut document, you probably started upsd by itself. You have to run 'upsdrvctl start' to start the drivers after configuring ups.conf. +== Why don't the pathnames in your documentation match the package I installed? + +Each distribution has conventions for where specific file types should be +stored. The NUT project cannot possibly track all of these conventions, so the +documentation assumes the default installation directory prefix of +`/usr/local/ups` when describing file locations. The distributions tend not to +change the base name of the files, so you can search for drivers and +configuration files in the package database of installed files. For instance, +on Debian or Ubuntu derivatives, you can use `dpkg --search usbhid-ups` to see +where the drivers are stored. + == Everything works perfectly during the shutdown, and the UPS comes back on, but my system stays off. What's happening? Assuming you don't have the problem in the next question, then you @@ -518,45 +534,65 @@ file. There are several driver to support USB models. -- usbhid-ups supports various manufacturers complying to the HID standard, -- tripplite_usb supports various Tripp-Lite units, +- usbhid-ups supports various manufacturers complying to the HID Power Device Class (PDC) standard, +- tripplite_usb supports various older Tripp-Lite units (with USB ProductID 0001) - bcmxcp_usb supports various Powerware units, -- blazer_usb supports various manufacturers that use the Megatec / Q1 protocol. +- nutdrv_qx and blazer_usb support various manufacturers that use the Megatec / Q1 protocol. Refer to the 'driver-name' (8) manpage for more information. -== What is this usbhid-ups (formerly newhidups) about? - -The basic USB UPS support was done until NUT 2.2 using hidups. To allow -a wider support accross platforms for USB/HID compliant devices, -usbhid-ups driver uses libusb (which is available for a wide range of -operating systems) and libhid (currently, a modified internal version -of it). - -As of NUT 2.2, usbhid-ups completely replaces the legacy hidups driver, -and provides support for various manufacturers. At that time, newhidups was -renamed to usbhid-ups. - -usbhid-ups is built automatically if possible (libusb development files -need to be installed) and installed by the "make install" command. +You can also consult the Hardware Compatibility List (HCL) and filter on USB: +http://www.networkupstools.org/stable-hcl.html?connection=USB == My USB UPS is supported but doesn't work! On Linux, udev rules are provided to set the correct permissions on device file. This allows the NUT driver to communicate with the UPS, through this device file. -However, the driver may still failed to start and support the device, with a +However, the driver may still fail to start and support the device, with a message like: failed to claim USB device: could not claim interface 0: Operation not permitted -*Operation not permitted* is a message pointing a privilege issue. +*Operation not permitted* is a message pointing to a privilege issue. The most frequent issue is that udev has not actually applied the rule: - if NUT has been freshly installed, -- and if the device USB cord was already plugged when installing nut. +- and if the device USB cord was already plugged when installing NUT. -In this case, just unplug and plug back the USB cord, then restart nut. +In this case, just unplug and plug back the USB cord, then restart NUT. + +There was a mistake in the naming of the NUT udev rules file which resulted in +the rules being overridden by another udev configuration file. While this has +been fixed in the Git master branch, your distribution may still be affected. +Details are available in the following Github issue: +https://github.com/networkupstools/nut/issues/140 + +== Why do you not use the Linux kernel HID driver when communicating with USB UPSes? + +When the `usbhid-ups` was first written, it replaced an older driver `hidups` +which used the Linux kernel USB HID API. At the time, the kernel HID API could +not distinguish between identical Usage IDs that were nested in different +parent IDs, so many common measurements were not available from `hidups`. For +this reason, the libusb approach was chosen, which has the added side effect +of being more portable than the Linux HID API. The Linux hiddev device nodes +have very similar permissions problems as the `/dev/bus/usb` nodes that the +libusb approach uses. + +Due to difficulties in running libusb on OS X and Windows, those platforms +might benefit more from a native HID approach. + +== I get a message from the kernel that the driver "did not claim interface 0 before use" + +On Linux, if two copies of a driver are competing for the UPS, these messages +will appear in dmesg: + + usbfs: process 29641 (usbhid-ups) did not claim interface 0 before use + +This can be a symptom of a source install conflicting with a package install. +There is a rudimetary locking mechanism in NUT, but there is a chance that the +packages might not use the same directory as the NUT default, and the conflict +will be reported by the kernel. == Why doesn't my package work? @@ -587,23 +623,50 @@ root, start upsmon with -p and it will go back to being one big process. This is not recommended, so don't blame us if something bad happens in this mode. +== I get the following error while building: `make[4]: don't know how to make HP-UX/nut-drvctl.sh. Stop` + +NUT still has some hidden dependencies on GNU Make which show up while running +`make distcheck`. If you are running `make distcheck` or its variants, you +will need to install GNU Make (`devel/gmake` in the ports tree), which is +incidentally what the official FreeBSD port of NUT does for all builds. + == I have 'some problem' with 'some old version' ... Get the latest stable release, and see if it still happens. If it goes away, it means someone else reported it and got it fixed a long time ago. -If that doesn't work, try the latest development version. +You may want to search the mailing lists to see if someone else has +experienced the same problem. If so, there is a good chance that someone else +has worked through the process necessary to shoehorn the latest NUT version +into your distribution (potentially with unofficial packages). -If your problem is STILL there, then contact the mailing lists. +Some OS distributions contain old versions of NUT. If your hardware is newer +than the NUT release, there is a good chance that support has not been added +yet. Please do not tell us you have the "latest version for Distro XYZ" - even +if the developers are familiar with that distribution, it helps others if you +quote the exact package version. NOTE: check the release date on the version you have. If it's more -than about 6 months old, there's probably a newer stable tree +than about 6-12 months old, there's probably a newer stable tree version out there. +== I built NUT from Git, and it complains about lots of missing files. What happened? + +If you are not actively developing a driver, can you use a snapshot instead? +The NUT instance of Buildbot generates tar files of the latest NUT source +after each successful build, and these snapshots include a prebuilt version of +the `./configure` script. + +Otherwise, you will need recent versions of autoconf, automake, libtool, +asciidoc, a2x and its dependencies for DocBook/dblatex. Rather than publish a +list of the exact versions needed (which will quickly become out of date), we +recommend you consult your distribution's dependency list for building a NUT +package, and use that as a starting point. + == Do I have to use a serial connection to monitor the UPS? What about direct network connections (SNMP or otherwise)? -No. NUT currently support USB communication through several drivers, +NUT currently supports USB communication through several drivers, and also SNMP and XML/HTTP (Eaton and MGE) communications. Since NUT is very extensible, support for a new communication bus can be added @@ -616,15 +679,10 @@ turn an owner into a developer or vice-versa. == What happened to the patch I sent? -If a release goes by and your patch hasn't been included, it was -probably dropped. There can be a lot of patches waiting for -inclusion at some points, and occasionally some have to be -rejected. - -Design issues or severe coding style problems can be the reason -for this. I try to point out what the problems are, but there are -limits. See developers.txt for some pointers on submitting -patches. +We try to prioritize emails with patches, but you should understand that a +simple fix for your bug might be complicated to integrate with the rest of +NUT. Changing the way a fundamental component works, such as USB support, +means a lot of testing to ensure that your fix does not break other drivers. Sometimes patches are put on hold due to a feature freeze. If it doesn't show up once the new version opens up, send it again. @@ -632,7 +690,7 @@ doesn't show up once the new version opens up, send it again. == I'm not much of a programmer. How can I help? There's always work to be done outside of the realm of code bashing. -Documentation might not always be so clear. A user's perspective +Documentation can always be improved. A user's perspective is sometimes needed to appreciate this. Bug reports on a project's documentation are just as valuable as those for the actual source. @@ -686,10 +744,13 @@ upsstats.html and change it from TEMPC to TEMPF. == Why is the mailing list ignoring me? -You probably asked a question that's answered in this FAQ or -somewhere else in the documentation and nobody wants to quote it +You probably asked a question that's answered in this FAQ, or +somewhere else in the documentation, and nobody wants to quote it for you. +There is a small chance that the mailing list spam filter ate your message. +Check the list archives to see if your message appears there. + Convincing the other subscribers that you've actually read down this far might be useful. You might mention "queequeg" for better results. @@ -697,6 +758,22 @@ This URL may also be helpful: http://www.catb.org/~esr/faqs/smart-questions.html +== Why are you so insistent about sending emails to public mailing lists instead of to individuals? + +By and large, NUT is a volunteer effort. By emailing one person, you are +asking them to take care of your question. If you email the list instead, you +give others the opportunity to answer. + +In addition, the mailing lists are publicly archived, and therefore easily +searchable. Chances are, you aren't the only person who will ever have that +question. + +== If you want mailing list replies to go to the list, why don't you add a Reply-To: header? + +We are not going to rehash all of the arguments for and against this in a +simple FAQ entry. If you intend for your reply to go to more than just the +last person who posted, it is not too much trouble to hit "reply all". + == I found some information about another kind of UPS protocol you don't support yet, but I don't know what to do with it. Can you help? If you're not a programmer, you can still help others by making diff --git a/docs/Makefile.am b/docs/Makefile.am index c7907c2..8ca7afd 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -32,6 +32,7 @@ CABLES_IMAGES = images/cables/73-0724.png images/cables/940-0024C.jpg \ images/cables/belkin-f6cx-rkm-xu-cable.jpg images/cables/Lansafecable.jpg \ images/cables/mac-940-0024C.png images/cables/mge-66049.png \ images/cables/mge-db9-rj12.jpg images/cables/mge-db9-rj45.jpg \ + images/cables/mge-usb-rj45.jpg \ images/cables/SOLA-330.png ALL_TXT_SRC = nut-names.txt $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \ @@ -39,7 +40,7 @@ ALL_TXT_SRC = nut-names.txt $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \ NUT_SPELL_DICT = nut.dict EXTRA_DIST = $(ALL_TXT_SRC) $(SHARED_DEPS) $(IMAGE_FILES) \ - $(CABLES_IMAGES) docinfo.xml $(NUT_SPELL_DICT) \ + $(CABLES_IMAGES) $(NUT_SPELL_DICT) \ common.xsl xhtml.xsl chunked.xsl ASCIIDOC_HTML_SINGLE = user-manual.html \ @@ -90,8 +91,10 @@ packager-guide.html packager-guide.chunked packager-guide.pdf: packager-guide.tx # variable ASCIIDOC_VERBOSE to "-v", ie: # $ ASCIIDOC_VERBOSE=-v make A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) --attribute icons \ - --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ - --attribute localtime=`TZ=UTC date +%H:%M:%S` \ + --xsltproc-opts "--nonet" \ + --xsltproc-opts "--stringparam nut.localdate \"`TZ=UTC date +%Y-%m-%d`\"" \ + --xsltproc-opts "--stringparam nut.localtime \"`TZ=UTC date +%H:%M:%S`\"" \ + --xsltproc-opts "--stringparam nut.nutversion \"@PACKAGE_VERSION@\"" \ --attribute iconsdir=$(srcdir)/images \ --attribute=badges \ --attribute=external_title \ diff --git a/docs/Makefile.in b/docs/Makefile.in index ad9ac5c..037296f 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,23 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -52,7 +79,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = docs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/docinfo.xml.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -79,17 +107,30 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = docinfo.xml CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -97,9 +138,29 @@ am__can_run_installinfo = \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -132,6 +193,7 @@ am__relativize = \ A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -238,12 +300,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -288,6 +353,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -343,6 +409,7 @@ CABLES_IMAGES = images/cables/73-0724.png images/cables/940-0024C.jpg \ images/cables/belkin-f6cx-rkm-xu-cable.jpg images/cables/Lansafecable.jpg \ images/cables/mac-940-0024C.png images/cables/mge-66049.png \ images/cables/mge-db9-rj12.jpg images/cables/mge-db9-rj45.jpg \ + images/cables/mge-usb-rj45.jpg \ images/cables/SOLA-330.png ALL_TXT_SRC = nut-names.txt $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \ @@ -350,7 +417,7 @@ ALL_TXT_SRC = nut-names.txt $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \ NUT_SPELL_DICT = nut.dict EXTRA_DIST = $(ALL_TXT_SRC) $(SHARED_DEPS) $(IMAGE_FILES) \ - $(CABLES_IMAGES) docinfo.xml $(NUT_SPELL_DICT) \ + $(CABLES_IMAGES) $(NUT_SPELL_DICT) \ common.xsl xhtml.xsl chunked.xsl ASCIIDOC_HTML_SINGLE = user-manual.html \ @@ -387,8 +454,10 @@ FULL_DEVELOPER_GUIDE_DEPS = $(DEVELOPER_GUIDE_DEPS) $(SHARED_DEPS) \ # variable ASCIIDOC_VERBOSE to "-v", ie: # $ ASCIIDOC_VERBOSE=-v make A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) --attribute icons \ - --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ - --attribute localtime=`TZ=UTC date +%H:%M:%S` \ + --xsltproc-opts "--nonet" \ + --xsltproc-opts "--stringparam nut.localdate \"`TZ=UTC date +%Y-%m-%d`\"" \ + --xsltproc-opts "--stringparam nut.localtime \"`TZ=UTC date +%H:%M:%S`\"" \ + --xsltproc-opts "--stringparam nut.nutversion \"@PACKAGE_VERSION@\"" \ --attribute iconsdir=$(srcdir)/images \ --attribute=badges \ --attribute=external_title \ @@ -429,6 +498,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +docinfo.xml: $(top_builddir)/config.status $(srcdir)/docinfo.xml.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo @@ -437,22 +508,25 @@ clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -467,57 +541,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -533,12 +562,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -550,15 +574,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -567,6 +587,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -725,12 +760,11 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - clean-local ctags ctags-recursive distclean distclean-generic \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool clean-local \ + cscopelist-am ctags ctags-am distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ @@ -739,8 +773,8 @@ uninstall-am: install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am all: doc diff --git a/docs/cables.txt b/docs/cables.txt index fde660a..afc2c29 100644 --- a/docs/cables.txt +++ b/docs/cables.txt @@ -55,7 +55,7 @@ Documents in this section are provided courtesy of Eaton. MGE Office Protection Systems ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The two first cables also applies to MGE UPS SYSTEMS. +The three first cables also applies to MGE UPS SYSTEMS and Eaton. DB9-DB9 cable (ref 66049) ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -67,11 +67,36 @@ image::images/cables/mge-66049.png[DB9-DB9 cable] DB9-RJ45 cable ^^^^^^^^^^^^^^ -This cable is used on the more recent models, including Ellipse MAX, Protection -Station, ... +This cable is used on the more recent models, including Ellipse MAX, +Protection Station, ... image::images/cables/mge-db9-rj45.jpg[DB9-RJ45 cable] +NMC DB9-RJ45 cable +^^^^^^^^^^^^^^^^^^ + +The following applies to the MGE 66102 NMC (Network Management Card), and +possibly other models. The NMC connection is an 8P8C RJ45-style jack. + +|==== +|Signal | PC | NMC +| | 1,4,6 | +|TxD | 2 | 3 +|RxD | 3 | 6 +|GND | 5 | 4 +| | 7,8 | +| | shield | shield +|==== + + +USB-RJ45 cable +^^^^^^^^^^^^^^ + +This cable is used also on the more recent models, including Ellipse MAX, +Protection Station, ... + +image::images/cables/mge-usb-rj45.jpg[USB-RJ45 cable] + DB9-RJ12 cable ^^^^^^^^^^^^^^ @@ -104,17 +129,37 @@ T700, T1000, T1500, T1500j, T700h, T1000h, T1500h, R1500, R1500j, R1500h, T2000, T2000j, T2400h, T2400h-NA, R3000 / R3000j, R3000h, R3000h-International, R3000h-NA, R6000h-NA, R6000i, R6000j. -UPS PC 9 pin connector + UPS PC 9 pin connector - 1 --------- 3 - 2 --------- 2 - 4 -\ - 4 --------- 5 | - 6 -/ - 6 --------- 7 + 1 --------- 3 + 2 --------- 2 + 4 -\ + 4 --------- 5 | + 6 -/ + 6 --------- 7 Contributed by Kjell Claesson and Arnaud Quette. +Phoenixtec (Best Power) +----------------------- + +Many Best Power units (including the Patriot Pro II) have a female DB-9 socket +with a non-standard pinout. + +|==== +|Signal | PC | UPS +| | 1,4,6 | NC +|TxD | 2 | 2 +|RxD | 3 | 1 +|GND | 5 | 4 +| | 7,8 | NC +|==== + +Sources: + +* http://pinoutsguide.com/UPS/best_power_pinout.shtml +* http://lit.powerware.com/ll_download.asp?file=m_patriotproii_jan99.pdf +* Stan Gammons Tripp-Lite ---------- diff --git a/docs/chunked.xsl b/docs/chunked.xsl index a8b698c..7f09a80 100644 --- a/docs/chunked.xsl +++ b/docs/chunked.xsl @@ -14,9 +14,4 @@ images/icons/ images/icons/ - - - - - diff --git a/docs/common.xsl b/docs/common.xsl index 2e5cbc2..eed9099 100644 --- a/docs/common.xsl +++ b/docs/common.xsl @@ -103,4 +103,22 @@ book nop + + + + + + + + + + + + + + + diff --git a/docs/config-notes.txt b/docs/config-notes.txt index 700d8fa..021033b 100644 --- a/docs/config-notes.txt +++ b/docs/config-notes.txt @@ -76,7 +76,7 @@ Much better. The *=* character should be used with care too. There should be only one "simple" *=* character in a line: between the parameter name and its value. -All other *=* characters should be either escaped or whithin "quotes". +All other *=* characters should be either escaped or within "quotes". password = 123=123 @@ -648,9 +648,9 @@ shut down completely in the middle. In order for this to work, you need to shutdown NUT (UPS driver, upsd server and upsmon client) in the suspend script and start them again in the resume script. Don't try to keep them running. The upsd server -will latch the FSD state (so it won't be useable after resuming) and so +will latch the FSD state (so it won't be usable after resuming) and so will the upsmon client. Some drivers may work after resuming, but many -don't and some UPS'es will require re-initialization, so it's best not +don't and some UPSs will require re-initialization, so it's best not to keep this running either. After stopping driver, server and client you'll have to send the UPS diff --git a/docs/configure.txt b/docs/configure.txt index 282a1c9..9b12481 100644 --- a/docs/configure.txt +++ b/docs/configure.txt @@ -44,6 +44,11 @@ on servers. Note that you need to install freeipmi (0.8.5 or higher) development package or files. + --with-linux_i2c + +Build and install i2c drivers (default: auto-detect) +Note that you need to install libi2c development package or files. + --with-drivers=,,... Specify exactly which driver or drivers to build and install (this @@ -101,7 +106,7 @@ library). Enable SSL support, using either Mozilla NSS or OpenSSL. If both are present, and nothing was specified, OpenSSL support will -be prefered. Read docs/security.txt for instructions on SSL support. +be preferred. Read docs/security.txt for instructions on SSL support. --with-wrap (default: auto-detect) @@ -115,7 +120,8 @@ Enable IPv6 support. --with-avahi (default: auto-detect) Build and install Avahi support, to publish NUT server availability -using mDNS protocol. +using mDNS protocol. This requires Avahi development files for the +Core and Client parts. --with-libltdl (default: auto-detect) diff --git a/docs/developers.txt b/docs/developers.txt index 7b2ec36..9d52065 100644 --- a/docs/developers.txt +++ b/docs/developers.txt @@ -371,16 +371,22 @@ Most developers will be well served by committing to their own Git repository, and having the NUT team merge their changes. Git offers a little more flexibility than the +svn update+ command. You may -fetch other developers' changes from SVN into your repository, but hold off on +fetch other developers' changes into your repository, but hold off on actually combining them with your branch until you have compared the two branches (for instance, with `gitk --all`). Git also allows you to accumulate more than one commit worth of changes before pushing to another repository. +This allows development to continue without a constant network connection. For a quick change to a file in the Git working copy, you can use `git diff` to generate a patch to send to the nut-upsdev mailing list. If you have more extensive changes, you can use `git format-patch` on a complete commit or branch, and send the resulting series of patches to the list. +If you use GitHub's web-based editor to make changes, it tends to create lots +of small commits, one per change per file. Unless there is reason to keep the +intermediate history, we will probably collapse the entire branch into one +commit with `git rebase -i` before merging. + The link:https://git.wiki.kernel.org/index.php/GitSvnCrashCourse[GitSvnCrashCourse] wiki page has some useful information for long-time users of Subversion. @@ -479,7 +485,7 @@ best to add some context such as the commit title or a date. You may notice that some older commits have `[[SVN:####]]` tags and Fossil-ID footers. These were lifted from the old SVN commit messages using reposurgeon, -and should not be used as a guide for future commits. +and should *not* be used as a guide for future commits. Repository etiquette and quality assurance ------------------------------------------ @@ -500,28 +506,9 @@ will need to rebase on top of your rebased branch. Obviously, this hinders collaboration. In this case, we recommend that you rebase only in your private repository, and push when things are ready for discussion. Merging instead of rebasing will help with collaboration, but please do not turn the repository -history into a pile of spaghetti by merging unnecessarily. Be sure that your -commit messages are descriptive when merging. - -Before pushing your commits upstream, please remember to run +make -distcheck-light+. This checks that the Makefiles are not broken, that all the -relevant files are distributed, and that there are no compilation or -installation errors. - -Running +make distcheck-light+ is especially important if you have added or -removed files, or updated configure.in or some Makefile.am. Remember: simply -adding a file to Git does not mean it will be distributed. To distribute a -file, you must update the corresponding Makefile.am. - -There is also +make distcheck+, which runs an even stricter set of -tests than +make distcheck-light+, but will not work unless you have all the -optional libraries and features installed. - -You may create as many branches as you like in your local Git repository. When -using Git, our preferred way to combine small changes with the upstream -upstream repository is to use `git rebase` on your local branch. This is -equivalent to treating your branch as a series of patches, and re-applying your -patches on top of the upstream changes. +history into a pile of spaghetti by merging unnecessarily. (Test merges can be +done on integration branches, which can be discarded if the merge is trivial.) +Be sure that your commit messages are descriptive when merging. If you haven't created a commit out of your local changes yet, and you want to fetch the latest code, you can also use +git stash+ before pulling, then +git @@ -561,4 +548,49 @@ Here is an example workflow: If you are new to Git, but are familiar with SVN, the link:http://git-scm.com/course/svn.html[following link] may be of use. +[[building]] +Building the Code +----------------- + +For a developer, the NUT build process starts with `./autogen.sh`. This script +generates the `./configure` script that end users typically invoke to build +NUT. If you are making a number of changes to the NUT source tree, configuring +with the `--enable-maintainer-mode` flag will ensure that after you change +`Makefile.am`, the `Makefile.in` and `Makefile` get regenerated. At a +minimum, you will need: + +* autoconf +* automake +* libtool +* Python +* Perl + +After running `./autogen.sh`, you can pass your local configuration options to +`./configure` and run `make` from the top-level directory. To avoid the need +for root privileges when testing new NUT code, you may wish to use +`--prefix=$HOME/local/nut --with-statepath=/tmp`. You can also keep +compilation times down by only building the driver you are currently working +on: `--with-drivers=driver1,dummy-ups`. + +Before pushing your commits upstream, please run +make distcheck-light+. This +checks that the Makefiles are not broken, that all the +relevant files are distributed, and that there are no compilation or +installation errors. Note that this requires all of the dependencies necessary +to build the documentation, including asciidoc, a2x, xsltproc, dblatex and any +additional XSL stylesheets. + +Running +make distcheck-light+ is especially important if you have added or +removed files, or updated configure.in or some Makefile.am. Remember: simply +adding a file to Git does not mean it will be distributed. To distribute a +file, you must update the corresponding Makefile.am. + +There is also +make distcheck+, which runs an even stricter set of +tests than +make distcheck-light+, but will not work unless you have all the +optional libraries and features installed. + +Even if you do not use your distribution's packages of NUT, installing the +distribution's list of build dependencies for NUT can reduce the amount of +trial-and-error when installing dependencies. For instance, in Debian, you can +run `apt-get build-dep nut` to install all of the auto* tools as well as any +development libraries and headers. diff --git a/docs/docinfo.xml b/docs/docinfo.xml deleted file mode 100644 index a8650ec..0000000 --- a/docs/docinfo.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - 2.6.0 - 2011-01-14 - - - First release of AsciiDoc documentation for Network UPS Tools (NUT). - - - diff --git a/docs/docinfo.xml.in b/docs/docinfo.xml.in new file mode 100644 index 0000000..ed3faaf --- /dev/null +++ b/docs/docinfo.xml.in @@ -0,0 +1,23 @@ + + + + + @PACKAGE_VERSION@ + @now@ + + + Current release of Network UPS Tools (NUT). + + + + + + 2.6.0 + 2011-01-14 + + + First release of AsciiDoc documentation for Network UPS Tools (NUT). + + + + diff --git a/docs/documentation.txt b/docs/documentation.txt index b7cf5ee..4483117 100644 --- a/docs/documentation.txt +++ b/docs/documentation.txt @@ -3,6 +3,7 @@ Documentation ============= endif::website[] + User Documentation ------------------ @@ -11,12 +12,14 @@ ifdef::website[] - NUT User Manual (link:docs/user-manual.chunked/index.html[online]) (link:docs/user-manual.pdf[PDF]) - Cables information (link:cables.html[online]) (link:docs/cables.pdf[PDF]) - link:docs/man/index.html#User_man[User manual pages] +- link:ddl/index.html#_supported_devices[Devices Dumps Library (DDL)]: Provides information on how devices are supported endif::website[] ifndef::website[] - link:../FAQ.html[FAQ - Frequently Asked Questions] - linkdoc:user-manual[NUT user manual] - <> - link:../man/index.html#User_man[User manual pages] +- link:http://www.networkupstools.org/ddl/index.html#_supported_devices[Devices Dumps Library (DDL)]: Provides information on how devices are supported endif::website[] Developer Documentation @@ -28,6 +31,7 @@ ifdef::website[] - link:ups-protocols.html[UPS protocols library] - link:docs/man/index.html#Developer_man[Developer manual pages] - link:nut-qa.html[NUT Quality Assurance] +- link:ddl/index.html[Devices Dumps Library (DDL)]: Provides simulation data to the linkman:dummy-ups[8] driver endif::website[] ifndef::website[] - linkdoc:developer-guide[NUT Developer Guide] @@ -35,6 +39,7 @@ ifndef::website[] - link:ups-protocols.html[UPS protocols library] - link:../man/index.html#Developer_man[Developer manual pages] - link:nut-qa.html[NUT Quality Assurance] +- link:http://www.networkupstools.org/ddl/index.html[Devices Dumps Library (DDL)]: Provides simulation data to the linkman:dummy-ups[8] driver endif::website[] Offsite Links @@ -51,6 +56,7 @@ These are general information about UPS and PDU. These are writeups by users of the software. +- link:http://rogerprice.org/NUT.html[NUT Setup with openSUSE] '(Roger Price)' - link:http://www.dimat.unina2.it/LCS/MonitoraggioUpsNutUbuntu10-eng.htm[Deploying NUT on an Ubuntu 10.04 cluster] '(Stefano Angelone)' - link:http://blog.shadypixel.com/monitoring-a-ups-with-nut-on-debian-or-ubuntu-linux[Monitoring a UPS with nut on Debian or Ubuntu Linux] '(Avery Fay)' - link:http://linux.developpez.com/cours/upsusb/[Installation et gestion d'un UPS USB en réseau sous linux] '(Olivier Van Hoof, french)' @@ -67,5 +73,5 @@ These are writeups by users of the software. News articles and Press releases -------------------------------- -- link:http://www.crn.com/white-box/199000818?pgno=1[Linux UPS Without Tears] '(A. Lizard)' -- link:http://networking.earthweb.com/netsysm/article.php/10954_3295841_1[Graceful UPS shutdowns on Linux] '(Carla Schroder)' +- link:http://www.crn.com/news/channel-programs/199000818/linux-ups-without-tears.htm[Linux UPS Without Tears] '(A. Lizard)' +- link:http://www.enterprisenetworkingplanet.com/netsysm/article.php/3295841/Graceful-UPS-Shutdowns-on-Linux.htm[Graceful UPS shutdowns on Linux] '(Carla Schroder)' diff --git a/docs/download.txt b/docs/download.txt index 8436094..3991b1c 100644 --- a/docs/download.txt +++ b/docs/download.txt @@ -15,7 +15,7 @@ ifdef::website[] link:docs/user-manual.chunked/ar01s09.html#verifySourceSig[following procedure] endif::website[] ifndef::website[] -- Else, you can read the <>. +<>. endif::website[] to do so. ================================================================================ @@ -110,7 +110,8 @@ Mandriva, link:https://admin.fedoraproject.org/pkgdb/acls/name/nut[Red Hat / Fedora], link:http://software.opensuse.org/package/nut[Novell Suse / openSUSE], link:https://forum.openwrt.org/viewtopic.php?id=26269[OpenWrt], -link:http://packages.ubuntu.com/nut[Ubuntu]. +link:http://packages.ubuntu.com/nut[Ubuntu], +link:https://github.com/voidlinux/xbps-packages/blob/master/srcpkgs/network-ups-tools/template[Void Linux]. - BSD systems: link:http://www.FreeBSD.org/cgi/ports.cgi?query=^nut-&stype=name[FreeBSD], @@ -143,7 +144,7 @@ Virtualization packages VMware ~~~~~~ -- NUT client for ESXi 5.0 (offsite, René Garcia) +- NUT client 2.7.2 for ESXi 5.x (offsite, René Garcia) * link:http://rene.margar.fr/2012/05/client-nut-pour-esxi-5-0/[blog entry (French)] - * link:http://rene.margar.fr/downloads/NutClient-ESXi500-1.2.0.tar.gz[VIB package (v1.2.0)] + * link:http://rene.margar.fr/downloads/NutClient-ESXi500-1.3.0.tar.gz[VIB package (v1.3.0)] diff --git a/docs/features.txt b/docs/features.txt index 65690ba..8e25259 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -120,7 +120,7 @@ no mysteries or secrets in your critical monitoring tools. UPS management and control -------------------------- -- Writable variables may be edited on higher end equipment for local customizations +- Writable variables may be edited on higher end equipment for local customization - Status monitoring can generate notifications (email/pager/SMS/...) on alert conditions diff --git a/docs/history.txt b/docs/history.txt index da66cec..e31c933 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -234,7 +234,7 @@ On July 25, 2003, 1.4.0 was released. It contained support for both the old "REQ July 2003: pushing towards 2.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -1.5.0 forked from 1.4.0 and was released on July 29, 2003. The first changes were to throw out anything which was providing compatibilty with the older versions of the software. This means that 1.5 and the eventual 2.0 will not talk to anything older than 1.4. +1.5.0 forked from 1.4.0 and was released on July 29, 2003. The first changes were to throw out anything which was providing compatibility with the older versions of the software. This means that 1.5 and the eventual 2.0 will not talk to anything older than 1.4. This tree continues to evolve with new serial routines for the drivers which are intended to replace the aging upscommon code which dates back to the early 0.x releases. The original routines would call alarm and read in a tight loop while fetching characters. The new functions are much cleaner, and wait for data with select. This makes for much cleaner code and easier strace/ktrace logs, since the number of syscalls has been greatly reduced. diff --git a/docs/images/cables/mge-usb-rj45.jpg b/docs/images/cables/mge-usb-rj45.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e9104a5dc4c06d79dc03cb7657fb2d38a6f78314 GIT binary patch literal 13921 zcmb7q1wfQdyXd>@(w$Pmf=h>Vi%W-er_$Xmf^>IxcS?hVq;!XZfP|EQ3ZjUF+y(u< z|2yaZ&pr1J!@N(=JTvn?GqdwvFJ7+$c=FP6(f|kq0>lx2!1XVHP{PIB*v;Gw>S^s} z1(lIgRJmRTBmgiH(oIGr2qGh+AtOT|$QY=oC}>z1SXh`Cn3&i&1bEmu_&AuDcqDlE zgha%|#8|j@NJ)rD35bY^Zj6Ay2ptGAIx;dk5jG|^(f@b4?gQ}AK&YS@FbE$&!Uuuz zLDvHSB>)1z2p14e{FNZcC}0p0DjI@I^bhhM_Vqge3k(8~@W6Ng0Qyz&m)3uM4w0$z z*eUip{8#G#f=R>tZzPx>-CN)Dy#;|lr5nmkLJO|Dd5ApZVi~dA8<@U90OD=`+a~}N zaWSaF9}~zUaR7l{Isj-708ayqV{_90djuVmxN7R)*>A~BjU1eid;l;H_}z5S&x~`< zMF3!#N(7nc{IPah*<>y`$1T3Dkv)M10NSa4xBv(b0g^#&;Wq>@v-NmI4FF(#?YTh_ z3G3sj9%cCJVSp^Cpa{t4hRqcKpOu*7rh8DFW-^i#0HBl>f6Qh6w=`09vX`4s#wHXf zLf%8>95~b=E}Q9zHv}-aj*9OCK=(Z)L6<+>@u%hw8703fS}Nuq3`Vql?6)ZZ;Dkxo zspKZ2<%30Cc=E|;i_h4iGc0t;)KBq1**q3r)Bd36YLpmi>u>#ks~}wQ@&-_hc5HfB zF!6lBTj!$6`JfbDX`Ok0Kvb6Qj~GCO#KZ~!+^F1I06<0M51?o)kh!Ydj6lHpgWskY zqdBpzB==Qw(EO47cdV5`@r>wFy3>s?iaPI`%6)DsS4ovNE2pO}{;l$RRHrB>7;kY) zY_eP)C;)o=_c)jfe$!3DfyD#dJ=6YDqH#$9c;UKtM|!}bR#?Xc0N@18j%64r{B4bC zTz6#-TqgivElp1YMhY`-O3au=6<_V)C_d9<{n7w(uY!{RS>O1Y|8IrcVIBeN-C|^> z^5!vC|31uf2*sO383{*lkvi*cF+_2zJqA|0#la`{z6F*4n>Jo_JuA2e7Z3rc0B64Z ze-0H8{^&1DH&5iJMt`CB=zoI<5_6=>V(VY5KX1Vwl#GzkVQl?3f;$qv6TD}qFp?@j zaU%JbJODf-V^w708O|Q2tLNCVj1g1u5Xvj@NAM;89@`t?8^6{)0i>peTZ{%V*#AoZ zdd>cW)*mq(RHuI_{CDgBe1FBD|1HOH*1cQq%?+61IIGz$ zr*%d52b6ttbx;3WjN>eCx9nVdc4^ewRL$l2zlysKLKCw1W`;xW-FDpr_EpQ++j2(9_UrAwiLADDQUsK*5F@JbiL*n5K3ivg=_Ojs5j)nMqEuOyrU%&0Ud$ z#V$$lF7lvV->ukj3QtL@oL7tNt{tL+cSSa@&Py#1lYf5KtIgpE)@`zm8$8KbIyQ@@ zDKarnpdGo(?6+nCON+)#rcd;Xgdk+Z@&O~c}lVEn)bB& zdh1o6S71LnBIBzyLQINTh-uV0%b*GxAu@wGT_0d9WHdS>7=yA}T;d_tgE~UI5iA5z zJWNh~+2{BcbDIfsQ-nVR%N;+){@iuE^p1Tsa?=;A$862_DEQ9x?v>gNWd_d$3rIS1 z_l8~rghOxt%JZT{$W8lfl9=_B%G3t8S<*I@BJmnf>1u`i$}exeTOIZse?sS2fxjA+ ztN#FSg4s$gK4*xl{VP}0NMfc89Dk!KLgu>s%gAq2;>k11&8)@jtKS4Z~=+f40P@{N`grjkaRSnDAS%=YAP-4b`5Oua_HI4hw~z zt_urQ9Z_C9M}OardUCnzVQX)HR668-_8oiQS^{%lYju_C>q6Mnrw;f`tsM zwkv%gB^5_G+`Y-fvoeo!xg_fgw*$PKoR6iY%G=J2R^uXkb~8QcrObw_Gl-LDi;CAI zvpchX+#(HT>b==pWAUz-&!}lU%fLzLu)PTJiqmcK&a5QmNN5=*XA*6LnU+H2NP_yT z<2!D8DT$F+C0oBu-7<_{i_EW>Y)h_Wo50S#*3i(DDDcsxyI$S+?_9IDz)kJ*VyZI1 zlV{AfvF2lxpWUu-kqJiRw$ajT;@-waJ(dSlUPttBI&nw)x z@@<2%tu@Lkes+zlV7Gnb_%5L&ZLE#S5rcFF-yWZ#@l+yqC>`=p+lRVYr3A02;RcpB zDQPqfydrU>;!aVu%nEaFzP%Lmw8W{$5NY5!Xb+z9rhg7!5+7rK7xv*^**6)F=QVYq zj-%llnLoonUg59iQO4%Y++8|;ulUw+hG=yK5sZ;<_M7;i|F%5j-v)TZ4)r0()$jiz zf%Lb8I${Yy?6n~n*l1|T5HP|X0tF!W1cWrmw4A&|TyQZ}-6Z(8ixN2IV2rxqX6Ab1RcuC0=3ja`~L% zxz)))@ho}HVuM(5dAn7K9@*(!H@ujdlv70C-F$51a4>m$oyg<0XGL?_(OevTss+9a zTNp-i6>(#TH9@L@A~v$B8gbY!w@h+NTt`QKSGE_@Ax@cSY;Q#X+0BPX#^c9}r`Lcs zMxR!aH8U~9@iWo%Tm#fE-68m?_37ycMUG{<=4RITMb@@Yb%`W_4ht=fk~s`PXk^Dds#%re9gA|DB`yQXMk7neQd znXTDRP$ca$bgoJXt0wx;S<8W?kFJLbj$nG|H(cBZ4a<73o8I_@_nv0!WcM6-%`5j` z=?nHJFTM>{Ip+A4l3Zl4(J__USlDPN0a&XinD=18Oqgsn7#YNnr$w4Y*>S-(O|A(? zF5K-A|A?hkq^=NeCPU`Wh!<%E}2_=_*jkkynrkY7C30+XWWAIfa(f0s9 znfw|kJ+U9hWg%kuEYFXlmZ`+eUb9qs4TKm*eHN#|DYIz`!I{o$a$Lh(nMpQ=`jqOKA>pSXFZ!t1O%1xO3I7@sw6=257Zeu|-Agxnr!;`!Gv3{zTD zLrwzwr{!|0(Yc6u`YC8XJe~@ZN$fa4;vL~>%*6+{dt=J2P3DB15xQ=E8FN3whaLPr zF`*9Vx}JcY%=Lv$nb)bflF((Rk!c2=Pdb=WN4NW~7Cf|Cd&SR_-SpBP`NCa4oVf%Q zSrSu=B2!LJYgp4ttszi`SQ25lg>o^rsf@sGeiudsmVGn@(ex_qDN*nAxdwz;?_ZkT zo1Vq}A(?oIUOH9AfAPvhmD8H9dWolJLF1w+moX>(r88?2b6B;8r?7b8t4YQT2kT~D zm!g>BPjI>BvIDC*EcS3!wFnix3h7zq1_7lbN_vuoS#5Ls+P9FGa?Gw1#(r*?b#vfG zLGMlZkau^?$c^y{nXu*DOsYDq+oj zZj*2!L*Y2PDKnD1d}J~2%Ov0ZFgK;u4Y`u-?OSu~SgHpbyAk|(#f@=Hxr0Rtn+2g9 zTh%2)rfImU)20i}0VA46jx6J2&^>GHCiu7f^tW@_Np}rwKTgWU*7APag$-$w zpSvcSRz;U6wDRS>L6)`7{yZ4%5x*p8V{K~2!D*fMu54erGjmIK@1LbOpO#jp$Ea4q z;yY4CUF~PRIPx!3ETV9XiWhAumql?QY#&lBC8Cy@XwYk8LEj}&V|6pwAw(KYZ-UCY zHt~Ya6~C(9ub0xZI=zo-8ylW#FKA-lG)DWWsxCOW42u~R@0$ec^VIA|c5ROxCj7-G zY;5I!3?f|v3X=pFn&D!Q0Jv-^gET`R@B9$$TWQ|8%P2$Ax5{7H+)NE04mZyP6Q;a> za)5_9OZOJCNHyKO|K1Ij;-CT%MI%v>0lcEh$R}Ua$*y*8l8F%@sxSmkwf}9_QX?&bM@}d zXE)P!;fa;Kfz^_Z=&`Ui!T!y##FUpdsz<3oCsU*T^K2%? zy%hP`L<9Tg_*4xxJ%JM52YYLSohqZqi=EC)>?<{5y!JM<{+nX*zV@V&%^|NcUgif# zlWP_jXqzQ;vWb&BSfA4G=swbEs_i>5Th@xbK$AG(RvwiT*?b$Ql>=fDX9M~3sMUo< zCC#zwsNUHwY}TzM(#*8tf%IcoG76|$zh;nAAxSc`cb&|B|3LWoA3hDad1k$wiQW6c z?^;B_r?o>U%TOnH^cyFW(pqh(YWF}D5K;XfRPN5aci5FCIFU?UD6C+*i00wb8e}#^ zagXXZ%i_COqb4%j)wbS#>7-R}=2%937N(amikS#c!n7+{=Fu!MRl0bFWum8NqB%jFWHHhG}>DNN=Kz~$c>miVWL|R zX^jl`UCN>?-W~LN$aa)QTJ^V#UvxnEAv+!{Nj# zJ}F0e6rV4mbuk=1dp`pF5Sm`T6|qk!H7 z5#yYq@Nw;qARvWS26(yQ6VzqVH#t)qA;o=kq2B z@-U18&W2YA_Kz&me-+B?el^$hi%$MU{`|r36_+{psg}Mnu}_a!h`8JC%O1ge>2}?6-u!Is{eiLJHiQKd#lMM}%Yz2cixo?WT^?XQy0d()@ zl76I>pIn>mj|#s7h8-dQ>YbPr93k)_Endrl6&sD|fDyl)9#iX1gvWcAzBR+p*F5RQ zO!$kYiEk@?VhLtXhSTs?_LD&jaH%t1U}8yLQ0G~TSm<+(!Gp9Lg9^J!X3 z?o6oiPD5X)dAr}6Ujx-~Ni5I5J}g|D(x0s6n?){R(gQ-X#VSc!l5vR(&?QP<3l!M& zvoXC^4~;-YOV=8a!{ThvhAW$v*yB+1kQudtQ^&NDNBb~_yh)_cPd>v|bh_=Wok0^7 z_q_TvAGp_J2H2!_>!&`WsL({GHWVQjsJEX#)NOsntkG(q#z9A-8K@-K7M`4pNxw(a z;g?OXZ!Q=Zz@j4`c@|3)A!nJ5(>^CBp3GxJBdes8@$_D|cviu;YSIPn+{OoHHW^d8 zxedGuyVX;=QbZd>-6~TNhva*U&DZ3b;5Sg{$A_cQDZONtdR<33F$K*%> zs%1Dqh4=z6iy%)M@r*m9_Ez!spQQ4BsQ>mcMqTiL`;Bx(_V#yz`t4=10U4LI$4*LtqA@)A%unl|9rYiKkd&tO#d&QrKY)a{OKc}%*AQdy z^u1c+k!@&QuutJ4QdKy|@8gkZRI9LGK2;eDci!evH!BY$iud6TR%mWeZA@b)e>9NE z!ZrHInL6No7^$misludP$3S%&j&EHSpA}~*uW$;Lo^MwXBlh+v$BPGLGJRa+0`yuN zCtUSc{Z8g8IW4bUa)s#$>I=l{nt#pO7(Y)-Q|@SD_(btzaPM|kkhbBXIeHCXBq)0g z5lEenwvj3#2X4^M}gANG?y#31M+@-Z|0=Z@O!Wr4qg$*1S?v+7@T zqKmHquXp6BRGgZ5zM?VxDKN2y^T#fljlEvALq7!4J+_@X@h=e3#K%e^2`5C{^k?eyvMb z34&2wbY^H^+xcJ12L`s|MQ8u5JS^HXt&H(a_Qi5nebEqC5L?NoKX;N8RjwHpiNuDD zQK-f_bT#dfd~>W^z1gguWBJZxR2nn-Hx=q#&>rkgICf0v9GLa#aJWu@fc z;DJtGNcOZOq-ir#O@qHz<+nbngu`5|Ol@XIuK=L^C_l1GL8Ms>N(< zpQu#&7KCRMJdg28qbiK=WVB?l+$S&AB|W~nl)g(y;sjTVClsIUr2aXGzg@OWXwIm9 zf7YMQ>*EG~@?w_SQp>D^U0W*!S=Drjsk$PiL?}U+CN~4Sc_iCgULJK#-3EJY`%NmZ z<;Qd^YHFWK7zJ30^H%R^(_%uU^(czqiaw0u@_$7Jnc}kR^kaaKf=5(4xj^+WIMfJMe zGC7QVBYcgcq{PaWA9Cn=0jX{Gp_No5VPEwn=}Ey(ES`OQ#PYV#=aQp!E0xN+aQht| zGc`XA-1&nc-aE%Eeb3U`U~5@BpHgXj8C_c#bk-{BTW zTmu2!h~J7>@emgSU?d0%_~wf9=7%N3%_j|~m?{)*?2N||kWg@>Qh(e#v+=KMgoiYj z?{t|b=2fS=(rWr`qqeiRSnqz^P;rqab6!Mou$FQc{}jw{ziA%p(0s|*;jUr#4`rT& zrIRt#;Ki<<6@7Gz(ANu0(1!|Y{+d!t;$I|vtrEhM1Nw)ngxg6QqNrvz#WFqIfL z4C;AZq4%vN)U!USVnVQVD-Kms2EemSc}C0bDl5&sfTk0{USO-)2{ z!sW_dPCZy((nhYcuHTVY$-# z!cW)$q1Y{S`X}BT7)c+=wBEgmTXvL9uXo6Pv1s=dFYI7ukL;A5AM)TO1}Ba$k{{oa^P?xZn69G)7n8+^lU8Wo;F(VN{|u3^p}+*`zF2 zp2Av1vi8%I=p*B=Xb{H`Q<)7I-$}JW1h;*%a#g?TiE%?LG(s=jnB9{xBn(ub>d;BN z_dTlpXgq_m2%{Uz6Q>*w5& zNsM%3T2{CHkrtD5j_{T*bt)4xFVNcUbhCCnN_@%5qvW&3f)Z26L@;V0tDbsD6Dnb_ za1;sC_;TKkBj+F#?Digq^koS@Wl)@ZsMyooMYdL=moD353E1+jhv2f3C#}JO1`HS} z^9?x;Qs28oVNK|7kO&UHi23yPV4<>|Qiz0o&k(yz&x-#f^=Um19`O@rtoiHLH~1|` zB$Ce*AK=`5v3p0+RJGYRbQD(B6bn~re1#n?#XuwjFrw**8NK_F87bCtk(4O7Ver!B z;7wd;3vcUWe5y~E2xb~PDZT4J;NlMnA&ufwXN_<^EIMb!@0zq)?r2GnOsJ)0A6}q2 z)}9)66uT`@j2`Ir`hMo>J6VS$s7*{z0Fl@o6deD?lngS;0t&1*n9@dVci0Wusc{Un z=#FX~B?TO%7mwKywSFX%Om8Gbm1jBXTSD)B#W4LQY{CaADw+1VR!QCA3YR6uTb$8A z@c{uE!ic1l0K`0#gYh%=0B}-)r~lk$xzDxVnr*bmf`2iQKpfG5yX{sMEm5u;S=*=0$%ej7Khpcy94X{&Q}4=)5d+ z^V`c2%!#v8-soVf=2}Px8xLBcSqj^D_*h0}6z}>MnQFtgp)lD5l-(n{W(Gd%W;->Q z5XF(rLKTM$4bVbl5TQ}hGUK0k78QSYN*tbz7mm)4ZN|o1NMn=aLJmT zNauK)$ef&;pgtA<8L>sSgB^L!_!)KBlWvGnum33+I+29)0tKM;%)FSh-hBJwahD5s zgvXV?+qd%C0a(R zd9K-jHSt1m>x`K8Ub7J2eSoV56JI5KwkwwjYT4q~#gjQ2WfV?ZuE-h}XUYPnLfAerFxIW4!enwR!c^4EQ^>ohcQ1TRl%}ly%;%PGtWbj1An@NCz z-Q+2CLAA-pPU|00DYa_!<>=}({BXKA-d>7g8Ep*QpFL77>1muR_)GD~@3l|o(4yTX z?)w5u{5OLc%{tK|bJVu1{)R6V_wLgyCbiwHNk@Q(?(3Q_5kJD27O_4w#Uz6NvVk z-`Bchl~vMGK>-&i=R+}L3;o7rjGbCh9MP0y`!Np`h)E8f*Bh4+&Y&iQ2%|pZDVZmi zaApiZaf$@5(B*R>8P-d1-5F+RGU|LyB!QJyXqF)HO6iUoj9yRM->pTikX=k*)RAeC zlhIltLj2>52faLJA45xUaS5RpTabcW$)bZAsvC(pE#E_LnMoJfz4rEW!u{qqY3LOp z_tmm=VVq-le1YGeV8zu*Ce!fH@2xO*qxDuK8?!#?*g@=edJ(^aemx?V!&*W=rCQM) zd;FCwPm}A*?q96i-n!}3p41Qz>fV(zYp1aFYhZm1ap`vZof&X*gNK(W2m23M7Wfau z|0sD&4E$Z9{|8g?=#c+nN(@Q>AdKG-0}%lHw+b{~4i^7gT^2zB2yPADD9S=^N;&Ai zC^sk!>9+Jozkz>e|670n4S_=bCMJqO5l#YVPy%!)qLIJb`J0QV@dgn4qmF>%(GXuq zLGk2ZcnB5H-$o!va!>*|EFK+3@Gp5N0!B~(bXej|jeol9)+RI_4n?>I0JmI(%0F@- zLjEr_5ClsE!H^K@h&IUH8b`3;03HBED8~Z;fgIEyA@i5~p9cTK!VL?ddm{k-TkJPL zaI5uCe-ZR}IfP%pO`C7I|BvPGj{P@b$R7$i6zN~qph##Cgj4@r7#-1v|3>`ZD1ZF@ zEhhW_t)BRQyVSn9_Qv~Puf2auAPzf-(+(0C75V0a&YOV+;nM(!!;Uc&?p#pcdwg@? zIZ`oln)&NK8)5qzuv37?R+9}%8_3?HG@UPaV@7uu&&G~(h&i5;z(6UVNHE9hx%}L- zf(;D(;r(D$67jdc+|mR0h~OFPpF}SgtvpE7=~Wak_J~(kie%{Sy)N*f#qJR_Jn?rY zP%+Y=qP@4G&HztR5W$yRCF082P?)QxZruGs1fwA*i&V?x7VAdCHz!0gM@fKo*?8ZB zY0@QNusg^k!NVm2g_xg(;xa#YtxQz@jq0*dxYoxnqz$ zmPO(LGMsc^!$e#FRL!oUl7A;N1&Yo!_Uq{m_|P?;K9p3MF8U*BLfY`F()McXDWoLheS z_UPC7FY2`?{TByke!hOVU#hpUM4%taN$o9hOU8TNjF<`|5l1KK+#@2=)aEY46Jj%j zk;-mv$kNV-j`gvExZVfuPPvfAw!tXFjR}NS$nCiW7tO_M4YBsTn%64PLZG4TX_0hk4l%a}A)DT>k98w5>geA30a9D~r_d#(l1v$rs2( zn;(EhE5EZ>U`a)6H;>V=*Ru}kLGpr{b8LBPax2w6pUSJ-T)@50-CYI8Lab3AY`Srs zK5F#1JP(tO;i!NR4(?&C)^4b;I}RU)nbzv~W$F z+K+qBf+j3rPET~K&_jI!a218CI1;^&Pno?+Wb%J(XRH=lG=Rmt3)>WPC|vZ+2f2b( z^Q}v6Tad#Y%qB|*!Q`Q1&wX>*G5ngT02$RRZKS(E8S~;U`JBzu``19)Ze1ypgi`1y zXIh7d0;#Pi+*!ZR!li(H(!*%#7p1ar%2YpFzXx?)edV#LavIFZsOmPn ztS$i|=#(5Jhl)#w`Sr;z6?o1X1Ue~ccRvW{2Mb59>q;Uqn<^zes;&&K#K6F)Y**(w zKt239`-yozz~pr}{iYC=#UUL2kX)?1s12XCuquTHTrZ!(49B)q8Z39hlTMKfS8z~t zO-C7pNKsdX;gBe73K~y2kJwP|9Uk@}g_0#S?<`0J;Al{a_3_5sqeVqJ2tiIs?3vxd ztg`jUN*iC{`t?$(a{Cdnk=z*0&VAZy_&dDV7IV%>r(r4ieAsdFQ=DFx?Zs6N+6a_< z>}0e^U(B6#_2CUk6%c0o3rnROA-6AjRwwcn=>7)TwI!jG>teH5l@_1Teioj9*&e-? z-_K`yfqg5~VrLJ*I1BCB)eNXJ zkl^%k7a|1ffQ%$T%g?$WFx6lYfBZHqF%_v%e&4w5@!e{~F?uA+l}>@0C9vedT>s))GNZ*S8Iq>{rhmi(mP&FGIZXMP%g7cWy(UXhNMa>-c9If`(5u z=SEPk10p8kln{Z-=TuiI*h`gY2Aw=8l8y{YZnf$o&QsJzXE_%? z^5lKE){IIYTiw2yl^P}d(_4+S4cV7G08WpK*AG?_NwIrRBgtkBo=1F={XSp_pL^gj z7NUj&SERwIZ7BFGL#fcwZXwCrB-6+#G)iCn=(LA?3M*gTCSgWNg;q*Rn^_#y^v9RA zK-`zIdX(aLTPQD#`H*a)X=v^Ab9m2Fm^E!n=*z9-EMChB$$Wcp);T3ZK3KV>FmS=z#)YpZ9aph||ye_$-U$XhN`{prO6)Nw%~qDsACCUfOA; z6ISLPT`d%w{l=!}E%{r^?IK!RXLjQwMonOJAFqd0=0M%E7nwPx<3BI%s-398TB(Dm zy860|eL>^>hx`?3nfQATep+~HZ$SM}m^b{93aa`sKk7h}%jHqZ<~n5^mMuZ1e6@xu zCXAAbL*yuC8VeEtQdRMA1VD!;h63GfK9PGi;U^zwzSz?At)44eX{OcN*4bPZsR>C$ zLKEcB`xlaM&CNqA*i?k-bOqa+2h6} zJ6tP1Z4tWgA>2P}#tF;Pxr39}!A65|&il@Y>GYzvOFk+*b~W}`?pcr{O0Vz?u2*1U zh5~Y?=2ubH_muvO(&5h8lmJC9G(Vq7`%#?uH{@ufBFgCE$AdL`&7g!nnonRWm8`)` z`=dO@DYA$~^PCQx93gw>roz}9G@?RsR&XeaL|+yz=mwV*8-hvE$QR*m?ZE|Iu29$J+WO|fatEq_dr=E(P``SD% z>lHehlS)M*7fte3S3Y7PM{cdbU}S*;wFHAfM0;4lLGtt?(YCZFxUtdM>+#_qv{Ovy z?Q4;pL$PrtFDQrD+Lq>#12U-dX(dTOt73@F$N!by?0Tcn zdq(P#c?@JmaBH&k$Lzp?(UtEi-=FtoJT0IKT1&O`+9}gH5q;h>TTJH1NpUv!J@pcN z4Gez$EQnrb9QooGwvDUA8T6spDbbjq?Ct(%=r+`xvVO|qC>_I_&`VHl3s z>rul2;;k?H7uZ>RduusQn5wpUMKj)39l`^^#aG&KkRYRcflMiSau(mr4E5xHHhiNZ zWN&C*&hcX`SS?vV~dFGJ#uH^j*nR)g*+11W)TQ-Li8`Ilo3Eq(Uv{ z)XTMkb0wZKf4datiV?#+rHUOH-2yy_4S_gDTUZaVhDF0`#Yh7i0)ui*GD z)SuqN{oKO+@ZlG!Q9gL#F~88)@oS)<`+DjB0Dg_z3jhEB literal 0 HcmV?d00001 diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index d45d1f7..e793657 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -516,6 +516,15 @@ endif HTML_MACOSX_MANS = macosx-ups.html +SRC_LINUX_I2C_PAGES = asem.txt +MAN_LINUX_I2C_PAGES = asem.8 + +if WITH_LINUX_I2C + man8_MANS += $(LINUX_I2C_PAGES) +endif + +HTML_LINUX_I2C_MANS = asem.html + # SOME_DRIVERS endif @@ -533,7 +542,8 @@ MAN_MANS = \ $(MAN_NETXML_PAGES) \ $(MAN_POWERMAN_PAGES) \ $(MAN_IPMIPSU_PAGES) \ - $(MAN_MACOSX_PAGES) + $(MAN_MACOSX_PAGES) \ + $(MAN_LINUX_I2C_PAGES) # distribute everything, even those not installed by default # Note that 'dist' target requires AsciiDoc! @@ -550,6 +560,7 @@ EXTRA_DIST = \ $(SRC_POWERMAN_PAGES) \ $(SRC_IPMIPSU_PAGES) \ $(SRC_MACOSX_PAGES) \ + $(SRC_LINUX_I2C_PAGES) \ $(MAN_MANS) \ asciidoc.conf @@ -565,7 +576,8 @@ HTML_MANS = \ $(HTML_NETXML_MANS) \ $(HTML_POWERMAN_MANS) \ $(HTML_IPMIPSU_MANS) \ - $(HTML_MACOSX_MANS) + $(HTML_MACOSX_MANS) \ + $(HTML_LINUX_I2C_MANS) all: @@ -581,10 +593,12 @@ if HAVE_ASCIIDOC $(ASCIIDOC) --backend=xhtml11 \ --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ --attribute localtime=`TZ=UTC date +%H:%M:%S` \ + --attribute nutversion="@PACKAGE_VERSION@" \ -o $@ $< ### Prior to Asciidoc ~8.6.8, the --destination-dir flag didn't seem to affect the location of the intermediate .xml file. A2X_MANPAGE_OPTS = --doctype manpage --format manpage \ + --xsltproc-opts "--nonet" \ --attribute mansource="Network UPS Tools" \ --attribute manversion="@PACKAGE_VERSION@" \ --attribute manmanual="NUT Manual" \ @@ -605,18 +619,48 @@ A2X_MANPAGE_OPTS = --doctype manpage --format manpage \ else !HAVE_ASCIIDOC .txt.html: - @echo "Not (re)building $@ manual page, since 'asciidoc' was not found." + @if [ -r "$@" ]; then \ + echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ + else \ + echo "Could not find prebuilt $@ manual page." ; \ + echo "If you are building from Git, do you have all of the asciidoc/a2x tools installed?"; \ + exit 1; \ + fi .txt.1: - @echo "Using existing $@ manual page, since 'asciidoc' was not found." + @if [ -r "$@" ]; then \ + echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ + else \ + echo "Could not find prebuilt $@ manual page." ; \ + echo "If you are building from Git, do you have all of the asciidoc/a2x tools installed?"; \ + exit 1; \ + fi .txt.3: - @echo "Using existing $@ manual page, since 'asciidoc' was not found." + @if [ -r "$@" ]; then \ + echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ + else \ + echo "Could not find prebuilt $@ manual page." ; \ + echo "If you are building from Git, do you have all of the asciidoc/a2x tools installed?"; \ + exit 1; \ + fi .txt.5: - @echo "Using existing $@ manual page, since 'asciidoc' was not found." + @if [ -r "$@" ]; then \ + echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ + else \ + echo "Could not find prebuilt $@ manual page." ; \ + echo "If you are building from Git, do you have all of the asciidoc/a2x tools installed?"; \ + exit 1; \ + fi .txt.8: - @echo "Using existing $@ manual page, since 'asciidoc' was not found." + @if [ -r "$@" ]; then \ + echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ + else \ + echo "Could not find prebuilt $@ manual page." ; \ + echo "If you are building from Git, do you have all of the asciidoc/a2x tools installed?"; \ + exit 1; \ + fi endif !HAVE_ASCIIDOC diff --git a/docs/man/Makefile.in b/docs/man/Makefile.in index 7936892..e2fb1a8 100644 --- a/docs/man/Makefile.in +++ b/docs/man/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -29,23 +28,51 @@ # FIXME: investigate an autogen.sh hook # - Ref: http://www.gnu.org/software/hello/manual/automake/Man-pages.html VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -79,8 +106,9 @@ target_triplet = @target@ @SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__append_8 = $(MAN_POWERMAN_PAGES) @SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@am__append_9 = $(MAN_IPMIPSU_PAGES) @SOME_DRIVERS_FALSE@@WITH_MACOSX_TRUE@am__append_10 = $(MAN_MACOSX_PAGES) +@SOME_DRIVERS_FALSE@@WITH_LINUX_I2C_TRUE@am__append_11 = $(LINUX_I2C_PAGES) subdir = docs/man -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -109,6 +137,18 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -151,10 +191,12 @@ man5dir = $(mandir)/man5 man8dir = $(mandir)/man8 NROFF = nroff MANS = $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -261,12 +303,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -311,6 +356,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -384,7 +430,7 @@ MAN_CLIENT_PAGES = \ man8_MANS = $(MAN_CLIENT_PAGES) $(MAN_TOOL_PAGES) $(am__append_2) \ $(am__append_3) $(am__append_4) $(am__append_5) \ $(am__append_6) $(am__append_7) $(am__append_8) \ - $(am__append_9) $(am__append_10) + $(am__append_9) $(am__append_10) $(am__append_11) HTML_CLIENT_MANS = \ nutupsdrv.html \ upsc.html \ @@ -782,6 +828,9 @@ HTML_DEV_MANS = \ @SOME_DRIVERS_FALSE@SRC_MACOSX_PAGES = macosx-ups.txt @SOME_DRIVERS_FALSE@MAN_MACOSX_PAGES = macosx-ups.8 @SOME_DRIVERS_FALSE@HTML_MACOSX_MANS = macosx-ups.html +@SOME_DRIVERS_FALSE@SRC_LINUX_I2C_PAGES = asem.txt +@SOME_DRIVERS_FALSE@MAN_LINUX_I2C_PAGES = asem.8 +@SOME_DRIVERS_FALSE@HTML_LINUX_I2C_MANS = asem.html # SOME_DRIVERS MAN_MANS = \ @@ -798,7 +847,8 @@ MAN_MANS = \ $(MAN_NETXML_PAGES) \ $(MAN_POWERMAN_PAGES) \ $(MAN_IPMIPSU_PAGES) \ - $(MAN_MACOSX_PAGES) + $(MAN_MACOSX_PAGES) \ + $(MAN_LINUX_I2C_PAGES) # distribute everything, even those not installed by default @@ -816,6 +866,7 @@ EXTRA_DIST = \ $(SRC_POWERMAN_PAGES) \ $(SRC_IPMIPSU_PAGES) \ $(SRC_MACOSX_PAGES) \ + $(SRC_LINUX_I2C_PAGES) \ $(MAN_MANS) \ asciidoc.conf @@ -831,13 +882,15 @@ HTML_MANS = \ $(HTML_NETXML_MANS) \ $(HTML_POWERMAN_MANS) \ $(HTML_IPMIPSU_MANS) \ - $(HTML_MACOSX_MANS) + $(HTML_MACOSX_MANS) \ + $(HTML_LINUX_I2C_MANS) CLEANFILES = *.xml *.html SUFFIXES = .txt .html .1 .3 .5 .8 ### Prior to Asciidoc ~8.6.8, the --destination-dir flag didn't seem to affect the location of the intermediate .xml file. @HAVE_ASCIIDOC_TRUE@A2X_MANPAGE_OPTS = --doctype manpage --format manpage \ +@HAVE_ASCIIDOC_TRUE@ --xsltproc-opts "--nonet" \ @HAVE_ASCIIDOC_TRUE@ --attribute mansource="Network UPS Tools" \ @HAVE_ASCIIDOC_TRUE@ --attribute manversion="@PACKAGE_VERSION@" \ @HAVE_ASCIIDOC_TRUE@ --attribute manmanual="NUT Manual" \ @@ -1047,27 +1100,14 @@ uninstall-man8: } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -1207,18 +1247,18 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man5 \ .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-man1 \ - install-man3 install-man5 install-man8 install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-man uninstall-man1 uninstall-man3 uninstall-man5 \ - uninstall-man8 + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-man3 install-man5 install-man8 \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am uninstall-man uninstall-man1 \ + uninstall-man3 uninstall-man5 uninstall-man8 all: @@ -1229,6 +1269,7 @@ html-man: $(HTML_MANS) index.html @HAVE_ASCIIDOC_TRUE@ $(ASCIIDOC) --backend=xhtml11 \ @HAVE_ASCIIDOC_TRUE@ --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ @HAVE_ASCIIDOC_TRUE@ --attribute localtime=`TZ=UTC date +%H:%M:%S` \ +@HAVE_ASCIIDOC_TRUE@ --attribute nutversion="@PACKAGE_VERSION@" \ @HAVE_ASCIIDOC_TRUE@ -o $@ $< @HAVE_ASCIIDOC_TRUE@.txt.1: @@ -1244,19 +1285,49 @@ html-man: $(HTML_MANS) index.html @HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) $< @HAVE_ASCIIDOC_FALSE@.txt.html: -@HAVE_ASCIIDOC_FALSE@ @echo "Not (re)building $@ manual page, since 'asciidoc' was not found." +@HAVE_ASCIIDOC_FALSE@ @if [ -r "$@" ]; then \ +@HAVE_ASCIIDOC_FALSE@ echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ +@HAVE_ASCIIDOC_FALSE@ else \ +@HAVE_ASCIIDOC_FALSE@ echo "Could not find prebuilt $@ manual page." ; \ +@HAVE_ASCIIDOC_FALSE@ echo "If you are building from Git, do you have all of the asciidoc/a2x tools installed?"; \ +@HAVE_ASCIIDOC_FALSE@ exit 1; \ +@HAVE_ASCIIDOC_FALSE@ fi @HAVE_ASCIIDOC_FALSE@.txt.1: -@HAVE_ASCIIDOC_FALSE@ @echo "Using existing $@ manual page, since 'asciidoc' was not found." +@HAVE_ASCIIDOC_FALSE@ @if [ -r "$@" ]; then \ +@HAVE_ASCIIDOC_FALSE@ echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ +@HAVE_ASCIIDOC_FALSE@ else \ +@HAVE_ASCIIDOC_FALSE@ echo "Could not find prebuilt $@ manual page." ; \ +@HAVE_ASCIIDOC_FALSE@ echo "If you are building from Git, do you have all of the asciidoc/a2x tools installed?"; \ +@HAVE_ASCIIDOC_FALSE@ exit 1; \ +@HAVE_ASCIIDOC_FALSE@ fi @HAVE_ASCIIDOC_FALSE@.txt.3: -@HAVE_ASCIIDOC_FALSE@ @echo "Using existing $@ manual page, since 'asciidoc' was not found." +@HAVE_ASCIIDOC_FALSE@ @if [ -r "$@" ]; then \ +@HAVE_ASCIIDOC_FALSE@ echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ +@HAVE_ASCIIDOC_FALSE@ else \ +@HAVE_ASCIIDOC_FALSE@ echo "Could not find prebuilt $@ manual page." ; \ +@HAVE_ASCIIDOC_FALSE@ echo "If you are building from Git, do you have all of the asciidoc/a2x tools installed?"; \ +@HAVE_ASCIIDOC_FALSE@ exit 1; \ +@HAVE_ASCIIDOC_FALSE@ fi @HAVE_ASCIIDOC_FALSE@.txt.5: -@HAVE_ASCIIDOC_FALSE@ @echo "Using existing $@ manual page, since 'asciidoc' was not found." +@HAVE_ASCIIDOC_FALSE@ @if [ -r "$@" ]; then \ +@HAVE_ASCIIDOC_FALSE@ echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ +@HAVE_ASCIIDOC_FALSE@ else \ +@HAVE_ASCIIDOC_FALSE@ echo "Could not find prebuilt $@ manual page." ; \ +@HAVE_ASCIIDOC_FALSE@ echo "If you are building from Git, do you have all of the asciidoc/a2x tools installed?"; \ +@HAVE_ASCIIDOC_FALSE@ exit 1; \ +@HAVE_ASCIIDOC_FALSE@ fi @HAVE_ASCIIDOC_FALSE@.txt.8: -@HAVE_ASCIIDOC_FALSE@ @echo "Using existing $@ manual page, since 'asciidoc' was not found." +@HAVE_ASCIIDOC_FALSE@ @if [ -r "$@" ]; then \ +@HAVE_ASCIIDOC_FALSE@ echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ +@HAVE_ASCIIDOC_FALSE@ else \ +@HAVE_ASCIIDOC_FALSE@ echo "Could not find prebuilt $@ manual page." ; \ +@HAVE_ASCIIDOC_FALSE@ echo "If you are building from Git, do you have all of the asciidoc/a2x tools installed?"; \ +@HAVE_ASCIIDOC_FALSE@ exit 1; \ +@HAVE_ASCIIDOC_FALSE@ fi # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/docs/man/al175.8 b/docs/man/al175.8 index c86d122..297d4f7 100644 --- a/docs/man/al175.8 +++ b/docs/man/al175.8 @@ -1,13 +1,13 @@ '\" t .\" Title: al175 .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "AL175" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "AL175" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -77,7 +77,6 @@ Besides status, this driver reads UPS state into following variables: .sp -1 .IP \(bu 2.3 .\} - \fBups\&.test\&.result\fR .RE .sp @@ -89,7 +88,6 @@ Besides status, this driver reads UPS state into following variables: .sp -1 .IP \(bu 2.3 .\} - \fBoutput\&.voltage\&.nominal\fR .RE .sp @@ -101,7 +99,6 @@ Besides status, this driver reads UPS state into following variables: .sp -1 .IP \(bu 2.3 .\} - \fBoutput\&.current\fR .RE .sp @@ -113,7 +110,6 @@ Besides status, this driver reads UPS state into following variables: .sp -1 .IP \(bu 2.3 .\} - \fBbattery\&.voltage\&.nominal\fR .RE .sp @@ -125,7 +121,6 @@ Besides status, this driver reads UPS state into following variables: .sp -1 .IP \(bu 2.3 .\} - \fBbattery\&.current\fR .RE .sp @@ -137,7 +132,6 @@ Besides status, this driver reads UPS state into following variables: .sp -1 .IP \(bu 2.3 .\} - \fBbattery\&.temperature\fR .RE .sp @@ -149,7 +143,6 @@ Besides status, this driver reads UPS state into following variables: .sp -1 .IP \(bu 2.3 .\} - \fBinput\&.transfer\&.boost\&.low\fR .RE .SH "KNOWN ISSUES AND BUGS" diff --git a/docs/man/apcsmart-old.8 b/docs/man/apcsmart-old.8 index 9aa7c06..dc8c5d0 100644 --- a/docs/man/apcsmart-old.8 +++ b/docs/man/apcsmart-old.8 @@ -1,13 +1,13 @@ '\" t .\" Title: apcsmart-old .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "APCSMART\-OLD" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "APCSMART\-OLD" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/apcsmart.8 b/docs/man/apcsmart.8 index 6b9b69f..7dc6cfd 100644 --- a/docs/man/apcsmart.8 +++ b/docs/man/apcsmart.8 @@ -1,13 +1,13 @@ '\" t .\" Title: apcsmart .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "APCSMART" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "APCSMART" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -33,7 +33,7 @@ apcsmart \- Driver for American Power Conversion Smart Protocol UPS equipment .sp \fBapcsmart\fR \-h .sp -\fBapcsmart\fR \-a \*(AqUPS_NAME\*(Aq [\-x option=value \&...] +\fBapcsmart\fR \-a \fIUPS_NAME\fR [\-x option=value \&...] .if n \{\ .sp .\} @@ -52,15 +52,15 @@ This man page only documents the hardware\-specific features of the apcsmart dri .RE .SH "SUPPORTED HARDWARE" .sp -The apcsmart driver should recognize (or at the very least work with) majority of Smart\-UPS models \- which includes Smart\-UPS, Matrix\-UPS and Back\-UPS lineups, among few other ones\&. +The apcsmart driver should recognize (or at the very least, work with) the majority of Smart\-UPS models \- which includes Smart\-UPS, Matrix\-UPS and Back\-UPS lineups, among few other ones\&. .sp -Currently we can roughly divide APC hardware into 3 groups (note that the division isn\*(Aqt strict by any means, and the borders between those are pretty fuzzy): +Currently, we can roughly divide APC hardware into four groups (note that the division isn\(cqt strict by any means, and the borders between those are pretty fuzzy): .PP [very] "old" models .RS 4 These models usually have old APC logo, white color and \fIno\fR -programmable eeprom; You won\*(Aqt find them listed anywhere on APC\(cqs site either\&. The support for those will be usually based on driver\*(Aqs compatibility tables, or if the model (firmware) is not listed in those \- the driver will try to follow the very basic subset of features, while still trying to remain useful\&. Despite "smart" tagname, they often tend to behave in pretty dumb way (see the section below about shutdown behaviour)\&. +programmable EEPROM; you won\(cqt find them listed anywhere on APC\(cqs site either\&. The support for those will be usually based on driver\(cqs compatibility tables, or if the model (firmware) is not listed in those \- the driver will try to follow the very basic subset of features, while still trying to remain useful\&. Despite "smart" tagname, they often tend to behave in pretty dumb way (see the section below about shutdown behaviour)\&. .PP \fBExample models:\fR .sp @@ -89,16 +89,52 @@ Smart\-UPS 900I .PP "new" models .RS 4 -These models usually come from late 1990s / pre\-2009 times\&. They are often referred as "3rd\&. gen"\&. For the most part, they have programmable eeprom, report supported commands and capabilites, and should work just fine with the apcsmart driver\&. +These models usually come from late 1990s / pre\-2009 times\&. They are often referred as "3rd\&. gen"\&. For the most part, they have programmable EEPROM, report supported commands and capabilites, and should work just fine with the apcsmart driver\&. .RE .PP "microlink" models .RS 4 WARNING: these are not \fInatively\fR -supported by apcsmart (or apcupsd for that matter, if you\(cqre wondering)\&. Around 2007 APC (now APC Schneider) decided to go back to its proprietry roots and all the new models (SMT, SMX, SURTD) use completely different protocol and cables\&. If you purchased a new APC UPS, that uses cable with rj45 on the one end, and db\-9 on the other \- then you have such model\&. Your only option to support it through +supported by +\fBapcsmart\fR +(or +\fBapcupsd\fR, for that matter, if you\(cqre wondering)\&. Around 2007, APC (now APC Schneider) decided to go back to its proprietry roots, and all the new models (SMT, SMX, SURTD) use completely different protocol and cables\&. If you purchased a new APC UPS \- that uses cable with RJ45 on the one end, and DB\-9 on the other \- then you have such model\&. Your only option to support it through \fBNUT\fR -is to purchase "legacy communications card" \- part #AP9620 (google \*(AqAP9620\*(Aq for more details)\&. Or if that\*(Aqs not an option, rely on official software\&. +is to purchase a "legacy communications card" \- part #AP9620 (google \*(AqAP9620\*(Aq for more details)\&. Or if that\(cqs not an option, rely on official software\&. +.RE +.PP +Microsol models +.RS 4 +Several Microsol serial models sold in Brazil have been rebranded as APC Back\-UPS, and the model numbers tend to start with "BZ"\&. If you have one of these "Nobreaks", they will not work with the +\fBapcsmart\fR +driver \- please see the +\fBsolis\fR(8) +driver instead\&. +.PP +\fBExample models:\fR +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Back\-UPS BZ1200\-BR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Back\-UPS BZ2200BI\-BR +.RE .RE .sp Another thing to remember is that Smart protocol is not USB protocol\&. If you have UPS with both USB and serial ports, then depending on how you connect it, you will need either apcsmart or usbhid\-ups driver\&. @@ -135,7 +171,7 @@ Alternatively, you can also provide it on the command line using: \-x \fBcable\fR=940\-0095B .SH "TTY MODES" .sp -By default the driver works in canonical mode, but it showed to be a problem in windows systems\&. Furthermore there\(cqs a possibility of some obscure serial cards or serial\-usb convertes that could cause problems as well\&. You can use \*(Aqttymode=\*(Aq option to force non\-canonical discipline in \fBups.conf\fR(5): +By default the driver works in canonical mode, but it proved to be a problem in Windows systems\&. Furthermore there\(cqs a possibility of some obscure serial cards or serial\-USB converters that could cause problems as well\&. You can use \*(Aqttymode=\*(Aq option to force non\-canonical discipline in \fBups.conf\fR(5): .sp \fBttymode\fR=raw .sp @@ -165,7 +201,7 @@ APC hardware supports a lot of shutdown methods, that themselves can differ in b \fBS\fR (soft hibernate) .RS 4 This is most basic command present in probably all APC models\&. It will hibernate the UPS, and subsequently wake it up when the mains supply returns\&. -\fBThe command doesn\*(Aqt work if UPS is running on mains\&.\fR +\fBThe command doesn\(cqt work if the UPS is running on mains\&.\fR .PP "old" models .RS 4 @@ -174,7 +210,7 @@ The behaviour here is unfortunately pretty primitive \- when the power returns, .PP "new" models .RS 4 -The behaviour here is as expected \- the power is cut off after the eeprom defined grace period\&. The UPS will wake up when the power returns, after the eeprom defined delay AND if the eeprom defined min\&. battery charge level is met\&. The delay is counted from the power\*(Aqs return\&. +The behaviour here is as expected \- the power is cut off after the EEPROM defined grace period\&. The UPS will wake up when the power returns, after the EEPROM defined delay AND if the EEPROM defined min\&. battery charge level is met\&. The delay is counted from the power\*(Aqs return\&. .RE .RE .PP @@ -206,8 +242,8 @@ If nnn = 000, then UPS will do precisely nothing\&. On those models you\*(Aqre b .PP "new" models .RS 4 -All the usual variables defined in eeprom are respected (see -\fBS\fR)\&. Additionally, if nnn > 0, the nnn*6 minutes are added to eeprom defined delay\&. UPS will not power up if it\*(Aqs running on batteries, contrary to what "old" models used to do \- the combined delay is counted from the moment of power return\&. +All the usual variables defined in EEPROM are respected (see +\fBS\fR)\&. Additionally, if nnn > 0, the nnn*6 minutes are added to EEPROM defined delay\&. UPS will not power up if it\*(Aqs running on batteries, contrary to what "old" models used to do \- the combined delay is counted from the moment of power return\&. .RE .sp Supposedly there exist models that take 2 digits instead of 3\&. Just in case, NUT also supports such variation\&. You have to provide exactly 2 digits to trigger it (\fBawd\fR @@ -216,7 +252,7 @@ option, or argument to one of the supported instant commands)\&. .PP \fBK\fR (delayed poweroff) .RS 4 -This is permanent poweroff \- the UPS will not wake up automatically\&. On newer units, it will respect applicable eeprom variables\&. +This is permanent poweroff \- the UPS will not wake up automatically\&. On newer units, it will respect applicable EEPROM variables\&. .RE .PP \fBZ\fR (instant poweroff) @@ -366,7 +402,7 @@ Hard hibernate\*(Aqs additional wakeup delay can be provided by \fBawd\fR\&. .RE .SH "IGNORING LB STATE" .sp -APC units \- even if they report LB mode \- will not go into shutdown automatically\&. This gives us even more control with reference to "when to actually shutdown psu"\&. Since version 2\&.6\&.2, NUT supports \fBignorelb\fR option in driver\*(Aqs section of \fBups.conf\fR(5)\&. When such option is in effect, the core driver will ignore LB state as reported by specific driver and start shutdown basing the decision \fIonly\fR on two conditions: +APC units \- even if they report LB mode \- will not go into shutdown automatically\&. This gives us even more control with reference to "when to actually shutdown PSU"\&. Since version 2\&.6\&.2, NUT supports \fBignorelb\fR option in driver\(cqs section of \fBups.conf\fR(5)\&. When such option is in effect, the core driver will ignore LB state as reported by specific driver and start shutdown basing the decision \fIonly\fR on two conditions: .sp battery\&.charge < battery\&.charge\&.low .sp @@ -376,7 +412,7 @@ battery\&.runtime < battery\&.runtime\&.low .sp Of course \- if any of the variables are not available, the appropriate condition is not checked\&. If you want to explicitly disable one of the conditions, simply override the right hand variable causing the condition to always evaluate to false (you can even provide negative numbers)\&. .sp -APC UPSes don\*(Aqt have battery\&.charge\&.low \- you will have to define it if you want to use such condition (prefix the variable with override\&. or default\&.)\&. +APC UPSes don\(cqt have battery\&.charge\&.low \- you will have to define it if you want to use such condition (prefix the variable with override\&. or default\&.)\&. .sp "New" units have battery\&.runtime\&.low, but depending on battery quality, firmware version, calibration and UPS load \- this variable can be underestimated quite a bit \- especially right after going into OB state\&. This in turn can cause LB to be asserted, which under normal conditions will cause \fBNUT\fR to initiate the shutdown\&. You might want to disable this condition entirely, when relying on \fBignorelb\fR option (this was actually the main motivation behind introduction of such feature)\&. .sp @@ -535,7 +571,7 @@ calibrate\&.stop .RE .SH "PREVIOUS DRIVER VERSION" .sp -Previous driver is still available as apcsmart\-old \- should there be any need to use earlier version (bugs, incompatiblities with new functionality, etc\&.)\&. In due time apcsmart\-old will be phased out completely, but this won\(cqt happen until the new version gets solid exposure with no pending issues\&. +Previous driver is still available as \fBapcsmart\-old\fR, should there be any need to use earlier version (bugs, incompatiblities with new functionality, etc\&.)\&. In due time, \fBapcsmart\-old\fR will be phased out completely, but this won\(cqt happen until the new version gets solid exposure with no pending issues\&. .SH "BUGS" .sp Some older APC UPS models return bogus data in the status register during a front panel test\&. This is usually detected and discarded, but some other unexpected values have occasionally slipped through\&. @@ -546,7 +582,7 @@ APC UPS models with both USB and serial ports require a power cycle when switchi Nigel Metheringham (drawing heavily on the original apcsmart driver by Russell Kroll)\&. This driver was called newapc for a time and was renamed in the 1\&.5 series\&. In 2\&.6\&.2 it was renamed to apcsmart\-old, being superseded by updated version with new features, which is maintained by Michal Soltys .SH "SEE ALSO" .sp -\fBnutupsdrv\fR(8), \fBups.conf\fR(5) +\fBnutupsdrv\fR(8), \fBups.conf\fR(5), \fBusbhid-ups\fR(8), \fBsolis\fR(8) .SS "Internet resources:" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/apcsmart.txt b/docs/man/apcsmart.txt index 2ec0a34..6a474c7 100644 --- a/docs/man/apcsmart.txt +++ b/docs/man/apcsmart.txt @@ -11,7 +11,7 @@ SYNOPSIS *apcsmart* -h -*apcsmart* -a \'UPS_NAME' [-x option=value ...] +*apcsmart* -a 'UPS_NAME' [-x option=value ...] NOTE: This man page only documents the hardware-specific features of the apcsmart driver. For information about the core driver, see @@ -21,17 +21,17 @@ linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ -The apcsmart driver should recognize (or at the very least work with) majority -of Smart-UPS models - which includes Smart-UPS, Matrix-UPS and Back-UPS lineups, -among few other ones. +The apcsmart driver should recognize (or at the very least, work with) the +majority of Smart-UPS models - which includes Smart-UPS, Matrix-UPS and Back-UPS +lineups, among few other ones. -Currently we can roughly divide APC hardware into 3 groups (note that the -division isn\'t strict by any means, and the borders between those are pretty fuzzy): +Currently, we can roughly divide APC hardware into four groups (note that the +division isn't strict by any means, and the borders between those are pretty fuzzy): [very] "old" models:: These models usually have old APC logo, white color and _no_ programmable - eeprom; You won\'t find them listed anywhere on APC's site either. The support - for those will be usually based on driver\'s compatibility tables, or if the + EEPROM; you won't find them listed anywhere on APC's site either. The support + for those will be usually based on driver's compatibility tables, or if the model (firmware) is not listed in those - the driver will try to follow the very basic subset of features, while still trying to remain useful. Despite "smart" tagname, they often tend to behave in pretty dumb way (see the @@ -45,19 +45,32 @@ division isn\'t strict by any means, and the borders between those are pretty fu "new" models:: These models usually come from late 1990s / pre-2009 times. They are often - referred as "3rd. gen". For the most part, they have programmable eeprom, + referred as "3rd. gen". For the most part, they have programmable EEPROM, report supported commands and capabilites, and should work just fine with the apcsmart driver. "microlink" models:: - WARNING: these are not _natively_ supported by apcsmart (or apcupsd for that - matter, if you\'re wondering). Around 2007 APC (now APC Schneider) decided to - go back to its proprietry roots and all the new models (SMT, SMX, SURTD) use - completely different protocol and cables. If you purchased a new APC UPS, - that uses cable with rj45 on the one end, and db-9 on the other - then you - have such model. Your only option to support it through *NUT* is to - purchase "legacy communications card" - part #AP9620 (google \'AP9620' for - more details). Or if that\'s not an option, rely on official software. + WARNING: these are not _natively_ supported by *apcsmart* (or *apcupsd*, + for that matter, if you're wondering). Around 2007, APC (now APC Schneider) + decided to go back to its proprietry roots, and all the new models (SMT, + SMX, SURTD) use completely different protocol and cables. If you purchased + a new APC UPS - that uses cable with RJ45 on the one end, and DB-9 on the + other - then you have such model. Your only option to support it through + *NUT* is to purchase a "legacy communications card" - part #AP9620 (google + \'AP9620' for more details). Or if that's not an option, rely on official + software. + +Microsol models:: + Several Microsol serial models sold in Brazil have been rebranded as APC + Back-UPS, and the model numbers tend to start with "BZ". If you have one + of these "Nobreaks", they will not work with the *apcsmart* driver - please + see the linkman:solis[8] driver instead. ++ +-- +.Example models: + * Back-UPS BZ1200-BR + * Back-UPS BZ2200BI-BR +-- Another thing to remember is that Smart protocol is not USB protocol. If you have UPS with both USB and serial ports, then depending on how you connect it, @@ -92,9 +105,9 @@ Alternatively, you can also provide it on the command line using: TTY MODES --------- -By default the driver works in canonical mode, but it showed to be a problem in -windows systems. Furthermore there's a possibility of some obscure serial cards -or serial-usb convertes that could cause problems as well. You can use +By default the driver works in canonical mode, but it proved to be a problem in +Windows systems. Furthermore there's a possibility of some obscure serial cards +or serial-USB converters that could cause problems as well. You can use \'ttymode=' option to force non-canonical discipline in linkman:ups.conf[5]: *ttymode*=raw @@ -114,7 +127,7 @@ behaviour quite a bit, depending on the model. *S* (soft hibernate):: This is most basic command present in probably all APC models. It will hibernate the UPS, and subsequently wake it up when the mains supply - returns. *The command doesn\'t work if UPS is running on mains.* + returns. *The command doesn't work if the UPS is running on mains.* "old" models::: The behaviour here is unfortunately pretty primitive - when the power @@ -123,8 +136,8 @@ behaviour quite a bit, depending on the model. "new" models::: The behaviour here is as expected - the power is cut off after the - eeprom defined grace period. The UPS will wake up when the power - returns, after the eeprom defined delay AND if the eeprom defined min. + EEPROM defined grace period. The UPS will wake up when the power + returns, after the EEPROM defined delay AND if the EEPROM defined min. battery charge level is met. The delay is counted from the power\'s return. @@ -154,8 +167,8 @@ command if your UPS supports it (and is not too old, see below). connection is kept alive). "new" models::: - All the usual variables defined in eeprom are respected (see *S*). - Additionally, if nnn > 0, the $$nnn*6$$ minutes are added to eeprom + All the usual variables defined in EEPROM are respected (see *S*). + Additionally, if nnn > 0, the $$nnn*6$$ minutes are added to EEPROM defined delay. UPS will not power up if it\'s running on batteries, contrary to what "old" models used to do - the combined delay is counted from the moment of power return. @@ -167,7 +180,7 @@ trigger it (*awd* option, or argument to one of the supported instant commands). *K* (delayed poweroff):: This is permanent poweroff - the UPS will not wake up automatically. On - newer units, it will respect applicable eeprom variables. + newer units, it will respect applicable EEPROM variables. *Z* (instant poweroff):: This is also permanent poweroff - the UPS will not wake up automatically. @@ -248,8 +261,8 @@ IGNORING LB STATE APC units - even if they report LB mode - will not go into shutdown automatically. This gives us even more control with reference to "when to -actually shutdown psu". Since version 2.6.2, NUT supports *ignorelb* option in -driver\'s section of linkman:ups.conf[5]. When such option is in effect, +actually shutdown PSU". Since version 2.6.2, NUT supports *ignorelb* option in +driver's section of linkman:ups.conf[5]. When such option is in effect, the core driver will ignore LB state as reported by specific driver and start shutdown basing the decision _only_ on two conditions: @@ -264,8 +277,8 @@ is not checked. If you want to explicitly disable one of the conditions, simply override the right hand variable causing the condition to always evaluate to false (you can even provide negative numbers). -APC UPSes don\'t have battery.charge.low - you will have to define it if you want -to use such condition (prefix the variable with override. or default.). +APC UPSes don't have battery.charge.low - you will have to define it if you want +to use such condition (prefix the variable with `override.` or `default.`). "New" units have battery.runtime.low, but depending on battery quality, firmware version, calibration and UPS load - this variable can be underestimated quite a bit - @@ -335,9 +348,9 @@ Other supported commands: PREVIOUS DRIVER VERSION ----------------------- -Previous driver is still available as apcsmart-old - should there be any need to +Previous driver is still available as *apcsmart-old*, should there be any need to use earlier version (bugs, incompatiblities with new functionality, etc.). In -due time apcsmart-old will be phased out completely, but this won't happen until +due time, *apcsmart-old* will be phased out completely, but this won't happen until the new version gets solid exposure with no pending issues. BUGS @@ -362,7 +375,8 @@ new features, which is maintained by Michal Soltys SEE ALSO -------- -linkman:nutupsdrv[8], linkman:ups.conf[5] +linkman:nutupsdrv[8], linkman:ups.conf[5], linkman:usbhid-ups[8], +linkman:solis[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ diff --git a/docs/man/apcupsd-ups.8 b/docs/man/apcupsd-ups.8 index 8da8d88..a6bb2f5 100644 --- a/docs/man/apcupsd-ups.8 +++ b/docs/man/apcupsd-ups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: apcupsd-ups .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "APCUPSD\-UPS" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "APCUPSD\-UPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/asciidoc.conf b/docs/man/asciidoc.conf index d294d23..9b4533d 100644 --- a/docs/man/asciidoc.conf +++ b/docs/man/asciidoc.conf @@ -23,6 +23,10 @@ ifdef::backend-xhtml11[] [linkman-inlinemacro] {target}{0?({0})} +# Override HTML footer, to include NUT version +[footer-text] +Last updated {docdate} {doctime} -- Network UPS Tools {nutversion} + # Format-detection to prevent smartphones from being too smart [+docinfo] diff --git a/docs/man/asem.8 b/docs/man/asem.8 new file mode 100644 index 0000000..7f1328f --- /dev/null +++ b/docs/man/asem.8 @@ -0,0 +1,87 @@ +'\" t +.\" Title: asem +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools 2.7.3 +.\" Language: English +.\" +.TH "ASEM" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +asem \- driver for UPS in ASEM PB1300 +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the \fBasem\fR driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +The \fBasem\fR driver supports the UPS in ASEM PB1300 embedded PCs\&. Likely other I2C devices from the same manufacturer will work too, since this is a "custom" charger\&. +.sp +Seems that there are two versions of the charger\&. Older one is based on Max1667, newer one is a custom solution\&. Both are on I2C address 0x09\&. To be compatible with both versions, the driver just reads bit 15 of address 0x13 which yields online/on battery status\&. Battery monitor is a BQ2060 at address 0x0B\&. +.SH "EXTRA ARGUMENTS" +.sp +The required parameter for this driver is the I2C bus name: +.PP +\fBport\fR=\fIdev\-node\fR +.RS 4 +On the Asem PB1300, this should be +/dev/i2c\-7 +for the i801 SMBUS adapter\&. +.RE +.sp +This driver also supports the following optional settings: +.PP +\fBlb\fR=\fInum\fR +.RS 4 +Set the low battery threshold to +\fInum\fR +volts\&. +.RE +.PP +\fBhb\fR=\fInum\fR +.RS 4 +Set the high battery threshold to +\fInum\fR +volts\&. +.RE +.SH "INSTALLATION" +.sp +This driver is specific to the Linux I2C API, and requires the lm_sensors libi2c\-dev or its equivalent to compile\&. +.sp +Beware that the SystemIO memory used by the I2C controller is reserved by ACPI\&. If only a native I2C driver (e\&.g\&. i2c_i801, as of 3\&.5\&.X Linux kernels) is available, then you\(cqll need to relax the ACPI resources check\&. For example, you can boot with the acpi_enforce_resources=lax option\&. +.SH "KNOWN ISSUES AND BUGS" +.sp +The driver shutdown function is not implemented, so other arrangements must be made to turn off the UPS\&. +.SH "AUTHORS" +.sp +Giuseppe Corbelli +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +PB1300 specifications: http://www\&.asem\&.it/en/products/industrial\-automation/box\-pcs/performance/pb1300/ +.sp +BQ2060 datasheet: http://www\&.ti\&.com/lit/ds/symlink/bq2060\&.pdf +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/asem.txt b/docs/man/asem.txt new file mode 100644 index 0000000..25f67ab --- /dev/null +++ b/docs/man/asem.txt @@ -0,0 +1,83 @@ +ASEM(8) +======= + +NAME +---- +asem - driver for UPS in ASEM PB1300 + +NOTE +---- +This man page only documents the hardware-specific features of the +*asem* driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +The *asem* driver supports the UPS in ASEM PB1300 embedded PCs. Likely other +I2C devices from the same manufacturer will work too, since this is a "custom" +charger. + +Seems that there are two versions of the charger. Older one is based on +Max1667, newer one is a custom solution. Both are on I2C address 0x09. +To be compatible with both versions, the driver just reads bit 15 of address +0x13 which yields online/on battery status. +Battery monitor is a BQ2060 at address 0x0B. + +EXTRA ARGUMENTS +--------------- + +The required parameter for this driver is the I2C bus name: + +*port*='dev-node':: +On the Asem PB1300, this should be `/dev/i2c-7` for the i801 SMBUS adapter. + +This driver also supports the following optional settings: + +*lb*='num':: +Set the low battery threshold to 'num' volts. + +*hb*='num':: +Set the high battery threshold to 'num' volts. + +INSTALLATION +------------ +This driver is specific to the Linux I2C API, and requires the lm_sensors +libi2c-dev or its equivalent to compile. + +Beware that the SystemIO memory used by the I2C controller is reserved by ACPI. +If only a native I2C driver (e.g. i2c_i801, as of 3.5.X Linux kernels) is +available, then you'll need to relax the ACPI resources check. For example, you +can boot with the `acpi_enforce_resources=lax` option. + +////////////////////////////////////////// +Optional: use DIAGNOSTICS to describe troubleshooting techniques that are +longer than what can be conveniently described in the driver error messages. + +DIAGNOSTICS +----------- + +////////////////////////////////////////// + +KNOWN ISSUES AND BUGS +--------------------- +The driver shutdown function is not implemented, so other arrangements must be +made to turn off the UPS. + +AUTHORS +------- +Giuseppe Corbelli + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +PB1300 specifications: http://www.asem.it/en/products/industrial-automation/box-pcs/performance/pb1300/ + +BQ2060 datasheet: http://www.ti.com/lit/ds/symlink/bq2060.pdf + +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/bcmxcp.8 b/docs/man/bcmxcp.8 index bcd38c2..0d6fa26 100644 --- a/docs/man/bcmxcp.8 +++ b/docs/man/bcmxcp.8 @@ -1,13 +1,13 @@ '\" t .\" Title: bcmxcp .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "BCMXCP" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "BCMXCP" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -58,9 +58,7 @@ Communication speed for the UPS\&. If this is set to 9600, it tries to connect t .sp -1 .IP \(bu 2.3 .\} - -\fBshutdown_delay =\fR -\fI120\fR +\fBshutdown_delay =\fR\fI120\fR .RE .sp .RS 4 @@ -71,9 +69,7 @@ Communication speed for the UPS\&. If this is set to 9600, it tries to connect t .sp -1 .IP \(bu 2.3 .\} - -\fBbaud_rate =\fR -\fInone\fR +\fBbaud_rate =\fR\fInone\fR .RE .SH "INSTANT COMMANDS" .sp diff --git a/docs/man/bcmxcp_usb.8 b/docs/man/bcmxcp_usb.8 index c46b557..5e40a3e 100644 --- a/docs/man/bcmxcp_usb.8 +++ b/docs/man/bcmxcp_usb.8 @@ -1,13 +1,13 @@ '\" t .\" Title: bcmxcp_usb .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "BCMXCP_USB" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "BCMXCP_USB" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/belkin.8 b/docs/man/belkin.8 index 5c3716d..9788c80 100644 --- a/docs/man/belkin.8 +++ b/docs/man/belkin.8 @@ -1,13 +1,13 @@ '\" t .\" Title: belkin .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "BELKIN" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "BELKIN" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/belkinunv.8 b/docs/man/belkinunv.8 index 83cb1c8..528147a 100644 --- a/docs/man/belkinunv.8 +++ b/docs/man/belkinunv.8 @@ -1,13 +1,13 @@ '\" t .\" Title: belkinunv .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "BELKINUNV" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "BELKINUNV" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bestfcom.8 b/docs/man/bestfcom.8 index 702aea2..bc55212 100644 --- a/docs/man/bestfcom.8 +++ b/docs/man/bestfcom.8 @@ -1,13 +1,13 @@ '\" t .\" Title: bestfcom .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "BESTFCOM" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "BESTFCOM" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bestfortress.8 b/docs/man/bestfortress.8 index 3710a39..8edf6d2 100644 --- a/docs/man/bestfortress.8 +++ b/docs/man/bestfortress.8 @@ -1,13 +1,13 @@ '\" t .\" Title: bestfortress .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "BESTFORTRESS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "BESTFORTRESS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bestuferrups.8 b/docs/man/bestuferrups.8 index 9561420..70338bd 100644 --- a/docs/man/bestuferrups.8 +++ b/docs/man/bestuferrups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: bestuferrups .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "BESTUFERRUPS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "BESTUFERRUPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bestups.8 b/docs/man/bestups.8 index 45cebad..f2c5b07 100644 --- a/docs/man/bestups.8 +++ b/docs/man/bestups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: bestups .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "BESTUPS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "BESTUPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/blazer_ser.8 b/docs/man/blazer_ser.8 index c163ff4..883a139 100644 --- a/docs/man/blazer_ser.8 +++ b/docs/man/blazer_ser.8 @@ -1,13 +1,13 @@ '\" t .\" Title: blazer_ser .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "BLAZER_SER" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "BLAZER_SER" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/blazer_usb.8 b/docs/man/blazer_usb.8 index e552504..3f6b5b7 100644 --- a/docs/man/blazer_usb.8 +++ b/docs/man/blazer_usb.8 @@ -1,13 +1,13 @@ '\" t .\" Title: blazer_usb .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "BLAZER_USB" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "BLAZER_USB" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -154,7 +154,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - \-x vendor="Foo\&.Corporation\&.*" .RE .sp @@ -166,7 +165,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - \-x vendorid=051d* (APC) .RE @@ -179,7 +177,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - \-x product="\&.*(Smart|Back)\-?UPS\&.*" .RE .RE diff --git a/docs/man/clone.8 b/docs/man/clone.8 index 8637a95..7f92efb 100644 --- a/docs/man/clone.8 +++ b/docs/man/clone.8 @@ -1,13 +1,13 @@ '\" t .\" Title: clone .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "CLONE" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "CLONE" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/dummy-ups.8 b/docs/man/dummy-ups.8 index ea9d41b..eaba7fd 100644 --- a/docs/man/dummy-ups.8 +++ b/docs/man/dummy-ups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: dummy-ups .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "DUMMY\-UPS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "DUMMY\-UPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -95,7 +95,7 @@ Port is the name of a remote UPS, using the NUT form, ie: .RS 4 .\} .nf -[@[:]] +@[:] .fi .if n \{\ .RE @@ -115,6 +115,8 @@ For instance: .if n \{\ .RE .\} +.sp +Unlike UPS specifications in the rest of NUT, the @hostname portion is not optional \- it is the @ character which enables Repeater Mode\&. To refer to an UPS on the same host as \fBdummy\-ups\fR, use port = upsname@localhost\&. .SH "INTERACTION" .sp Once the driver is loaded in dummy mode, you can change any variables, except those of the driver\&.* and server\&.* collections\&. You can do this by either editing the definition file, or use the \fBupsrw\fR(1) and \fBupscmd\fR(1) commands\&. @@ -124,9 +126,9 @@ Note that in simulation mode, new variables can be added on the fly, by adding t In repeater mode, the driver acts according to the capabilities of the UPS, and so support the same instant commands and settable values\&. .SH "BACKGROUND" .sp -This driver was written in one evening to replace the previous dummycons testing driver\&. It was too limited and required to work from a terminal to interact\&. +Dummy Mode was originally written in one evening to replace the previous dummycons testing driver, which was too limited, and required a terminal for interaction\&. .sp -\fBdummy\-ups\fR is useful for NUT client development, and other testing purpose\&. +\fBdummy\-ups\fR is useful for NUT client development, and other testing purposes\&. .sp It also helps the NUT Quality Assurance effort, by automating some tests on the NUT framework\&. .sp diff --git a/docs/man/dummy-ups.txt b/docs/man/dummy-ups.txt index 766d17e..385f5be 100644 --- a/docs/man/dummy-ups.txt +++ b/docs/man/dummy-ups.txt @@ -86,7 +86,7 @@ Repeater Mode Port is the name of a remote UPS, using the NUT form, ie: - [@[:]] + @[:] For instance: @@ -95,6 +95,10 @@ For instance: port = ups@hostname desc = "dummy-ups in repeater mode" +Unlike UPS specifications in the rest of NUT, the `@hostname` portion is not +optional - it is the `@` character which enables Repeater Mode. To refer to an +UPS on the same host as *dummy-ups*, use `port = upsname@localhost`. + INTERACTION ----------- @@ -114,11 +118,11 @@ so support the same instant commands and settable values. BACKGROUND ---------- -This driver was written in one evening to replace the previous dummycons -testing driver. It was too limited and required to work from a terminal to -interact. +Dummy Mode was originally written in one evening to replace the previous +dummycons testing driver, which was too limited, and required a terminal for +interaction. -*dummy-ups* is useful for NUT client development, and other testing purpose. +*dummy-ups* is useful for NUT client development, and other testing purposes. It also helps the NUT Quality Assurance effort, by automating some tests on the NUT framework. diff --git a/docs/man/etapro.8 b/docs/man/etapro.8 index 868a0bc..e327592 100644 --- a/docs/man/etapro.8 +++ b/docs/man/etapro.8 @@ -1,13 +1,13 @@ '\" t .\" Title: etapro .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "ETAPRO" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "ETAPRO" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/everups.8 b/docs/man/everups.8 index 34c2e67..784627e 100644 --- a/docs/man/everups.8 +++ b/docs/man/everups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: everups .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "EVERUPS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "EVERUPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/gamatronic.8 b/docs/man/gamatronic.8 index 161d14f..12ef3be 100644 --- a/docs/man/gamatronic.8 +++ b/docs/man/gamatronic.8 @@ -1,13 +1,13 @@ '\" t .\" Title: gamatronic .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "GAMATRONIC" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "GAMATRONIC" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/genericups.8 b/docs/man/genericups.8 index 7d9f4df..a7f883f 100644 --- a/docs/man/genericups.8 +++ b/docs/man/genericups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: genericups .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "GENERICUPS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "GENERICUPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/hosts.conf.5 b/docs/man/hosts.conf.5 index 8044fd5..c2d62fe 100644 --- a/docs/man/hosts.conf.5 +++ b/docs/man/hosts.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: hosts.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "HOSTS\&.CONF" "5" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "HOSTS\&.CONF" "5" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/isbmex.8 b/docs/man/isbmex.8 index 7c0ba16..06a2041 100644 --- a/docs/man/isbmex.8 +++ b/docs/man/isbmex.8 @@ -1,13 +1,13 @@ '\" t .\" Title: isbmex .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "ISBMEX" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "ISBMEX" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/ivtscd.8 b/docs/man/ivtscd.8 index be2e1ee..66d51c7 100644 --- a/docs/man/ivtscd.8 +++ b/docs/man/ivtscd.8 @@ -1,13 +1,13 @@ '\" t .\" Title: ivtscd .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "IVTSCD" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "IVTSCD" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libnutclient.3 b/docs/man/libnutclient.3 index cab68f1..fced59c 100644 --- a/docs/man/libnutclient.3 +++ b/docs/man/libnutclient.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "LIBNUTCLIENT" "3" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "LIBNUTCLIENT" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libnutclient_commands.3 b/docs/man/libnutclient_commands.3 index 9899bf7..7a30319 100644 --- a/docs/man/libnutclient_commands.3 +++ b/docs/man/libnutclient_commands.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient_commands .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "LIBNUTCLIENT_COMMAND" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "LIBNUTCLIENT_COMMAND" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libnutclient_devices.3 b/docs/man/libnutclient_devices.3 index 2323630..4c048eb 100644 --- a/docs/man/libnutclient_devices.3 +++ b/docs/man/libnutclient_devices.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient_devices .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "LIBNUTCLIENT_DEVICES" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "LIBNUTCLIENT_DEVICES" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libnutclient_general.3 b/docs/man/libnutclient_general.3 index 3b7f5cb..4b3504e 100644 --- a/docs/man/libnutclient_general.3 +++ b/docs/man/libnutclient_general.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient_general .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "LIBNUTCLIENT_GENERAL" "3" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "LIBNUTCLIENT_GENERAL" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libnutclient_misc.3 b/docs/man/libnutclient_misc.3 index c2ef69b..0d83919 100644 --- a/docs/man/libnutclient_misc.3 +++ b/docs/man/libnutclient_misc.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient_misc .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "LIBNUTCLIENT_MISC" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "LIBNUTCLIENT_MISC" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libnutclient_tcp.3 b/docs/man/libnutclient_tcp.3 index 7af1ddc..b91b7b7 100644 --- a/docs/man/libnutclient_tcp.3 +++ b/docs/man/libnutclient_tcp.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient_tcp .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "LIBNUTCLIENT_TCP" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "LIBNUTCLIENT_TCP" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libnutclient_variables.3 b/docs/man/libnutclient_variables.3 index 0733cf2..da3f2ce 100644 --- a/docs/man/libnutclient_variables.3 +++ b/docs/man/libnutclient_variables.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient_variables .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "LIBNUTCLIENT_VARIABL" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "LIBNUTCLIENT_VARIABL" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libupsclient-config.1 b/docs/man/libupsclient-config.1 index b368ec0..e2a0dde 100644 --- a/docs/man/libupsclient-config.1 +++ b/docs/man/libupsclient-config.1 @@ -1,13 +1,13 @@ '\" t .\" Title: libupsclient-config .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "LIBUPSCLIENT\-CONFIG" "1" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "LIBUPSCLIENT\-CONFIG" "1" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/liebert-esp2.8 b/docs/man/liebert-esp2.8 index 916b704..24debf7 100644 --- a/docs/man/liebert-esp2.8 +++ b/docs/man/liebert-esp2.8 @@ -1,13 +1,13 @@ '\" t .\" Title: liebert-esp2 .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "LIEBERT\-ESP2" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "LIEBERT\-ESP2" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/liebert.8 b/docs/man/liebert.8 index 67a949c..9600054 100644 --- a/docs/man/liebert.8 +++ b/docs/man/liebert.8 @@ -1,13 +1,13 @@ '\" t .\" Title: liebert .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "LIEBERT" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "LIEBERT" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/macosx-ups.8 b/docs/man/macosx-ups.8 index 4d29a0b..f3a8327 100644 --- a/docs/man/macosx-ups.8 +++ b/docs/man/macosx-ups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: macosx-ups .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "MACOSX\-UPS" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "MACOSX\-UPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/masterguard.8 b/docs/man/masterguard.8 index 423c696..f793cff 100644 --- a/docs/man/masterguard.8 +++ b/docs/man/masterguard.8 @@ -1,13 +1,13 @@ '\" t .\" Title: masterguard .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "MASTERGUARD" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "MASTERGUARD" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/metasys.8 b/docs/man/metasys.8 index edfe9a3..321d8c6 100644 --- a/docs/man/metasys.8 +++ b/docs/man/metasys.8 @@ -1,13 +1,13 @@ '\" t .\" Title: metasys .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "METASYS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "METASYS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/mge-shut.8 b/docs/man/mge-shut.8 index cef01bb..fd0fb04 100644 --- a/docs/man/mge-shut.8 +++ b/docs/man/mge-shut.8 @@ -1,13 +1,13 @@ '\" t .\" Title: mge-shut .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "MGE\-SHUT" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "MGE\-SHUT" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/mge-utalk.8 b/docs/man/mge-utalk.8 index 445b862..c8dac81 100644 --- a/docs/man/mge-utalk.8 +++ b/docs/man/mge-utalk.8 @@ -1,13 +1,13 @@ '\" t .\" Title: mge-utalk .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "MGE\-UTALK" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "MGE\-UTALK" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/microdowell.8 b/docs/man/microdowell.8 index d09dd0e..2252f58 100644 --- a/docs/man/microdowell.8 +++ b/docs/man/microdowell.8 @@ -1,13 +1,13 @@ '\" t .\" Title: microdowell .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "MICRODOWELL" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "MICRODOWELL" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/netxml-ups.8 b/docs/man/netxml-ups.8 index 65dae82..3784370 100644 --- a/docs/man/netxml-ups.8 +++ b/docs/man/netxml-ups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: netxml-ups .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NETXML\-UPS" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NETXML\-UPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nut-ipmipsu.8 b/docs/man/nut-ipmipsu.8 index 845c935..aa2d1a5 100644 --- a/docs/man/nut-ipmipsu.8 +++ b/docs/man/nut-ipmipsu.8 @@ -1,13 +1,13 @@ '\" t .\" Title: nut-ipmipsu .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUT\-IPMIPSU" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUT\-IPMIPSU" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -153,7 +153,6 @@ status of the PSU: .sp -1 .IP \(bu 2.3 .\} - \fIOL\fR means that the PSU is present and providing power, .RE @@ -166,7 +165,6 @@ means that the PSU is present and providing power, .sp -1 .IP \(bu 2.3 .\} - \fIOFF\fR means that the PSU is present but not providing power (power cable removed), .RE @@ -179,7 +177,6 @@ means that the PSU is present but not providing power (power cable removed), .sp -1 .IP \(bu 2.3 .\} - \fIstale\fR (no data) means that the PSU is not present (ie physically removed)\&. .RE diff --git a/docs/man/nut-recorder.8 b/docs/man/nut-recorder.8 index 4467a37..54d6f50 100644 --- a/docs/man/nut-recorder.8 +++ b/docs/man/nut-recorder.8 @@ -1,13 +1,13 @@ '\" t .\" Title: nut-recorder .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUT\-RECORDER" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUT\-RECORDER" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nut-scanner.8 b/docs/man/nut-scanner.8 index f154875..8cb91fd 100644 --- a/docs/man/nut-scanner.8 +++ b/docs/man/nut-scanner.8 @@ -1,13 +1,13 @@ '\" t .\" Title: nut-scanner .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUT\-SCANNER" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUT\-SCANNER" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -115,7 +115,6 @@ can be expressed in various forms: .sp -1 .IP \(bu 2.3 .\} - \fIauto\fR to scan all serial ports\&. .RE @@ -266,7 +265,7 @@ Set the username used for authenticating IPMI over LAN connections (mandatory fo .PP \fB\-B\fR | \fB\-\-password\fR \fIpassword\fR .RS 4 -Specify the password to use when authenticationg with the remote host (mandatory for IPMI over LAN\&. No default)\&. +Specify the password to use when authenticating with the remote host (mandatory for IPMI over LAN\&. No default)\&. .RE .PP \fB\-d\fR | \fB\-\-authType\fR \fIauthentication type\fR @@ -290,7 +289,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB0\fR: None; None; None .RE .sp @@ -302,7 +300,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB1\fR: HMAC\-SHA1; None; None .RE .sp @@ -314,7 +311,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB2\fR: HMAC\-SHA1; HMAC\-SHA1\-96; None .RE .sp @@ -326,7 +322,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB3\fR: HMAC\-SHA1; HMAC\-SHA1\-96; AES\-CBC\-128 .RE .sp @@ -338,7 +333,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB6\fR: HMAC\-MD5; None; None .RE .sp @@ -350,7 +344,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB7\fR: HMAC\-MD5; HMAC\-MD5\-128; None .RE .sp @@ -362,7 +355,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB8\fR: HMAC\-MD5; HMAC\-MD5\-128; AES\-CBC\-128 .RE .sp @@ -374,7 +366,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB11\fR: HMAC\-MD5; MD5\-128; None .RE .sp @@ -386,7 +377,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB12\fR: HMAC\-MD5; MD5\-128; AES\-CBC\-128 .RE .sp @@ -398,7 +388,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB15\fR: HMAC\-SHA256; None; None .RE .sp @@ -410,7 +399,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB16\fR: HMAC\-SHA256; HMAC_SHA256_128; None .RE .sp @@ -422,7 +410,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB17\fR: HMAC\-SHA256; HMAC_SHA256_128; AES\-CBC\-128 .RE .RE @@ -456,7 +443,7 @@ The same using CIDR notation: .sp \fBnut\-scanner \-S \-m 192\&.168\&.0\&.0/24\fR .sp -To scan NUT servers with a timeout of 10 seconds on IP range 192\&.168\&.0\&.0 to 192\&.168\&.0\&.128 using CIDR notation: +To scan NUT servers with a timeout of 10 seconds on IP range 192\&.168\&.0\&.0 to 192\&.168\&.0\&.127 using CIDR notation: .sp \fBnut\-scanner \-O \-t 10 \-m 192\&.168\&.0\&.0/25\fR .sp diff --git a/docs/man/nut-scanner.txt b/docs/man/nut-scanner.txt index 359806f..7f99465 100644 --- a/docs/man/nut-scanner.txt +++ b/docs/man/nut-scanner.txt @@ -134,7 +134,7 @@ IPMI OPTIONS Set the username used for authenticating IPMI over LAN connections (mandatory for IPMI over LAN. No default). *-B* | *--password* 'password':: -Specify the password to use when authenticationg with the remote host (mandatory for IPMI over LAN. No default). +Specify the password to use when authenticating with the remote host (mandatory for IPMI over LAN. No default). *-d* | *--authType* 'authentication type':: Specify the IPMI 1.5 authentication type to use (NONE, STRAIGHT_PASSWORD_KEY, MD2, and MD5) with the remote host (default=MD5). @@ -188,7 +188,7 @@ The same using CIDR notation: *nut-scanner -S -m 192.168.0.0/24* -To scan NUT servers with a timeout of 10 seconds on IP range 192.168.0.0 to 192.168.0.128 using CIDR notation: +To scan NUT servers with a timeout of 10 seconds on IP range 192.168.0.0 to 192.168.0.127 using CIDR notation: *nut-scanner -O -t 10 -m 192.168.0.0/25* diff --git a/docs/man/nut.conf.5 b/docs/man/nut.conf.5 index 726ce8f..d291731 100644 --- a/docs/man/nut.conf.5 +++ b/docs/man/nut.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: nut.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUT\&.CONF" "5" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUT\&.CONF" "5" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -94,7 +94,7 @@ above indicates that no upsmon should be running\&. .PP \fBPOWEROFF_WAIT\fR .RS 4 -Optional\&. At the end of an emergency system halt, the upsmon master will signal the UPS to switch off\&. This may fail for a number of reasons\&. Most notably is the case that mains power returns during the shutdown process\&. See the section "Power races" in /usr/share/doc/nut/docs/shutdown\&.txt\&.gz\&. The system will wait this long for the UPS to cut power, and then reboot\&. It should be long enough to exhaust the batteries, in case line power continues to be unavailable\&. On the other hand, it should not be so long that the system remains offline for an unreasonable amount of time if line power has returned\&. See sleep(1) for compatible time syntax\&. If you specify the time in seconds, use the "s" suffix\&. +Optional\&. At the end of an emergency system halt, the upsmon master will signal the UPS to switch off\&. This may fail for a number of reasons\&. Most notably is the case that mains power returns during the shutdown process\&. See the section "Power races" in /usr/share/doc/nut/FAQ\&.txt\&.gz\&. The system will wait this long for the UPS to cut power, and then reboot\&. It should be long enough to exhaust the batteries, in case line power continues to be unavailable\&. On the other hand, it should not be so long that the system remains offline for an unreasonable amount of time if line power has returned\&. See sleep(1) for compatible time syntax\&. If you specify the time in seconds, use the "s" suffix\&. .RE .if n \{\ .sp diff --git a/docs/man/nut.conf.txt b/docs/man/nut.conf.txt index 074ff95..881a08a 100644 --- a/docs/man/nut.conf.txt +++ b/docs/man/nut.conf.txt @@ -68,7 +68,7 @@ Optional. At the end of an emergency system halt, the upsmon master will signal the UPS to switch off. This may fail for a number of reasons. Most notably is the case that mains power returns during the shutdown process. See the section "Power races" in -/usr/share/doc/nut/docs/shutdown.txt.gz. The system will wait this +/usr/share/doc/nut/FAQ.txt.gz. The system will wait this long for the UPS to cut power, and then reboot. It should be long enough to exhaust the batteries, in case line power continues to be unavailable. On the other hand, it should not be so long that the diff --git a/docs/man/nutdrv_atcl_usb.8 b/docs/man/nutdrv_atcl_usb.8 index 78b4804..7f73147 100644 --- a/docs/man/nutdrv_atcl_usb.8 +++ b/docs/man/nutdrv_atcl_usb.8 @@ -1,13 +1,13 @@ '\" t .\" Title: nutdrv_atcl_usb .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTDRV_ATCL_USB" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTDRV_ATCL_USB" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutdrv_qx.8 b/docs/man/nutdrv_qx.8 index 60c2591..df98321 100644 --- a/docs/man/nutdrv_qx.8 +++ b/docs/man/nutdrv_qx.8 @@ -1,13 +1,13 @@ '\" t .\" Title: nutdrv_qx .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/22/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTDRV_QX" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTDRV_QX" "8" "04/22/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -112,13 +112,15 @@ seconds (if mains meanwhile returned)\&. \fBprotocol =\fR \fIstring\fR .RS 4 Skip autodetection of the protocol to use and only use the one specified\&. Supported values: +\fIbestups\fR, \fImecer\fR, \fImegatec\fR, \fImegatec/old\fR, \fImustek\fR, \fIq1\fR, \fIvoltronic\fR, -\fIvoltronic\-qs\fR +\fIvoltronic\-qs\fR, +\fIvoltronic\-qs\-hex\fR and \fIzinto\fR\&. .sp @@ -201,6 +203,13 @@ Minimum battery load used by the driver to estimate the runtime\&. If not specif \fBruntimecal\fR is also specified\&. .RE +.SS "BESTUPS, MECER, MEGATAEC, MEGATEC/OLD, MUSTEK, Q1, VOLTRONIC\-QS, VOLTRONIC\-QS\-HEX, ZINTO PROTOCOLS" +.PP +\fBignoresab\fR +.RS 4 +Some UPSes incorrectly report the \(oqShutdown Active\(cq bit as always on, consequently making the driver believe the UPS is nearing a shutdown (and, as a result, ups\&.status always contains +FSD\&... and you know what this means)\&. Setting this flag will make the driver ignore the \(oqShutdown Active\(cq bit\&. +.RE .SS "MECER, MEGATAEC, MEGATEC/OLD, MUSTEK, ZINTO PROTOCOLS" .PP \fBondelay\fR @@ -226,6 +235,30 @@ Some UPSes will lock up if you attempt to read rating information from them\&. S .RS 4 Some UPSes will lock up if you attempt to read vendor information from them\&. Setting this flag will make the driver skip this step\&. .RE +.SS "BESTUPS PROTOCOL" +.PP +\fBondelay\fR +.RS 4 +The acceptable range is +60\&.\&.599940 +seconds\&. +.RE +.PP +\fBoffdelay\fR +.RS 4 +The acceptable range is +12\&.\&.5940 +seconds\&. +.RE +.PP +\fBpins_shutdown_mode =\fR \fIvalue\fR +.RS 4 +Set +shutdown mode functionality of Pin 1 and Pin 7 +on the UPS DB9 communication port (Per Best Power\(cqs EPS\-0059) to +\fIvalue\fR +[0\&.\&.6]\&. +.RE .SS "Q1 PROTOCOL" .PP \fBondelay\fR @@ -241,7 +274,7 @@ The acceptable range is 12\&.\&.600 seconds\&. .RE -.SS "VOLTRONIC\-QS PROTOCOL" +.SS "VOLTRONIC\-QS, VOLTRONIC\-QS\-HEX PROTOCOLS" .PP \fBondelay\fR .RS 4 @@ -374,7 +407,7 @@ Enable or disable Battery Open Status Check [enabled/disabled]\&. If enabled, wh Enable or disable site fault detection [enabled/disabled]\&. If enabled, the UPS will beep when the input neutral and hot wires are reversed\&. .RE .PP -\fBcostant_phase_angle =\fR \fIstring\fR +\fBconstant_phase_angle =\fR \fIstring\fR .RS 4 Enable or disable Constant Phase Angle Function (output and input phase angles are not equal) [enabled/disabled]\&. .RE @@ -484,7 +517,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - \-x vendor="Foo\&.Corporation\&.*" .RE .sp @@ -496,7 +528,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - \-x vendorid=051d* (APC) .RE @@ -509,7 +540,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - \-x product="\&.*(Smart|Back)\-?UPS\&.*" .RE .RE @@ -524,10 +554,13 @@ bus="00[2\-3]")\&. \fBsubdriver =\fR \fIstring\fR .RS 4 Select a serial\-over\-USB subdriver to use\&. You have a choice between -\fBphoenix\fR, +\fBcypress\fR, +\fBfabula\fR, +\fBfuji\fR, \fBippon\fR, -\fBcypress\fR, and -\fBkrauler\fR\&. When using this option, it is mandatory to also specify the +\fBkrauler\fR +and +\fBphoenix\fR\&. When using this option, it is mandatory to also specify the \fBvendorid\fR and \fBproductid\fR\&. @@ -543,6 +576,60 @@ subdriver\&. This is mandatory for some devices to work (LDLC, Dynamix and other or 0x4095), according to your device entry in NUT hardware compatibility list (HCL)\&. .RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBIMPLEMENTATION NOTES\fR +.RS 4 +.PP +\fB\fIfabula\fR\fR\fB subdriver\fR +.RS 4 +This subdriver, meant to be used with the +\fImegatec\fR +protocol, does +\fBnot\fR +support the various +\fBtest\&.battery\fR +commands\&. Plus, the +\fBshutdown\&.return\fR +command ignores the values set in +\fIups\&.delay\&.start\fR/\fBondelay\fR +and makes the UPS turn on the load as soon as power is back\&. +.RE +.PP +\fB\fIfuji\fR\fR\fB subdriver\fR +.RS 4 +This subdriver, meant to be used with the +\fImegatec\fR +protocol, does +\fBnot\fR +support the +\fBshutdown\&.stayoff\fR +and +\fBload\&.off\fR +commands\&. Plus, the +\fBshutdown\&.return\fR +command ignores the values set in +\fIups\&.delay\&.start\fR/\fBondelay\fR +and makes the UPS turn on the load as soon as power is back\&. +.RE +.PP +\fB\fIkrauler\fR\fR\fB subdriver\fR +.RS 4 +This subdriver, meant to be used with the +\fImegatec\fR +protocol, does +\fBnot\fR +support the shutdown commands, i\&.e\&.: +\fBshutdown\&.return\fR, +\fBshutdown\&.stayoff\fR +and +\fBload\&.off\fR\&. +.RE +.RE .SH "UPS COMMANDS" .sp This driver supports some instant commands (see \fBupscmd\fR(8)): @@ -554,7 +641,7 @@ Toggle the UPS beeper\&. (Not available on some hardware) .PP \fBload\&.on\fR .RS 4 -Turn on the load immediately\&. +Turn on the load immediately\&. (Not available on some hardware) .RE .PP \fBload\&.off\fR @@ -597,7 +684,7 @@ Perform a quick (10 second) battery test\&. .RS 4 Stop a running battery test\&. (Not available on some hardware) .RE -.SS "MECER, MEGATEC, MEGATEC/OLD, MUSTEK, Q1, ZINTO PROTOCOLS" +.SS "BESTUPS, MECER, MEGATEC, MEGATEC/OLD, MUSTEK, Q1, ZINTO PROTOCOLS" .PP \fBtest\&.battery\&.start\fR \fIvalue\fR .RS 4 @@ -763,6 +850,22 @@ driver wants a \fIvalue\fR in seconds\&. .RE +.SH "NOTES FOR THE PREVIOUS USER OF BESTUPS DRIVER" +.sp +The \fBnutdrv_qx\fR driver having replaced the bestups one, some configuration changes may be required by users switching to \fBnutdrv_qx\fR\&. +.sp +Part of this, the following bestups options, in \fBups.conf\fR(5), are no longer supported by this driver: +.PP +\fBnombattvolt\fR, \fBbattvoltmult\fR +.RS 4 +See +BATTERY CHARGE\&. +.RE +.PP +\fBID\fR +.RS 4 +Discarded\&. +.RE .SH "NOTES FOR THE PREVIOUS USER OF VOLTRONIC DRIVERS" .sp The \fBnutdrv_qx\fR driver having replaced the voltronic ones, some configuration changes may be required by users switching to \fBnutdrv_qx\fR\&. @@ -971,11 +1074,9 @@ After issuing a \fBshutdown\&.return\fR instant command, the UPS won\(cqt wait \ .IP \(bu 2.3 .\} if the load has been previously (no matter how long before) powered off through -\fBload\&.off\fR/\fBshutdown\&.stayoff\fR -\fIand\fR +\fBload\&.off\fR/\fBshutdown\&.stayoff\fR\fIand\fR powered on through -\fBload\&.on\fR/\fBshutdown\&.stop\fR -\fIand\fR +\fBload\&.on\fR/\fBshutdown\&.stop\fR\fIand\fR .RE .sp .RS 4 @@ -1006,6 +1107,9 @@ command .RE .sp In this case, as soon as mains returns the load will be powered\&. +.SS "VOLTRONIC\-QS\-HEX UNITS" +.sp +\fBshutdown\&.return\fR, \fBload\&.off\fR, and \fBshutdown\&.stayoff\fR instant commands are known to work as expected only if mains is present, otherwise, as soon as mains returns the load will be powered\&. .SH "UPS WARNINGS (VOLTRONIC PROTOCOL)" .sp The UPSes supported by \fIvoltronic\fR protocol report warnings through a 64bit flag (bit1bit2\&...bit63bit64) where 1 means that a warning arose, while 0 means no warning\&. Since more than one warning at a time can be signaled, and because of the limited space in the ups\&.alarm variable, if the length of the warnings exceeds that of ups\&.alarms variable, they will be reported as bits\&. If you want to know the explanation of that bit you can either watch the log or see the next table (unlisted bits equal to unknown warnings)\&. diff --git a/docs/man/nutdrv_qx.txt b/docs/man/nutdrv_qx.txt index 963342c..5d08901 100644 --- a/docs/man/nutdrv_qx.txt +++ b/docs/man/nutdrv_qx.txt @@ -52,7 +52,7 @@ If you set stayoff in linkman:ups.conf[5] when FSD arises the UPS will call a *s *protocol =* 'string':: Skip autodetection of the protocol to use and only use the one specified. -Supported values: 'mecer', 'megatec', 'megatec/old', 'mustek', 'q1', 'voltronic', 'voltronic-qs' and 'zinto'. +Supported values: 'bestups', 'mecer', 'megatec', 'megatec/old', 'mustek', 'q1', 'voltronic', 'voltronic-qs', 'voltronic-qs-hex' and 'zinto'. + Note that if you end up using the 'q1' protocol, you may want to give a try to the 'mecer', 'megatec' and 'zinto' ones setting the <> (only one, or both). @@ -103,6 +103,14 @@ If not specified, the driver defaults to 10%. Only used if *runtimecal* is also specified. +BESTUPS, MECER, MEGATAEC, MEGATEC/OLD, MUSTEK, Q1, VOLTRONIC-QS, VOLTRONIC-QS-HEX, ZINTO PROTOCOLS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +*ignoresab*:: +Some UPSes incorrectly report the `Shutdown Active' bit as always on, consequently making the driver believe the UPS is nearing a shutdown (and, as a result, ups.status always contains +FSD+... and you know what this means). +Setting this flag will make the driver ignore the `Shutdown Active' bit. + + [[old-blazer-protocols-options]] MECER, MEGATAEC, MEGATEC/OLD, MUSTEK, ZINTO PROTOCOLS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -122,6 +130,19 @@ Some UPSes will lock up if you attempt to read vendor information from them. Setting this flag will make the driver skip this step. +BESTUPS PROTOCOL +~~~~~~~~~~~~~~~~ + +*ondelay*:: +The acceptable range is +60..599940+ seconds. + +*offdelay*:: +The acceptable range is +12..5940+ seconds. + +*pins_shutdown_mode =* 'value':: +Set http://www.networkupstools.org/protocols/sola.html#_shutdown_set_command[shutdown mode functionality of Pin 1 and Pin 7] on the UPS DB9 communication port (Per Best Power’s EPS-0059) to 'value' [+0..6+]. + + Q1 PROTOCOL ~~~~~~~~~~~ @@ -132,8 +153,8 @@ The acceptable range is +0..599940+ seconds. The acceptable range is +12..600+ seconds. -VOLTRONIC-QS PROTOCOL -~~~~~~~~~~~~~~~~~~~~~ +VOLTRONIC-QS, VOLTRONIC-QS-HEX PROTOCOLS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *ondelay*:: The acceptable range is +60..599940+ seconds. @@ -215,7 +236,7 @@ If enabled, when the UPS is turned on, it will check if the battery is connected Enable or disable site fault detection [+enabled+/+disabled+]. If enabled, the UPS will beep when the input neutral and hot wires are reversed. -*costant_phase_angle =* 'string':: +*constant_phase_angle =* 'string':: Enable or disable Constant Phase Angle Function (output and input phase angles are not equal) [+enabled+/+disabled+]. *limited_runtime_on_battery =* 'string':: @@ -301,7 +322,7 @@ The argument is a regular expression that must match the bus name where the UPS *subdriver =* 'string':: Select a serial-over-USB subdriver to use. -You have a choice between *phoenix*, *ippon*, *cypress*, and *krauler*. +You have a choice between *cypress*, *fabula*, *fuji*, *ippon*, *krauler* and *phoenix*. When using this option, it is mandatory to also specify the *vendorid* and *productid*. *langid_fix =* 'value':: @@ -310,6 +331,21 @@ This is mandatory for some devices to work (LDLC, Dynamix and others). You must provide *value* (+0x409+ or +0x4095+), according to your device entry in NUT hardware compatibility list (HCL). +IMPLEMENTATION NOTES +^^^^^^^^^^^^^^^^^^^^ + +*'fabula' subdriver*:: +This subdriver, meant to be used with the 'megatec' protocol, does *not* support the various *test.battery* commands. +Plus, the *shutdown.return* command ignores the values set in 'ups.delay.start'/*ondelay* and makes the UPS turn on the load as soon as power is back. + +*'fuji' subdriver*:: +This subdriver, meant to be used with the 'megatec' protocol, does *not* support the *shutdown.stayoff* and *load.off* commands. +Plus, the *shutdown.return* command ignores the values set in 'ups.delay.start'/*ondelay* and makes the UPS turn on the load as soon as power is back. + +*'krauler' subdriver*:: +This subdriver, meant to be used with the 'megatec' protocol, does *not* support the shutdown commands, i.e.: *shutdown.return*, *shutdown.stayoff* and *load.off*. + + UPS COMMANDS ------------ @@ -321,6 +357,7 @@ Toggle the UPS beeper. *load.on*:: Turn on the load immediately. +(Not available on some hardware) *load.off*:: Turn off the load immediately (see <<_known_problems,KNOWN PROBLEMS>>). @@ -348,8 +385,8 @@ Stop a running battery test. (Not available on some hardware) -MECER, MEGATEC, MEGATEC/OLD, MUSTEK, Q1, ZINTO PROTOCOLS -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +BESTUPS, MECER, MEGATEC, MEGATEC/OLD, MUSTEK, Q1, ZINTO PROTOCOLS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *test.battery.start* 'value':: Perform a battery test for the duration of 'value' seconds (truncated to 60 seconds) [+60..5940+]. @@ -470,6 +507,21 @@ The following instant command has also been changed: While the old blazer drivers expected a 'value' in minutes, the *nutdrv_qx* driver wants a 'value' in seconds. +NOTES FOR THE PREVIOUS USER OF BESTUPS DRIVER +--------------------------------------------- + +The *nutdrv_qx* driver having replaced the bestups one, some configuration changes may be required by users switching to *nutdrv_qx*. + +Part of this, the following bestups options, in linkman:ups.conf[5], are no longer supported by this driver: + +*nombattvolt*:: +*battvoltmult*:: +See <<_battery_charge,BATTERY CHARGE>>. + +*ID*:: +Discarded. + + NOTES FOR THE PREVIOUS USER OF VOLTRONIC DRIVERS ------------------------------------------------ @@ -593,6 +645,12 @@ After issuing a *shutdown.return* instant command, the UPS won't wait *ondelay* In this case, as soon as mains returns the load will be powered. +VOLTRONIC-QS-HEX UNITS +~~~~~~~~~~~~~~~~~~~~~~ + +*shutdown.return*, *load.off*, and *shutdown.stayoff* instant commands are known to work as expected only if mains is present, otherwise, as soon as mains returns the load will be powered. + + UPS WARNINGS (VOLTRONIC PROTOCOL) --------------------------------- diff --git a/docs/man/nutscan.3 b/docs/man/nutscan.3 index 0f5e677..49211d7 100644 --- a/docs/man/nutscan.3 +++ b/docs/man/nutscan.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -58,7 +58,6 @@ Then, to discover new devices, use the appropriate function: .sp -1 .IP \(bu 2.3 .\} - \fBnutscan_scan_usb\fR(3) for supported USB devices, .RE @@ -71,7 +70,6 @@ for supported USB devices, .sp -1 .IP \(bu 2.3 .\} - \fBnutscan_scan_snmp\fR(3) for supported SNMP agents, .RE @@ -84,7 +82,6 @@ for supported SNMP agents, .sp -1 .IP \(bu 2.3 .\} - \fBnutscan_scan_xml_http\fR(3) for Eaton Network Management Card, .RE @@ -97,7 +94,6 @@ for Eaton Network Management Card, .sp -1 .IP \(bu 2.3 .\} - \fBnutscan_scan_nut\fR(3) for NUT servers (upsd), using the classic method, .RE @@ -110,7 +106,6 @@ for NUT servers (upsd), using the classic method, .sp -1 .IP \(bu 2.3 .\} - \fBnutscan_scan_avahi\fR(3) for NUT servers (upsd), using the mDNS (Avahi) method, .RE @@ -123,7 +118,6 @@ for NUT servers (upsd), using the mDNS (Avahi) method, .sp -1 .IP \(bu 2.3 .\} - \fBnutscan_scan_ipmi\fR(3) for supported IPMI PSU\&. .RE @@ -140,7 +134,6 @@ Helper functions are also provided to output data using standard formats: .sp -1 .IP \(bu 2.3 .\} - \fBnutscan_display_parsable\fR(3) for parsable output, .RE @@ -153,7 +146,6 @@ for parsable output, .sp -1 .IP \(bu 2.3 .\} - \fBnutscan_display_ups_conf\fR(3) for ups\&.conf style\&. .RE diff --git a/docs/man/nutscan_add_device_to_device.3 b/docs/man/nutscan_add_device_to_device.3 index 875732d..f98dfac 100644 --- a/docs/man/nutscan_add_device_to_device.3 +++ b/docs/man/nutscan_add_device_to_device.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_add_device_to_device .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_ADD_DEVICE_T" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_ADD_DEVICE_T" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_add_option_to_device.3 b/docs/man/nutscan_add_option_to_device.3 index bb1bd59..c591587 100644 --- a/docs/man/nutscan_add_option_to_device.3 +++ b/docs/man/nutscan_add_option_to_device.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_add_option_to_device .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_ADD_OPTION_T" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_ADD_OPTION_T" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_cidr_to_ip.3 b/docs/man/nutscan_cidr_to_ip.3 index 0e2ae46..aedb836 100644 --- a/docs/man/nutscan_cidr_to_ip.3 +++ b/docs/man/nutscan_cidr_to_ip.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_cidr_to_ip .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_CIDR_TO_IP" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_CIDR_TO_IP" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_display_parsable.3 b/docs/man/nutscan_display_parsable.3 index f812757..0b1ac06 100644 --- a/docs/man/nutscan_display_parsable.3 +++ b/docs/man/nutscan_display_parsable.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_display_parsable .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_DISPLAY_PARS" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_DISPLAY_PARS" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_display_ups_conf.3 b/docs/man/nutscan_display_ups_conf.3 index 917707f..6df43c5 100644 --- a/docs/man/nutscan_display_ups_conf.3 +++ b/docs/man/nutscan_display_ups_conf.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_display_ups_conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_DISPLAY_UPS_" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_DISPLAY_UPS_" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_free_device.3 b/docs/man/nutscan_free_device.3 index c05bb8e..962cd4b 100644 --- a/docs/man/nutscan_free_device.3 +++ b/docs/man/nutscan_free_device.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_free_device .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_FREE_DEVICE" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_FREE_DEVICE" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_get_serial_ports_list.3 b/docs/man/nutscan_get_serial_ports_list.3 index 47b3bd4..567eb8e 100644 --- a/docs/man/nutscan_get_serial_ports_list.3 +++ b/docs/man/nutscan_get_serial_ports_list.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_get_serial_ports_list .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_GET_SERIAL_P" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_GET_SERIAL_P" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_init.3 b/docs/man/nutscan_init.3 index 549cf0d..0691ee5 100644 --- a/docs/man/nutscan_init.3 +++ b/docs/man/nutscan_init.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_init .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_INIT" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_INIT" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_new_device.3 b/docs/man/nutscan_new_device.3 index 5248d3f..9bdcab1 100644 --- a/docs/man/nutscan_new_device.3 +++ b/docs/man/nutscan_new_device.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_new_device .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_NEW_DEVICE" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_NEW_DEVICE" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_avahi.3 b/docs/man/nutscan_scan_avahi.3 index d113387..921d61f 100644 --- a/docs/man/nutscan_scan_avahi.3 +++ b/docs/man/nutscan_scan_avahi.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_scan_avahi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_SCAN_AVAHI" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_SCAN_AVAHI" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_eaton_serial.3 b/docs/man/nutscan_scan_eaton_serial.3 index 0d34a97..13f2bdf 100644 --- a/docs/man/nutscan_scan_eaton_serial.3 +++ b/docs/man/nutscan_scan_eaton_serial.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_scan_eaton_serial .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_SCAN_EATON_S" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_SCAN_EATON_S" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_ipmi.3 b/docs/man/nutscan_scan_ipmi.3 index 3731954..c782ec7 100644 --- a/docs/man/nutscan_scan_ipmi.3 +++ b/docs/man/nutscan_scan_ipmi.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_scan_ipmi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_SCAN_IPMI" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_SCAN_IPMI" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_nut.3 b/docs/man/nutscan_scan_nut.3 index 482aea7..d3e34d7 100644 --- a/docs/man/nutscan_scan_nut.3 +++ b/docs/man/nutscan_scan_nut.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_scan_nut .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_SCAN_NUT" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_SCAN_NUT" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_snmp.3 b/docs/man/nutscan_scan_snmp.3 index f255dc8..40cdb3b 100644 --- a/docs/man/nutscan_scan_snmp.3 +++ b/docs/man/nutscan_scan_snmp.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_scan_snmp .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_SCAN_SNMP" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_SCAN_SNMP" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_usb.3 b/docs/man/nutscan_scan_usb.3 index 9e223df..fca4e54 100644 --- a/docs/man/nutscan_scan_usb.3 +++ b/docs/man/nutscan_scan_usb.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_scan_usb .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_SCAN_USB" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_SCAN_USB" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_xml_http.3 b/docs/man/nutscan_scan_xml_http.3 index 75f35c0..64a6797 100644 --- a/docs/man/nutscan_scan_xml_http.3 +++ b/docs/man/nutscan_scan_xml_http.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_scan_xml_http .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_SCAN_XML_HTT" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_SCAN_XML_HTT" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutupsdrv.8 b/docs/man/nutupsdrv.8 index 991d88a..234f103 100644 --- a/docs/man/nutupsdrv.8 +++ b/docs/man/nutupsdrv.8 @@ -1,13 +1,13 @@ '\" t .\" Title: nutupsdrv .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTUPSDRV" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTUPSDRV" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/oneac.8 b/docs/man/oneac.8 index f4c54bc..4b69624 100644 --- a/docs/man/oneac.8 +++ b/docs/man/oneac.8 @@ -1,13 +1,13 @@ '\" t .\" Title: oneac .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "ONEAC" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "ONEAC" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/optiups.8 b/docs/man/optiups.8 index df62f9d..6713849 100644 --- a/docs/man/optiups.8 +++ b/docs/man/optiups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: optiups .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "OPTIUPS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "OPTIUPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/powercom.8 b/docs/man/powercom.8 index 17f0ae3..6782a26 100644 --- a/docs/man/powercom.8 +++ b/docs/man/powercom.8 @@ -1,13 +1,13 @@ '\" t .\" Title: powercom .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "POWERCOM" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "POWERCOM" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/powerman-pdu.8 b/docs/man/powerman-pdu.8 index 839b963..23549ea 100644 --- a/docs/man/powerman-pdu.8 +++ b/docs/man/powerman-pdu.8 @@ -1,13 +1,13 @@ '\" t .\" Title: powerman-pdu .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "POWERMAN\-PDU" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "POWERMAN\-PDU" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/powerpanel.8 b/docs/man/powerpanel.8 index b36a90b..1ca1c84 100644 --- a/docs/man/powerpanel.8 +++ b/docs/man/powerpanel.8 @@ -1,13 +1,13 @@ '\" t .\" Title: powerpanel .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "POWERPANEL" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "POWERPANEL" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/rhino.8 b/docs/man/rhino.8 index 280b4c6..f13dc8f 100644 --- a/docs/man/rhino.8 +++ b/docs/man/rhino.8 @@ -1,13 +1,13 @@ '\" t .\" Title: rhino .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "RHINO" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "RHINO" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/richcomm_usb.8 b/docs/man/richcomm_usb.8 index cbc27d5..b171425 100644 --- a/docs/man/richcomm_usb.8 +++ b/docs/man/richcomm_usb.8 @@ -1,13 +1,13 @@ '\" t .\" Title: richcomm_usb .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "RICHCOMM_USB" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "RICHCOMM_USB" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/riello_ser.8 b/docs/man/riello_ser.8 index 8d6227f..e4f41fe 100644 --- a/docs/man/riello_ser.8 +++ b/docs/man/riello_ser.8 @@ -1,13 +1,13 @@ '\" t .\" Title: riello_ser .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "RIELLO_SER" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "RIELLO_SER" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/riello_usb.8 b/docs/man/riello_usb.8 index 6297a49..b29e0ba 100644 --- a/docs/man/riello_usb.8 +++ b/docs/man/riello_usb.8 @@ -1,13 +1,13 @@ '\" t .\" Title: riello_usb .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "RIELLO_USB" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "RIELLO_USB" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/safenet.8 b/docs/man/safenet.8 index 813a87e..2cdd042 100644 --- a/docs/man/safenet.8 +++ b/docs/man/safenet.8 @@ -1,13 +1,13 @@ '\" t .\" Title: safenet .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "SAFENET" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "SAFENET" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/snmp-ups.8 b/docs/man/snmp-ups.8 index 4f12539..594e1bf 100644 --- a/docs/man/snmp-ups.8 +++ b/docs/man/snmp-ups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: snmp-ups .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "SNMP\-UPS" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "SNMP\-UPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/solis.8 b/docs/man/solis.8 index f643df6..434079e 100644 --- a/docs/man/solis.8 +++ b/docs/man/solis.8 @@ -1,13 +1,13 @@ '\" t .\" Title: solis .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "SOLIS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "SOLIS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -80,7 +80,31 @@ Solis 2000 VA Solis 3000 VA .RE .sp -All Solis models are sinusoidal on\-line +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Back\-UPS BZ1200\-BR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Back\-UPS BZ2200BI\-BR +.RE +.sp +All Solis models are sinusoidal on\-line\&. +.sp +In 2009, Schneider Electric acquired Microsol Technologies, and by 2012, the entire Microsol line of equipment was being sold under the APC brand\&. .SH "EXTRA ARGUMENTS" .sp This driver support the following extra optional settings in the \fBups.conf\fR(5)\&. @@ -111,6 +135,9 @@ shutdown\&.return \- Shut down in \&.3 minutes and restart in \&.3 minutes .\} shutdown\&.stayoff \- Shut down in \&.3 minutes and do not return .RE +.SH "ISSUES" +.sp +The APC version of the Microsol protocol is slightly incompatible with the \fBsolis\fR driver\&. As of version 0\&.62 of the \fBsolis\fR driver, the driver will connect to the UPS, but some values are read incorrectly\&. .SH "AUTHOR" .sp Silvino B\&. Magalhães diff --git a/docs/man/solis.txt b/docs/man/solis.txt index 37bc48d..d009b60 100644 --- a/docs/man/solis.txt +++ b/docs/man/solis.txt @@ -21,8 +21,13 @@ This driver has been tested with : * Solis 1500 VA * Solis 2000 VA * Solis 3000 VA + * Back-UPS BZ1200-BR + * Back-UPS BZ2200BI-BR -All Solis models are sinusoidal on-line +All Solis models are sinusoidal on-line. + +In 2009, Schneider Electric acquired Microsol Technologies, and by 2012, the +entire Microsol line of equipment was being sold under the APC brand. EXTRA ARGUMENTS --------------- @@ -41,6 +46,13 @@ COMMANDS * shutdown.stayoff - Shut down in .3 minutes and do not return +ISSUES +------ + +The APC version of the Microsol protocol is slightly incompatible with the +*solis* driver. As of version 0.62 of the *solis* driver, the driver will +connect to the UPS, but some values are read incorrectly. + AUTHOR ------ Silvino B. Magalhães diff --git a/docs/man/tripplite.8 b/docs/man/tripplite.8 index fcf979c..f8fde31 100644 --- a/docs/man/tripplite.8 +++ b/docs/man/tripplite.8 @@ -1,13 +1,13 @@ '\" t .\" Title: tripplite .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "TRIPPLITE" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "TRIPPLITE" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/tripplite_usb.8 b/docs/man/tripplite_usb.8 index feecd83..82e80a5 100644 --- a/docs/man/tripplite_usb.8 +++ b/docs/man/tripplite_usb.8 @@ -1,13 +1,13 @@ '\" t .\" Title: tripplite_usb .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "TRIPPLITE_USB" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "TRIPPLITE_USB" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -173,6 +173,12 @@ This driver supports the following optional settings in the \fBups.conf\fR(5) fi This setting controls the delay between receiving the "kill" command (\fI\-k\fR) and actually cutting power to the computer\&. .RE .PP +\fBbattery_min\fR, \fBbattery_max\fR +.RS 4 +These floating\-point values correspond to the "empty" (10%) and "full" (100%) voltages of the battery\&. They are used for an approximation of the battery state\-of\-charge\&. The calculated battery\&.charge value will be clamped to the range of 10% through 100%, so the resting voltage of the charged battery can be used for +\fBbattery_max\fR, and the higher float charge voltage should not cause problems\&. +.RE +.PP \fBbus\fR .RS 4 This regular expression is used to match the USB bus (as seen in diff --git a/docs/man/tripplite_usb.txt b/docs/man/tripplite_usb.txt index 9e4e59e..1d67caa 100644 --- a/docs/man/tripplite_usb.txt +++ b/docs/man/tripplite_usb.txt @@ -60,6 +60,15 @@ file (or with '-x' on the command line): This setting controls the delay between receiving the "kill" command ('-k') and actually cutting power to the computer. +*battery_min*, *battery_max*:: + +These floating-point values correspond to the "empty" (10%) and "full" (100%) +voltages of the battery. They are used for an approximation of the battery +state-of-charge. The calculated battery.charge value will be clamped to the +range of 10% through 100%, so the resting voltage of the charged battery can be +used for *battery_max*, and the higher float charge voltage should not cause +problems. + *bus*:: This regular expression is used to match the USB bus (as seen in diff --git a/docs/man/tripplitesu.8 b/docs/man/tripplitesu.8 index d9bc32e..afb2789 100644 --- a/docs/man/tripplitesu.8 +++ b/docs/man/tripplitesu.8 @@ -1,13 +1,13 @@ '\" t .\" Title: tripplitesu .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "TRIPPLITESU" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "TRIPPLITESU" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/ups.conf.5 b/docs/man/ups.conf.5 index 14584c8..835ae8e 100644 --- a/docs/man/ups.conf.5 +++ b/docs/man/ups.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: ups.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/22/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPS\&.CONF" "5" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPS\&.CONF" "5" "04/22/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -107,6 +107,19 @@ The default is 5 seconds\&. Optional\&. The status of the UPS will be refreshed after a maximum delay which is controlled by this setting\&. This is normally 2 seconds\&. This may be useful if the driver is creating too much of a load on your system or network\&. .RE .PP +\fBsynchronous\fR +.RS 4 +Optional\&. The driver work by default in asynchronous mode (i\&.e +\fBsynchronous=no\fR)\&. This means that all data are pushed by the driver on the communication socket to upsd (Unix socket on Unix, Named pipe on Windows) without waiting for these data to be actually consumed\&. With some HW, such as ePDUs, that can produce a lot of data, asynchronous mode may cause some congestion, resulting in the socket to be full, and the driver to appear as not connected\&. By enabling the +\fIsynchronous\fR +flag (value = +\fIyes\fR), the driver will wait for data to be consumed by upsd, prior to publishing more\&. This can be enabled either globally or per driver\&. +.sp +The default is +\fIno\fR +(i\&.e\&. asynchronous mode) for backward compatibility of the driver behavior\&. +.RE +.PP \fBuser\fR .RS 4 Optional\&. If started as root, the driver will setuid(2) to the user id associated with @@ -189,6 +202,21 @@ Optional\&. This can be set as a global variable above your first UPS definition The default is 45 seconds\&. .RE .PP +\fBsynchronous\fR +.RS 4 +Optional\&. Same as the global directive of the same name, but this is for a specific device\&. +.RE +.PP +\fBusb_set_altinterface\fR[=\fIaltinterface\fR] +.RS 4 +Optional\&. Force the USB code to call +usb_set_altinterface(0), as was done in NUT 2\&.7\&.2 and earlier\&. This should not be necessary, since the default for +bAlternateSetting +(as shown in lsusb) is zero on all USB devices seen to date\&. However, this redundant call to +usb_set_altinterface() +prevents certain UPSes from working on Mac OS X\&. If your UPS requires explicitly setting the alternate interface, include this flag, and email the nut\-upsdev list with details about your UPS and operating system\&. +.RE +.PP \fBdefault\&.\fR .RS 4 Optional\&. Set a default value for which is used in case the UPS doesn\(cqt provide a value, but will be overwritten if a value is available from the UPS: diff --git a/docs/man/ups.conf.txt b/docs/man/ups.conf.txt index 4877852..dd145bd 100644 --- a/docs/man/ups.conf.txt +++ b/docs/man/ups.conf.txt @@ -80,6 +80,22 @@ delay which is controlled by this setting. This is normally 2 seconds. This may be useful if the driver is creating too much of a load on your system or network. +*synchronous*:: + +Optional. The driver work by default in asynchronous mode (i.e +*synchronous=no*). This means that all data are pushed by the driver +on the communication socket to upsd (Unix socket on Unix, Named pipe +on Windows) without waiting for these data to be actually consumed. +With some HW, such as ePDUs, that can produce a lot of data, +asynchronous mode may cause some congestion, resulting in the socket to +be full, and the driver to appear as not connected. By enabling the +'synchronous' flag (value = 'yes'), the driver will wait for data to be +consumed by upsd, prior to publishing more. This can be enabled either +globally or per driver. ++ +The default is 'no' (i.e. asynchronous mode) for backward compatibility +of the driver behavior. + *user*:: Optional. If started as root, the driver will setuid(2) to the user id @@ -154,6 +170,21 @@ system from getting stuck due to a broken driver or UPS. + The default is 45 seconds. +*synchronous*:: + +Optional. Same as the global directive of the same name, but this is +for a specific device. + +*usb_set_altinterface*[='altinterface']:: + +Optional. Force the USB code to call `usb_set_altinterface(0)`, as was done in +NUT 2.7.2 and earlier. This should not be necessary, since the default for +`bAlternateSetting` (as shown in lsusb) is zero on all USB devices seen to +date. However, this redundant call to `usb_set_altinterface()` prevents +certain UPSes from working on Mac OS X. If your UPS requires explicitly setting +the alternate interface, include this flag, and email the nut-upsdev list with +details about your UPS and operating system. + *default.*:: Optional. Set a default value for which is used in case the UPS diff --git a/docs/man/upsc.8 b/docs/man/upsc.8 index dab4787..1914da4 100644 --- a/docs/man/upsc.8 +++ b/docs/man/upsc.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsc .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSC" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSC" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_add_host_cert.3 b/docs/man/upscli_add_host_cert.3 index ae8d6f1..aff4f80 100644 --- a/docs/man/upscli_add_host_cert.3 +++ b/docs/man/upscli_add_host_cert.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_add_host_cert .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_ADD_HOST_CERT" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_ADD_HOST_CERT" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_cleanup.3 b/docs/man/upscli_cleanup.3 index 6364c26..4ed07ef 100644 --- a/docs/man/upscli_cleanup.3 +++ b/docs/man/upscli_cleanup.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_cleanup .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_CLEANUP" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_CLEANUP" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_connect.3 b/docs/man/upscli_connect.3 index f5743bc..bf5e5ff 100644 --- a/docs/man/upscli_connect.3 +++ b/docs/man/upscli_connect.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_connect .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_CONNECT" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_CONNECT" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_disconnect.3 b/docs/man/upscli_disconnect.3 index fff9b19..05dd513 100644 --- a/docs/man/upscli_disconnect.3 +++ b/docs/man/upscli_disconnect.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_disconnect .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_DISCONNECT" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_DISCONNECT" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_fd.3 b/docs/man/upscli_fd.3 index 338eca3..9efb4cf 100644 --- a/docs/man/upscli_fd.3 +++ b/docs/man/upscli_fd.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_fd .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_FD" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_FD" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_get.3 b/docs/man/upscli_get.3 index 8c88bd3..590711f 100644 --- a/docs/man/upscli_get.3 +++ b/docs/man/upscli_get.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_get .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_GET" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_GET" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,8 +36,8 @@ upscli_get \- retrieve data from a UPS .fi .sp .nf -int upscli_get(UPSCONN_t *ups, int numq, const char **query, - int *numa, char ***answer) +int upscli_get(UPSCONN_t *ups, unsigned int numq, const char **query, + unsigned int *numa, char ***answer) .fi .SH "DESCRIPTION" .sp @@ -121,7 +121,7 @@ To generate a request for GET NUMLOGINS su700, you would populate query and numq .RS 4 .\} .nf -int numq; +unsigned int numq; const char *query[2]; .fi .if n \{\ @@ -149,6 +149,16 @@ The raw response from upsd to the above query would be NUMLOGINS su700 1\&. Sinc .RS 4 .\} .nf +unsigned int numa; +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf numa = 3; answer[0] = "NUMLOGINS" answer[1] = "su700" @@ -174,6 +184,21 @@ The array will be deleted after calling \fBupscli_disconnect\fR(3)\&. Any access .SH "RETURN VALUE" .sp The \fBupscli_get()\fR function returns 0 on success, or \-1 if an error occurs\&. +.sp +If \fBupsd\fR disconnects, you may need to handle or ignore SIGPIPE in order to prevent your program from terminating the next time that the library writes to the disconnected socket\&. The following code in your initialization function will allow the \fBupscli_get()\fR call to return an error in that case: +.sp +.if n \{\ +.RS 4 +.\} +.nf +#include +\&.\&.\&. +signal (SIGPIPE, SIG_IGN); +\&.\&.\&. +.fi +.if n \{\ +.RE +.\} .SH "SEE ALSO" .sp \fBupscli_list_start\fR(3), \fBupscli_list_next\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_get.txt b/docs/man/upscli_get.txt index 00aea76..71cdf1a 100644 --- a/docs/man/upscli_get.txt +++ b/docs/man/upscli_get.txt @@ -10,8 +10,8 @@ SYNOPSIS #include - int upscli_get(UPSCONN_t *ups, int numq, const char **query, - int *numa, char ***answer) + int upscli_get(UPSCONN_t *ups, unsigned int numq, const char **query, + unsigned int *numa, char ***answer) DESCRIPTION ----------- @@ -43,7 +43,7 @@ QUERY FORMATTING To generate a request for `GET NUMLOGINS su700`, you would populate query and numq as follows: - int numq; + unsigned int numq; const char *query[2]; query[0] = "NUMLOGINS"; @@ -58,6 +58,8 @@ ANSWER FORMATTING The raw response from upsd to the above query would be `NUMLOGINS su700 1`. Since this is split up for you, the values work out like this: + unsigned int numa; + numa = 3; answer[0] = "NUMLOGINS" answer[1] = "su700" @@ -96,6 +98,16 @@ RETURN VALUE The *upscli_get()* function returns 0 on success, or -1 if an error occurs. +If *upsd* disconnects, you may need to handle or ignore `SIGPIPE` in order to +prevent your program from terminating the next time that the library writes to +the disconnected socket. The following code in your initialization function +will allow the *upscli_get()* call to return an error in that case: + + #include + ... + signal (SIGPIPE, SIG_IGN); + ... + SEE ALSO -------- linkman:upscli_list_start[3], linkman:upscli_list_next[3], diff --git a/docs/man/upscli_init.3 b/docs/man/upscli_init.3 index 9a666a0..67afe20 100644 --- a/docs/man/upscli_init.3 +++ b/docs/man/upscli_init.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_init .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_INIT" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_INIT" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_list_next.3 b/docs/man/upscli_list_next.3 index 6e64479..00a231d 100644 --- a/docs/man/upscli_list_next.3 +++ b/docs/man/upscli_list_next.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_list_next .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_LIST_NEXT" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_LIST_NEXT" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,8 +36,8 @@ upscli_list_next \- retrieve list items from a UPS .fi .sp .nf -int upscli_list_next(UPSCONN_t *ups, int numq, const char **query, - int *numa, char ***answer) +int upscli_list_next(UPSCONN_t *ups, unsigned int numq, const char **query, + unsigned int *numa, char ***answer) .fi .SH "DESCRIPTION" .sp diff --git a/docs/man/upscli_list_next.txt b/docs/man/upscli_list_next.txt index 30fc7b3..20c1174 100644 --- a/docs/man/upscli_list_next.txt +++ b/docs/man/upscli_list_next.txt @@ -11,8 +11,8 @@ SYNOPSIS #include - int upscli_list_next(UPSCONN_t *ups, int numq, const char **query, - int *numa, char ***answer) + int upscli_list_next(UPSCONN_t *ups, unsigned int numq, const char **query, + unsigned int *numa, char ***answer) DESCRIPTION ----------- diff --git a/docs/man/upscli_list_start.3 b/docs/man/upscli_list_start.3 index 9b66ccf..e26f750 100644 --- a/docs/man/upscli_list_start.3 +++ b/docs/man/upscli_list_start.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_list_start .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_LIST_START" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_LIST_START" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -33,7 +33,10 @@ upscli_list_start \- begin multi\-item retrieval from a UPS .sp .nf #include -int upscli_list_start(UPSCONN_t *ups, int numq, const char **query) +.fi +.sp +.nf +int upscli_list_start(UPSCONN_t *ups, unsigned int numq, const char **query) .fi .SH "DESCRIPTION" .sp @@ -117,7 +120,7 @@ To see the list of variables on a UPS called \fIsu700\fR, the protocol command w .RS 4 .\} .nf -int numq; +unsigned int numq; const char *query[2]; .fi .if n \{\ diff --git a/docs/man/upscli_list_start.txt b/docs/man/upscli_list_start.txt index e041934..e425f9e 100644 --- a/docs/man/upscli_list_start.txt +++ b/docs/man/upscli_list_start.txt @@ -10,7 +10,8 @@ SYNOPSIS -------- #include - int upscli_list_start(UPSCONN_t *ups, int numq, const char **query) + + int upscli_list_start(UPSCONN_t *ups, unsigned int numq, const char **query) DESCRIPTION ----------- @@ -46,7 +47,7 @@ To see the list of variables on a UPS called 'su700', the protocol command would be `LIST VAR su700`. To start that list with this function, you would populate query and numq as follows: - int numq; + unsigned int numq; const char *query[2]; query[0] = "VAR"; diff --git a/docs/man/upscli_readline.3 b/docs/man/upscli_readline.3 index 925d683..523bbdc 100644 --- a/docs/man/upscli_readline.3 +++ b/docs/man/upscli_readline.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_readline .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_READLINE" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_READLINE" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_sendline.3 b/docs/man/upscli_sendline.3 index 1f54d10..61bfac1 100644 --- a/docs/man/upscli_sendline.3 +++ b/docs/man/upscli_sendline.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_sendline .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_SENDLINE" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_SENDLINE" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_splitaddr.3 b/docs/man/upscli_splitaddr.3 index 1db69f3..ec231d7 100644 --- a/docs/man/upscli_splitaddr.3 +++ b/docs/man/upscli_splitaddr.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_splitaddr .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_SPLITADDR" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_SPLITADDR" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_splitname.3 b/docs/man/upscli_splitname.3 index 2dc54da..bfd993b 100644 --- a/docs/man/upscli_splitname.3 +++ b/docs/man/upscli_splitname.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_splitname .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_SPLITNAME" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_SPLITNAME" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_ssl.3 b/docs/man/upscli_ssl.3 index 2460c43..a5b5bc1 100644 --- a/docs/man/upscli_ssl.3 +++ b/docs/man/upscli_ssl.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_ssl .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_SSL" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_SSL" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_strerror.3 b/docs/man/upscli_strerror.3 index 28069f8..af15ed9 100644 --- a/docs/man/upscli_strerror.3 +++ b/docs/man/upscli_strerror.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_strerror .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_STRERROR" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_STRERROR" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_upserror.3 b/docs/man/upscli_upserror.3 index bcfb5a3..b2f2d9c 100644 --- a/docs/man/upscli_upserror.3 +++ b/docs/man/upscli_upserror.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_upserror .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_UPSERROR" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_UPSERROR" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsclient.3 b/docs/man/upsclient.3 index 3f822f8..8583d22 100644 --- a/docs/man/upsclient.3 +++ b/docs/man/upsclient.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upsclient .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLIENT" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLIENT" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscmd.8 b/docs/man/upscmd.8 index d21afa1..f86c873 100644 --- a/docs/man/upscmd.8 +++ b/docs/man/upscmd.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upscmd .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCMD" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCMD" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscode2.8 b/docs/man/upscode2.8 index 1ea0a85..3163168 100644 --- a/docs/man/upscode2.8 +++ b/docs/man/upscode2.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upscode2 .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCODE2" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCODE2" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsd.8 b/docs/man/upsd.8 index 026be3d..5c81855 100644 --- a/docs/man/upsd.8 +++ b/docs/man/upsd.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsd .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSD" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSD" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsd.conf.5 b/docs/man/upsd.conf.5 index 7e13883..24dc318 100644 --- a/docs/man/upsd.conf.5 +++ b/docs/man/upsd.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: upsd.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSD\&.CONF" "5" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSD\&.CONF" "5" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -110,7 +110,6 @@ When compiled with SSL support with NSS backend and client certificate validatio .sp -1 .IP \(bu 2.3 .\} - \fI0\fR to not request to clients to provide any certificate .RE @@ -123,7 +122,6 @@ to not request to clients to provide any certificate .sp -1 .IP \(bu 2.3 .\} - \fI1\fR to require to all clients a certificate .RE @@ -136,7 +134,6 @@ to require to all clients a certificate .sp -1 .IP \(bu 2.3 .\} - \fI2\fR to require to all clients a valid certificate .RE diff --git a/docs/man/upsd.users.5 b/docs/man/upsd.users.5 index ee73e73..7367139 100644 --- a/docs/man/upsd.users.5 +++ b/docs/man/upsd.users.5 @@ -1,13 +1,13 @@ '\" t .\" Title: upsd.users .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSD\&.USERS" "5" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSD\&.USERS" "5" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsdrvctl.8 b/docs/man/upsdrvctl.8 index a8610d8..ae4e846 100644 --- a/docs/man/upsdrvctl.8 +++ b/docs/man/upsdrvctl.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsdrvctl .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSDRVCTL" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSDRVCTL" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsimage.cgi.8 b/docs/man/upsimage.cgi.8 index 8847895..6464d23 100644 --- a/docs/man/upsimage.cgi.8 +++ b/docs/man/upsimage.cgi.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsimage.cgi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 03/21/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSIMAGE\&.CGI" "8" "03/21/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSIMAGE\&.CGI" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upslog.8 b/docs/man/upslog.8 index 1f3da75..a79cf23 100644 --- a/docs/man/upslog.8 +++ b/docs/man/upslog.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upslog .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSLOG" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSLOG" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -138,6 +138,9 @@ is not defined, it will use the value that was compiled into the program\&. This .SH "SERVICE DELAYS" .sp The interval value is merely the number given to \fBsleep\fR(3) after running through the format string\&. Therefore, a query will actually take slightly longer than the interval, depending on the speed of your system\&. +.SH "ON-DEMAND LOGGING" +.sp +Sending a USR1 signal to a running \fBupslog\fR process makes it wake from the current sleep and log immediately\&. This is useful when triggered from a \fBupssched\fR event trigger (e\&.g\&. AT ONBATT or AT ONLINE) to ensure that an entry always exists, even if the power goes away for a period of time shorter than that specified by the \-i argument\&. .SH "LOG ROTATION" .sp \fBupslog\fR writes its PID to upslog\&.pid, and will reopen the log file if you send it a SIGHUP\&. This allows it to keep running when the log is rotated by an external program\&. @@ -147,7 +150,7 @@ The interval value is merely the number given to \fBsleep\fR(3) after running th \fBupsd\fR(8) .SS "Clients:" .sp -\fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8), \fBupsmon\fR(8) +\fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8), \fBupsmon\fR(8), \fBupssched\fR(8) .SS "Internet resources:" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upslog.txt b/docs/man/upslog.txt index b3603d8..4571cc3 100644 --- a/docs/man/upslog.txt +++ b/docs/man/upslog.txt @@ -86,6 +86,16 @@ The interval value is merely the number given to *sleep*(3) after running through the format string. Therefore, a query will actually take slightly longer than the interval, depending on the speed of your system. +ON-DEMAND LOGGING +----------------- + +Sending a USR1 signal to a running *upslog* process makes it wake from the +current sleep and log immediately. This is useful when triggered from a +*upssched* event trigger (e.g. `AT ONBATT` or `AT ONLINE`) to ensure that an +entry always exists, even if the power goes away for a period of time shorter +than that specified by the `-i` argument. + + LOG ROTATION ------------ @@ -103,7 +113,7 @@ linkman:upsd[8] Clients: ~~~~~~~~ linkman:upsc[8], linkman:upscmd[8], -linkman:upsrw[8], linkman:upsmon[8] +linkman:upsrw[8], linkman:upsmon[8], linkman:upssched[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ diff --git a/docs/man/upsmon.8 b/docs/man/upsmon.8 index 7830762..9421226 100644 --- a/docs/man/upsmon.8 +++ b/docs/man/upsmon.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsmon .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSMON" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSMON" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -233,7 +233,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - NOTIFYFLAG ONLINE SYSLOG .RE .sp @@ -245,7 +244,6 @@ NOTIFYFLAG ONLINE SYSLOG .sp -1 .IP \(bu 2.3 .\} - NOTIFYFLAG ONBATT SYSLOG+WALL .RE .sp @@ -257,7 +255,6 @@ NOTIFYFLAG ONBATT SYSLOG+WALL .sp -1 .IP \(bu 2.3 .\} - NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC .RE .sp @@ -301,7 +298,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - NOTIFYMSG ONLINE "UPS %s is getting line power" .RE .sp diff --git a/docs/man/upsmon.conf.5 b/docs/man/upsmon.conf.5 index 9c7b002..d2e3526 100644 --- a/docs/man/upsmon.conf.5 +++ b/docs/man/upsmon.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: upsmon.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSMON\&.CONF" "5" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSMON\&.CONF" "5" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -339,7 +339,9 @@ if it exists\&. .sp This is done to forcibly reset the slaves, so they don\(cqt get stuck at the "halted" stage even if the power returns during the shutdown process\&. This usually does not work well on contact\-closure UPSes that use the genericups driver\&. .sp -See the shutdown\&.txt file in the docs subdirectory for more information\&. +See the config\-notes\&.txt file in the docs subdirectory for more information\&. Refer to the section: + +"Configuring automatic shutdowns for low battery events", or refer to the online version\&. .RE .PP \fBRBWARNTIME\fR \fIseconds\fR diff --git a/docs/man/upsmon.conf.txt b/docs/man/upsmon.conf.txt index 4ae285b..fccf495 100644 --- a/docs/man/upsmon.conf.txt +++ b/docs/man/upsmon.conf.txt @@ -275,7 +275,10 @@ the "halted" stage even if the power returns during the shutdown process. This usually does not work well on contact-closure UPSes that use the genericups driver. + -See the shutdown.txt file in the docs subdirectory for more information. +See the config-notes.txt file in the docs subdirectory for more information. +Refer to the section: +[[UPS_shutdown]] "Configuring automatic shutdowns for low battery events", +or refer to the online version. *RBWARNTIME* 'seconds':: diff --git a/docs/man/upsrw.8 b/docs/man/upsrw.8 index 280505d..ed61839 100644 --- a/docs/man/upsrw.8 +++ b/docs/man/upsrw.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsrw .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSRW" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSRW" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upssched.8 b/docs/man/upssched.8 index 05b759a..0c3f838 100644 --- a/docs/man/upssched.8 +++ b/docs/man/upssched.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upssched .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSSCHED" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSSCHED" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upssched.conf.5 b/docs/man/upssched.conf.5 index 0483b31..8770d33 100644 --- a/docs/man/upssched.conf.5 +++ b/docs/man/upssched.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: upssched.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSSCHED\&.CONF" "5" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSSCHED\&.CONF" "5" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsset.cgi.8 b/docs/man/upsset.cgi.8 index b5b563a..d74c140 100644 --- a/docs/man/upsset.cgi.8 +++ b/docs/man/upsset.cgi.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsset.cgi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSSET\&.CGI" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSSET\&.CGI" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsset.conf.5 b/docs/man/upsset.conf.5 index 87a5601..4292322 100644 --- a/docs/man/upsset.conf.5 +++ b/docs/man/upsset.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: upsset.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSSET\&.CONF" "5" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSSET\&.CONF" "5" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsstats.cgi.8 b/docs/man/upsstats.cgi.8 index 1458bad..4a2aea9 100644 --- a/docs/man/upsstats.cgi.8 +++ b/docs/man/upsstats.cgi.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsstats.cgi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSSTATS\&.CGI" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSSTATS\&.CGI" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsstats.html.5 b/docs/man/upsstats.html.5 index e9639ca..0864821 100644 --- a/docs/man/upsstats.html.5 +++ b/docs/man/upsstats.html.5 @@ -1,13 +1,13 @@ '\" t .\" Title: upsstats.html .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSSTATS\&.HTML" "5" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSSTATS\&.HTML" "5" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/usbhid-ups.8 b/docs/man/usbhid-ups.8 index 6fd4034..0972045 100644 --- a/docs/man/usbhid-ups.8 +++ b/docs/man/usbhid-ups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: usbhid-ups .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "USBHID\-UPS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "USBHID\-UPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -103,7 +103,7 @@ some Belkin models, .sp -1 .IP \(bu 2.3 .\} -some Cyber Power Systems models\&. +some Cyber Power Systems models, .RE .sp .RS 4 @@ -114,7 +114,18 @@ some Cyber Power Systems models\&. .sp -1 .IP \(bu 2.3 .\} -some TrippLite models +some Powercom models, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +some TrippLite models\&. .RE .sp For a more complete list, refer to the NUT hardware compatibility list, available in the source distribution as data/drivers\&.list, or on the NUT website\&. You may use the "explore" driver option to gather information from HID UPSes which are not yet supported; see below for details\&. @@ -223,7 +234,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - \-x vendor="Foo\&.Corporation\&.*" .RE .sp @@ -235,7 +245,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - \-x vendorid=051d* (APC) .RE @@ -248,7 +257,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - \-x product="\&.*(Smart|Back)\-?UPS\&.*" .RE .RE @@ -267,6 +275,16 @@ With this option, the driver will connect to any device, including ones that are .RS 4 With this option, the driver activates a tweak to workaround buggy firmware returning invalid HID report length\&. Some APC Back\-UPS units are known to have this bug\&. .RE +.PP +\fBinterruptonly\fR +.RS 4 +If this flag is set, the driver will not poll UPS\&. This also implies using of INPUT flagged objects\&. Some Powercom units need this option\&. +.RE +.PP +\fBinterruptsize\fR=\fInum\fR +.RS 4 +Limit the number of bytes to read from interrupt pipe\&. For some Powercom units this option should be equal to 8\&. +.RE .SH "INSTALLATION" .sp This driver is not built by default\&. You can build it by using "configure \-\-with\-usb=yes"\&. Note that it will also install other USB drivers\&. diff --git a/docs/man/usbhid-ups.txt b/docs/man/usbhid-ups.txt index 1f6f729..a125837 100644 --- a/docs/man/usbhid-ups.txt +++ b/docs/man/usbhid-ups.txt @@ -31,8 +31,9 @@ At the present time, usbhid-ups supports: - all Dell USB models, - some APC models, - some Belkin models, - - some Cyber Power Systems models. - - some TrippLite models + - some Cyber Power Systems models, + - some Powercom models, + - some TrippLite models. For a more complete list, refer to the NUT hardware compatibility list, available in the source distribution as data/drivers.list, or on the @@ -120,6 +121,14 @@ With this option, the driver activates a tweak to workaround buggy firmware returning invalid HID report length. Some APC Back-UPS units are known to have this bug. +*interruptonly*:: +If this flag is set, the driver will not poll UPS. This also implies using of +INPUT flagged objects. Some Powercom units need this option. + +*interruptsize*='num':: +Limit the number of bytes to read from interrupt pipe. For some Powercom units +this option should be equal to 8. + INSTALLATION ------------ diff --git a/docs/man/victronups.8 b/docs/man/victronups.8 index 6934487..d400151 100644 --- a/docs/man/victronups.8 +++ b/docs/man/victronups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: victronups .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "VICTRONUPS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "VICTRONUPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/new-drivers.txt b/docs/new-drivers.txt index bdd5084..9145f49 100644 --- a/docs/new-drivers.txt +++ b/docs/new-drivers.txt @@ -1,15 +1,15 @@ Creating a new driver to support another device =============================================== -This chapter will present the process to create a new driver to support +This chapter will present the process of creating a new driver to support another device. -Since NUT already supports all major power devices protocols, through -several generic drivers (genericups, usbhid-ups, snmp-ups, blazer_*, ...), -creation of new drivers has become rare. +Since NUT already supports many major power devices protocols through +several generic drivers (genericups, usbhid-ups, snmp-ups, blazer_* and +nutdrv_qx), creation of new drivers has become rare. So most of the time, it will be limited to completing one of these -generic driver. +generic drivers. Smart vs. Contact-closure ------------------------- @@ -698,6 +698,26 @@ latter accepts either "\n", "\n\r" or "\r\n" as line termination. You can define other termination characters as well, but can't undefine "\r" and "\n" (so if you need these as data, this is not for you). +Adding the driver into the tree +------------------------------- + +In order to build your new driver, it needs to be added to +`drivers/Makefile.am`. At the moment, there are several driver list variables +corresponding to the general protocol of the driver (`SERIAL_DRIVERLIST`, +`SNMP_DRIVERLIST`, etc.). If your driver does not fit into one of these +categories, please discuss it on the nut-upsdev mailing list. + +There are also `*_SOURCES` and optional `*_LDADD` variables to list the source +files, and any additional linker flags. If your driver uses the C math +library, be sure to add `-lm`, since this flag is not always included by +default on embedded systems. + +When you add a driver to one of these lists, pay attention to the backslash +continuation characters (`\\`) at the end of the lines. + +The `automake` program converts the `Makefile.am` files into `Makefile.in` +files to be processed by `./configure`. See the discussion in <> +about automating the rebuild process for these files. [[contact-closure]] diff --git a/docs/nut-names.txt b/docs/nut-names.txt index ebee1fe..cb81b7b 100644 --- a/docs/nut-names.txt +++ b/docs/nut-names.txt @@ -122,7 +122,7 @@ ups: General unit information NOTE: When present, the value of *ups.start.auto* has an impact on shutdown.* commands. For the sake of coherence, shutdown commands will set *ups.start.auto* -to the right value before issuing the command. Ie, shutdown.stayoff will first +to the right value before issuing the command. That is, shutdown.stayoff will first set *ups.start.auto* to *no*, while shutdown.return will set it to *yes*. input: Incoming line/power information @@ -136,6 +136,8 @@ input: Incoming line/power information | input.voltage.minimum | Minimum incoming voltage seen | 100 | input.voltage.nominal | Nominal input voltage | 120 | input.voltage.extended | Extended input voltage range | no +| input.transfer.delay | Delay before transfer to mains + (seconds) | 60 | input.transfer.reason | Reason for last transfer to battery (*** opaque) | T | input.transfer.low | Low voltage transfer point | 91 @@ -167,9 +169,14 @@ input: Incoming line/power information transfer point | 230 | input.transfer.trim.high | High voltage trimming transfer point | 240 +| input.load | Load on (ePDU) input (percent + of full) | 25 +| input.realpower | Current sum value of all (ePDU) + phases real power (W) | 300 +| input.power | Current sum value of all (ePDU) + phases apparent power (VA) | 500 |=============================================================================== - output: Outgoing power/inverter information ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -239,14 +246,14 @@ Valid CONTEXTs L3-N / L1 \ - L2 for currrent and power measurements + L2 for current and power measurements L3 / N - for current measurement Valid SPECs ^^^^^^^^^^^ -Valid with/without context (ie. per phase or aggregated/averaged) +Valid with/without context (i.e. per phase or aggregated/averaged) [options="header"] |=============================================================================== @@ -268,15 +275,18 @@ Valid with/without context (ie. per phase or aggregated/averaged) | realpower | Real power (W) | powerfactor | Power Factor (dimensionless value between 0.00 and 1.00) | crestfactor | Crest Factor (dimensionless value greater or equal to 1) +| load | Load on (ePDU) input |=============================================================================== -Valid without context (ie. aggregation of all phases): +Valid without context (i.e. aggregation of all phases): [options="header"] |=============================================================================== | Name | Description | frequency | Frequency (Hz) | frequency.nominal | Nominal frequency (Hz) +| realpower | Current value of real power (Watts) +| power | Current value of apparent power (Volt-Amps) |=============================================================================== EXAMPLES @@ -309,41 +319,47 @@ battery: Any battery details [options="header"] |=============================================================================== -| Name | Description | Example value -| battery.charge | Battery charge (percent) | 100.0 -| battery.charge.low | Remaining battery level when - UPS switches to LB (percent) | 20 -| battery.charge.restart | Minimum battery level for - UPS restart after power-off | 20 -| battery.charge.warning | Battery level when UPS switches - to "Warning" state (percent) | 50 -| battery.voltage | Battery voltage (V) | 24.84 -| battery.voltage.nominal | Nominal battery voltage (V) | 024 -| battery.voltage.low | Minimum battery voltage, that - triggers FSD status | 21,52 -| battery.voltage.high | Maximum battery voltage - (Ie battery.charge = 100) | 26,9 -| battery.capacity | Battery capacity (Ah) | 7.2 -| battery.current | Battery current (A) | 1.19 -| battery.current.total | Total battery current (A) | 1.19 -| battery.temperature | Battery temperature (degrees C) | 050.7 -| battery.runtime | Battery runtime (seconds) | 1080 -| battery.runtime.low | Remaining battery runtime when - UPS switches to LB (seconds) | 180 -| battery.runtime.restart | Minimum battery runtime for UPS - restart after power-off (seconds) | 120 -| battery.alarm.threshold | Battery alarm threshold | 0 (immediate) -| battery.date | Battery change date (opaque string) | 11/14/00 -| battery.mfr.date | Battery manufacturing date - (opaque string) | 2005/04/02 -| battery.packs | Number of battery packs | 001 -| battery.packs.bad | Number of bad battery packs | 000 -| battery.type | Battery chemistry (opaque - string) | PbAc -| battery.protection | Prevent deep discharge of - battery | yes -| battery.energysave | Switch off when running on - battery and no/low load | no +| Name | Description | Example value +| battery.charge | Battery charge (percent) | 100.0 +| battery.charge.low | Remaining battery level when + UPS switches to LB (percent) | 20 +| battery.charge.restart | Minimum battery level for + UPS restart after power-off | 20 +| battery.charge.warning | Battery level when UPS switches + to "Warning" state (percent) | 50 +| battery.voltage | Battery voltage (V) | 24.84 +| battery.voltage.nominal | Nominal battery voltage (V) | 024 +| battery.voltage.low | Minimum battery voltage, that + triggers FSD status | 21,52 +| battery.voltage.high | Maximum battery voltage + (i.e. battery.charge = 100) | 26,9 +| battery.capacity | Battery capacity (Ah) | 7.2 +| battery.current | Battery current (A) | 1.19 +| battery.current.total | Total battery current (A) | 1.19 +| battery.temperature | Battery temperature (degrees C) | 050.7 +| battery.runtime | Battery runtime (seconds) | 1080 +| battery.runtime.low | Remaining battery runtime when + UPS switches to LB (seconds) | 180 +| battery.runtime.restart | Minimum battery runtime for UPS + restart after power-off (seconds) | 120 +| battery.alarm.threshold | Battery alarm threshold | 0 (immediate) +| battery.date | Battery change date (opaque string) | 11/14/00 +| battery.mfr.date | Battery manufacturing date + (opaque string) | 2005/04/02 +| battery.packs | Number of battery packs | 001 +| battery.packs.bad | Number of bad battery packs | 000 +| battery.type | Battery chemistry (opaque + string) | PbAc +| battery.protection | Prevent deep discharge of + battery | yes +| battery.energysave | Switch off when running on + battery and no/low load | no +| battery.energysave.load | Switch off UPS if on battery and + load level lower (percent) | 5 +| battery.energysave.delay | Delay before switch off UPS if on + battery and load level low (min) | 3 +| battery.energysave.realpower | Switch off UPS if on battery + and load level lower (Watts) | 10 |=============================================================================== @@ -508,4 +524,5 @@ Instant commands | outlet.n.load.off | Turn off the outlet immediately | outlet.n.load.on | Turn on the outlet immediately | outlet.n.load.cycle | Power cycle the outlet immediately +| outlet.n.shutdown.return | Turn off the outlet and return when power is back |======================================================================== diff --git a/docs/nut-qa.txt b/docs/nut-qa.txt index 604e101..ebf256f 100644 --- a/docs/nut-qa.txt +++ b/docs/nut-qa.txt @@ -78,7 +78,7 @@ mailing list, and fixed quickly. - a project portal with trackers for bugs, feature request, patchs and tasks -NUT QA also relies on external tools, like: +NUT QA also relies on external tools and trackers, like: //////////////////////////////////////////////////////////////////////////////// FIXME (POST): @@ -91,7 +91,7 @@ FIXME (POST): //////////////////////////////////////////////////////////////////////////////// - Clang -- the Debian QA tools, available through the link:http://packages.qa.debian.org/n/nut.html[NUT Package Tracking System]: +- the Debian QA tools, available through the link:https://tracker.debian.org/pkg/nut[NUT Package Tracking System]: * Lintian general QA checks, * link:http://piuparts.debian.org/sid/source/n/nut.html[piuparts] automates @@ -104,6 +104,7 @@ is available in the link:https://code.edge.launchpad.net/qa-regression-testing[U It installs NUT, configures it with the dummy-ups driver, changes a few data and checks that these are well propagated with upsc. +- link:https://bugzilla.redhat.com/buglist.cgi?component=nut[Redhat / Fedora Bug tracker] Runtime quality ~~~~~~~~~~~~~~~ diff --git a/docs/nutdrv_qx-subdrivers.txt b/docs/nutdrv_qx-subdrivers.txt index 56d19f3..aa7fe50 100644 --- a/docs/nutdrv_qx-subdrivers.txt +++ b/docs/nutdrv_qx-subdrivers.txt @@ -85,7 +85,37 @@ String to match if the driver is expecting a reply from the UPS in case of error Note that this comparison is done on the answer we got back from the UPS before it has been processed, so include also the trailing carriage return (+\r+) and whatever character is expected. *+testing+*:: -Testing table that will hold the commands and the replies used for testing the subdriver. +Testing table (an array of +testing_t+) that will hold the commands and the replies used for testing the subdriver. ++ +-- ++testing_t+: + +---- +typedef struct { + const char *cmd; + const char answer[SMALLBUF]; + const int answer_len; +} testing_t; +---- + +Where: + +*+cmd+*:: +Command to match. + +*+answer+*:: +Answer for that command. ++ +NOTE: If +answer+ contains inner ++\0++s, in order to preserve them, +answer_len+ as well as an +item_t+'s +preprocess_answer()+ function must be set. + +*+answer_len+*:: +Answer length: ++ +- if set to +-1+ -> auto calculate answer length (treat +answer+ as a null-terminated string), +- otherwise -> use the provided length (if reasonable) and preserve inner ++\0++s (treat +answer+ as a sequence of bytes till the +item_t+'s +preprocess_answer()+ function gets called). + +For more informations, see <<_mapping_an_idiom_to_nut,Mapping an idiom to NUT>>. +-- Mapping an idiom to NUT @@ -107,6 +137,7 @@ typedef struct item_t { const int to; const char *dfl; unsigned long qxflags; + int (*preprocess_answer)(struct item_t *item, const int len); int (*preprocess)(struct item_t *item, char *value, size_t valuelen); } item_t; ---- @@ -155,6 +186,8 @@ Command sent to the UPS to get answer/to execute a instant command/to set a vari *+answer+*:: Answer from the UPS, filled at runtime. ++ +NOTE: If you expect a nonvalid C string (e.g.: inner ++\0++s) or need to perform actions before the answer is used (and treated as a null-terminated string), you should set a +preprocess_answer()+ function. *+answer_len+*:: Expected minimum length of the answer. @@ -164,7 +197,7 @@ Set it to +0+ if there's no minimum length to look after. Expected leading character of the answer (optional), e.g. +#+, +(+ ... *+value+*:: -Value from the answer, filled at runtime (i.e. +answer+ between +from+ and +to+). +Value from the answer, filled at runtime (i.e. +answer+ in the interval [+from+ to +to+]). *+from+*:: Position of the starting character of the info we're after in the answer. @@ -212,6 +245,11 @@ If there's a problem with a var in +QX_WALKMODE_INIT+, the driver will automagic ==== -- +*+preprocess_answer(item, len)+*:: +Function to preprocess the answer we got from the UPS before we do anything else (e.g. for CRC, decoding, ...). +This function is given the currently processed item (+item+) with the answer we got from the UPS unmolested and already stored in +item+'s +answer+ and the length of that answer (+len+). +Return +-1+ in case of errors, else the length of the newly allocated +item+'s +answer+ (from now on, treated as a null-terminated string). + *+preprocess(item, value, valuelen)+*:: Function to preprocess the data from/to the UPS: you are given the currently processed item (+item+), a char array (+value+) and its +size_t+ (+valuelen+). Return +-1+ in case of errors, else +0+. @@ -252,7 +290,7 @@ We know that when the UPS is queried for status with +QGS\r+, it replies with so Here's the +item_t+: ---- -{ "output.voltage", 0, NULL, "QGS\r", "", 76, '(', "", 12, 16, "%.1f", 0, NULL }, +{ "output.voltage", 0, NULL, "QGS\r", "", 76, '(', "", 12, 16, "%.1f", 0, NULL, NULL }, ---- [horizontal] @@ -295,6 +333,9 @@ Because of that we need to provide a floating point specifier. +qxflags+:: +0+ ++preprocess_answer+:: ++NULL+ + +preprocess+:: +NULL+ @@ -314,7 +355,7 @@ Also from +QGS\r+, we want to process the 9th status bit +10000000+*`0`*+001+ th Here's the +item_t+: ---- -{ "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 71, 71, "%s", QX_FLAG_QUICK_POLL, voltronic_status }, +{ "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 71, 71, "%s", QX_FLAG_QUICK_POLL, NULL, voltronic_status }, ---- [horizontal] @@ -357,6 +398,9 @@ Since a +preprocess+ function is defined for this item, this could have been +NU +QX_FLAG_QUICK_POLL+ -> this item will be polled every time the driver will check for updates. Since this item is mandatory to run the driver, if a problem arises in +QX_WALKMODE_INIT+ the driver won't skip it an it'll set +datastale+. ++preprocess_answer+:: ++NULL+ + +preprocess+:: +voltronic_status+ + @@ -378,7 +422,8 @@ So your UPS reports its battery type when queried for +QBT\r+; we are expecting Here's the +item_t+: ---- -{ "battery.type", ST_FLAG_RW, voltronic_e_batt_type, "QBT\r", "", 4, '(', "", 1, 2, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, voltronic_p31b }, +{ "battery.type", ST_FLAG_RW, voltronic_e_batt_type, "QBT\r", "", 4, '(', "", 1, 2, "%s", + QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, NULL, voltronic_p31b }, ---- [horizontal] @@ -424,6 +469,9 @@ Since a +preprocess+ function is defined for this item, this could have been +NU + +QX_FLAG_ENUM+ -> this r/w variable is of the enumerated type and the enumerated values are listed in the +info_rw+ structure (i.e. +voltronic_e_batt_type+) ++preprocess_answer+:: ++NULL+ + +preprocess+:: +voltronic_p31b+ + @@ -441,7 +489,8 @@ We also know that we can change battery type with the +PBTnn\r+ command; we are Here's the +item_t+: ---- -{ "battery.type", 0, voltronic_e_batt_type, "PBT%02.0f\r", "", 5, '(', "", 1, 4, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM, voltronic_p31b_set }, +{ "battery.type", 0, voltronic_e_batt_type, "PBT%02.0f\r", "", 5, '(', "", 1, 4, NULL, + QX_FLAG_SETVAR | QX_FLAG_ENUM, NULL, voltronic_p31b_set }, ---- [horizontal] @@ -485,6 +534,9 @@ Not used for +QX_FLAG_SETVAR+ + +QX_FLAG_ENUM+ -> this r/w variable is of the enumerated type and the enumerated values are listed in the +info_rw+ structure (i.e. +voltronic_e_batt_type+) ++preprocess_answer+:: ++NULL+ + +preprocess+:: +voltronic_p31b_set+ + @@ -506,7 +558,7 @@ We know that we have to send to the UPS +Tnn\r+ or +T.n\r+ in order to start a b Here's the +item_t+: ---- -{ "test.battery.start", 0, NULL, "T%s\r", "", 5, '(', "", 1, 4, NULL, QX_FLAG_CMD, voltronic_process_command }, +{ "test.battery.start", 0, NULL, "T%s\r", "", 5, '(', "", 1, 4, NULL, QX_FLAG_CMD, NULL, voltronic_process_command }, ---- [horizontal] @@ -546,6 +598,9 @@ Not used for +QX_FLAG_CMD+ +qxflags+:: +QX_FLAG_CMD+ -> this item is an instant command that will be fired when +info_type+ (i.e. +test.battery.start+) is called ++preprocess_answer+:: ++NULL+ + +preprocess+:: +voltronic_process_command+ + @@ -558,7 +613,8 @@ Informations absent in the device In order to set the server-side var +ups.delay.start+, that will be then used by the driver, we have to provide the following +item_t+: ---- -{ "ups.delay.start", ST_FLAG_RW, voltronic_r_ondelay, NULL, "", 0, 0, "", 0, 0, "180", QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, voltronic_process_setvar }, +{ "ups.delay.start", ST_FLAG_RW, voltronic_r_ondelay, NULL, "", 0, 0, "", 0, 0, "180", + QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, voltronic_process_setvar }, ---- [horizontal] @@ -605,6 +661,9 @@ Not used for +QX_FLAG_ABSENT+ + +QX_FLAG_RANGE+ -> this r/w variable has a settable range and its boundaries are listed in the +info_rw+ structure (i.e. +voltronic_r_ondelay+) ++preprocess_answer+:: ++NULL+ + +preprocess+:: +voltronic_process_setvar+ + @@ -628,7 +687,8 @@ So we know that the UPS reports actual input/output phase angles when queried fo Here's the +item_t+ for input phase angle: ---- -{ "input_phase_angle", 0, NULL, "QPD\r", "", 9, '(', "", 1, 3, "%03.0f", QX_FLAG_STATIC | QX_FLAG_NONUT, voltronic_phase }, +{ "input_phase_angle", 0, NULL, "QPD\r", "", 9, '(', "", 1, 3, "%03.0f", + QX_FLAG_STATIC | QX_FLAG_NONUT, NULL, voltronic_phase }, ---- [horizontal] @@ -675,6 +735,9 @@ Here instead it's used by the +preprocess+ function. + +QX_FLAG_NONUT+ -> this item doesn't have yet a NUT variable ++preprocess_answer+:: ++NULL+ + +preprocess+:: +voltronic_phase+ + @@ -683,7 +746,8 @@ This function will be called *after* the +command+ has been sent to the UPS so t Here's the +item_t+ for output phase angle: ---- -{ "output_phase_angle", ST_FLAG_RW, voltronic_e_phase, "QPD\r", "", 9, '(', "", 5, 7, "%03.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM | QX_FLAG_NONUT, voltronic_phase }, +{ "output_phase_angle", ST_FLAG_RW, voltronic_e_phase, "QPD\r", "", 9, '(', "", 5, 7, "%03.0f", + QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM | QX_FLAG_NONUT, NULL, voltronic_phase }, ---- [horizontal] @@ -737,6 +801,9 @@ Here instead it's used by the +preprocess+ function. + +QX_FLAG_NONUT+ -> this item doesn't have yet a NUT variable ++preprocess_answer+:: ++NULL+ + +preprocess+:: +voltronic_phase+ + @@ -759,7 +826,8 @@ We know we can set output phase angle sending +PPDnnn\r+ to the UPS: Here's the +item_t+ ---- -{ "output_phase_angle", 0, voltronic_e_phase, "PPD%03.0f\r", "", 5, '(', "", 1, 4, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT, voltronic_phase_set }, +{ "output_phase_angle", 0, voltronic_e_phase, "PPD%03.0f\r", "", 5, '(', "", 1, 4, NULL, + QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT, NULL, voltronic_phase_set }, ---- [horizontal] @@ -809,6 +877,9 @@ Not used for +QX_FLAG_SETVAR+ + +QX_FLAG_NONUT+ -> this item doesn't have yet a NUT variable ++preprocess_answer+:: ++NULL+ + +preprocess+:: +voltronic_phase_set+ + @@ -838,7 +909,7 @@ Send +command+ or, if it is +NULL+, send the command stored in the +item+ to the Return +-1+ on errors, +0+ on success. *+int ups_infoval_set(item_t *item)+*:: -Process the value we got back from the UPS (set status bits and set the value of other parameters), calling its +preprocess+ function, if any. +Process the value we got back from the UPS (set status bits and set the value of other parameters), calling its +preprocess+ function, if any, otherwise executing the standard preprocessing (including trimming if +QX_FLAG_TRIM+ is set). Return +-1+ on failure, +0+ for a status update and +1+ in all other cases. *+int qx_status(void)+*:: @@ -860,6 +931,7 @@ You can then recompile +nutdrv_qx+, and start experimenting with the new subdriv For more informations, have a look at the currently available subdrivers: +- +nutdrv_qx_bestups.+{+c+,+h+} - +nutdrv_qx_mecer.+{+c+,+h+} - +nutdrv_qx_megatec.+{+c+,+h+} - +nutdrv_qx_megatec-old.+{+c+,+h+} @@ -867,5 +939,6 @@ For more informations, have a look at the currently available subdrivers: - +nutdrv_qx_q1.+{+c+,+h+} - +nutdrv_qx_voltronic.+{+c+,+h+} - +nutdrv_qx_voltronic-qs.+{+c+,+h+} +- +nutdrv_qx_voltronic-qs-hex.+{+c+,+h+} - +nutdrv_qx_zinto.+{+c+,+h+} diff --git a/docs/packager-guide.txt b/docs/packager-guide.txt index c6ea86b..2d40b83 100644 --- a/docs/packager-guide.txt +++ b/docs/packager-guide.txt @@ -35,7 +35,7 @@ support and maintenance accross the supported OSes. ------------------------------------------------------------------------ *sandbox* This document assumes that you have read the other NUT document such -as INSTALL.nut, FAQ, shutdown.txt, ... +as INSTALL.nut, FAQ, config-notes.txt, ... Facts about NUT packaging ========================= diff --git a/docs/scheduling.txt b/docs/scheduling.txt index 8bb2b91..922bea3 100644 --- a/docs/scheduling.txt +++ b/docs/scheduling.txt @@ -270,7 +270,7 @@ The design of the timer handler is also geared towards minimizing impact. It will come and go from the process list as necessary. When a new timer is started, a process will be forked to actually watch the clock and eventually start the CMDSCRIPT. When a timer triggers, it is removed from -the queue. Cancelling a timer will also remove it from the queue. When +the queue. Canceling a timer will also remove it from the queue. When no timers are present in the queue, the background process exits. This means that you will only see upssched running when one of two things diff --git a/docs/security.txt b/docs/security.txt index 808b26d..fd6b747 100644 --- a/docs/security.txt +++ b/docs/security.txt @@ -26,16 +26,24 @@ In order to verify the NUT source code signature for releases, perform the follo $ gpg --fetch-keys http://www.networkupstools.org/source/nut-key.gpg +NOTE: As of NUT 2.7.3, a new release key is used. In order to verify previous release, please use +link:http://www.networkupstools.org/source/nut-old-key.gpg[NUT old maintainer's signature] + - Launch the GPG checking using the following command: $ gpg --verify nut-X.Y.Z.tar.gz.sig - You should see a message mentioning a "Good signature", like: - gpg: Signature made Thu Jul 5 16:15:05 2007 CEST using DSA key ID 204DDF1B + gpg: Signature made Wed Apr 15 15:55:30 2015 CEST using RSA key ID 55CA5976 gpg: Good signature from "Arnaud Quette ..." ... +NOTE: the previously used maintainer's signature would output: ++ + gpg: Signature made Thu Jul 5 16:15:05 2007 CEST using DSA key ID 204DDF1B + gpg: Good signature from "Arnaud Quette ..." + ... System level privileges and ownership ------------------------------------- @@ -142,7 +150,7 @@ TCP Wrappers If the server is build with tcp-wrappers support enabled, it will check if the NUT username is allowed to connect from the client address through the -'/etc/hosts.allow' and '/etc/hosts.deny' files. +`/etc/hosts.allow` and `/etc/hosts.deny` files. NOTE: this will only be done for commands that require the user to be logged into the server. @@ -162,7 +170,7 @@ Further details are described in hosts_access(5). Configuring SSL --------------- -SSL is available as a build option ('--with-ssl'). +SSL is available as a build option (`--with-ssl`). It encrypts sessions between upsd and clients, and can also be used to authenticate servers. @@ -174,9 +182,9 @@ Several things must happen before this will work, however. This chapter will present these steps. SSL is available via two back-end libraries : NSS and OpenSSL (historically). -You can choose to use one of them by specifying it with abuild option -('--with-nss' or '--with-openssl'). If any is specified, configure script will -try to detect one of them and use it with a precedence for OpenSSL. +You can choose to use one of them by specifying it with a build option +(`--with-nss` or `--with-openssl`). If neither is specified, the configure +script will try to detect one of them, with a precedence for OpenSSL. OpenSSL backend usage ~~~~~~~~~~~~~~~~~~~~~ @@ -188,12 +196,13 @@ Install OpenSSL ^^^^^^^^^^^^^^^ Install link:http://www.openssl.org[OpenSSL] as usual, either from source -or binary packages including nss-tools. +or binary packages. If using binary packages, be sure to include the developer +libraries. Recompile and install NUT ^^^^^^^^^^^^^^^^^^^^^^^^^ -Recompile NUT from source, starting with 'configure --with-openssl'. +Recompile NUT from source, starting with `configure --with-openssl`. Then install everything as usual. @@ -207,7 +216,7 @@ Use the following command to create the certificate: openssl req -new -x509 -nodes -out upsd.crt -keyout upsd.key -You can also put a '-days nnn' in there to set the expiration. If +You can also put a `-days nnn` in there to set the expiration. If you skip this, it may default to 30 days. This is probably not what you want. @@ -271,7 +280,8 @@ hold of port 3493. Having it be owned by 'root' and readable by group 'nut' allows upsd to read the file without being able to change the contents. This -is done to minimize the impact if someone should break into upsd. +is done to minimize the impact if someone should break into upsd. NUT reads the +key and certificate files after dropping privileges and forking. Note on certification authorities (CAs) and signed keys ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -340,7 +350,7 @@ Again in upsmon.conf: FORCESSL 1 -If you don't use 'CERTVERIFY 1', then this will at least make sure +If you don't use `CERTVERIFY 1`, then this will at least make sure that nobody can sniff your sessions without a large effort. Setting this will make upsmon drop connections if the remote upsd doesn't support SSL, so don't use it unless all of them have it running. @@ -355,12 +365,13 @@ Install NSS ^^^^^^^^^^^ Install link:http://www.mozilla.org/projects/security/pki/nss/[Mozilla NSS] as -usual, either from source or binary packages. +usual, either from source or binary packages. If using binary packages, be sure +to include the developer libraries, and nss-tools (for `certutil`). Recompile and install NUT ^^^^^^^^^^^^^^^^^^^^^^^^^ -Recompile NUT from source, starting with 'configure --with-nss'. +Recompile NUT from source, starting with `configure --with-nss`. Then install everything as usual. @@ -368,7 +379,7 @@ Create certificate and key for the host ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ NSS (package generally called libnss3-tools) will install a tool called -'certutil'. +`certutil`. It will be used to generate certificates and manage certificate database. Certificates should be signed by a certification authorities (CAs). @@ -376,19 +387,19 @@ Following commands are typical samples, contact your SSL guru or security office to follow your company procedures. .Generate a server certificate for upsd: -- Create a directory where store the certificate database: 'mkdir cert_db' -- Create the certificate database : 'certutil -N -d cert_db' +- Create a directory where store the certificate database: `mkdir cert_db` +- Create the certificate database : `certutil -N -d cert_db` - Import the CA certificate: - 'certutil -A -d cert_db -n "My Root CA" -t "TC,," -a -i rootca.crt' + `certutil -A -d cert_db -n "My Root CA" -t "TC,," -a -i rootca.crt` - Create a server certificate request (here called 'My nut server'): - 'certutil -R -d cert_db -s "CN=My nut server,O=MyCompany,ST=MyState,C=US" -a -o server.req' + `certutil -R -d cert_db -s "CN=My nut server,O=MyCompany,ST=MyState,C=US" -a -o server.req` - Make your CA sign the certificate (produces server.crt) - Import the signed certificate into server database: - 'certutil -A -d cert_db -n "My nut server" -a -i server.crt -t ",,"' + `certutil -A -d cert_db -n "My nut server" -a -i server.crt -t ",,"` - Display the content of certificate server: - 'certutil -L -d cert_db' + `certutil -L -d cert_db` -Clients and servers in the same host could share the same certificate to authentify them +Clients and servers in the same host could share the same certificate to authenticate them or use different ones in same or different databases. The same operation can be done in same or different databases to generate other certificates. @@ -397,27 +408,27 @@ Create a self-signed CA certificate ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ NSS provides a way to create self-signed certificate which can acting as -CA certificate and to sign other certificates with this CA certificate. -This method can be used to provide CA certification chain without passing -by an 'official' CA provider. +CA certificate, and to sign other certificates with this CA certificate. +This method can be used to provide a CA certification chain without using +an "official" certificate authority. .Generate a self-signed CA certificate: -- Create a directory where store the CA certificate database: 'mkdir CA_db' +- Create a directory where store the CA certificate database: `mkdir CA_db` - Create the certificate database: - 'certutil -N -d CA_db' + `certutil -N -d CA_db` - Generate a certificate for CA: - 'certutil -S -d CA_db -n "My Root CA" -s "CN=My CA,O=MyCompany,ST=MyState,C=US" -t "CT,," -x -2' -Do not forget to answer 'Yes' to the question 'Is this a CA certificate [y/N]?' + `certutil -S -d CA_db -n "My Root CA" -s "CN=My CA,O=MyCompany,ST=MyState,C=US" -t "CT,," -x -2` +(Do not forget to answer 'Yes' to the question 'Is this a CA certificate [y/N]?') - Extract the CA certificate to be able to import it in upsd (or upsmon) certificate database: - 'certutil -L -d CA_db -n "My Root CA" -a -o rootca.crt' + `certutil -L -d CA_db -n "My Root CA" -a -o rootca.crt` - Sign a certificate request with the CA certificate (simulate a real CA signature): - 'certutil -C -d CA_db -c "My Root CA" -a -i server.req -o server.crt -2 -6' + `certutil -C -d CA_db -c "My Root CA" -a -i server.req -o server.crt -2 -6` Install the server-side certificate ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Just copy the database directory (just the directory and included 3 -database .db files) at the right place like in '/usr/local/ups/etc/': +database .db files) to the right place, such as `/usr/local/ups/etc/`: mv cert_db /usr/local/ups/etc/ @@ -441,12 +452,12 @@ upsd (optional): client authentication ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ NOTE: This functionality is disabled by default. To activate it, recompile -NUT with 'WITH_CLIENT_CERTIFICATE_VALIDATION' defined: +NUT with `WITH_CLIENT_CERTIFICATE_VALIDATION` defined: make CFLAGS="-DWITH_CLIENT_CERTIFICATE_VALIDATION" UPSD can accept three levels of client authentication. Just specify it with -the directive 'CERTREQUEST' with the corresponding value in the upsd.conf file: +the directive `CERTREQUEST` with the corresponding value in the upsd.conf file: - NO: no client authentication. - REQUEST: a certificate is request to the client but it is not strictly validated. @@ -465,36 +476,37 @@ In order for upsmon to securely connect to upsd, it must authenticate it. You must associate an upsd host name to security rules in upsmon.conf with the directive 'CERTHOST'. -'CERTHOST' associate to an hostname a certificate name and if a SSL connection -is mandatory and if its certificate must be validated. +'CERTHOST' associates a hostname to a certificate name. It also determines +whether a SSL connection is mandatory, and if the server certificate must be +validated. CERTHOST 'hostname' 'certificate name' 'certverify' 'forcessl' -If the flag 'forcessl' is set to '1' and the upsd answer that it can not -connect in SSL, the connection closes. -If the flag 'certverify' is set to '1' and the connection is done in ssl, +If the flag `forcessl` is set to `1`, and upsd answers that it can not +connect with SSL, the connection closes. +If the flag `certverify` is set to `1` and the connection is done in SSL, upsd's certificate is verified and its name must be the specified 'certificate name'. -To prevent security leaks, you should set all 'certverify' and 'forcessl' -flags to '1' (force SSL connection and validate all certificates for all +To prevent security leaks, you should set all `certverify` and `forcessl` +flags to `1` (force SSL connection and validate all certificates for all peers). -You can specify 'CERTVERIFY' and 'FORCESSL' directive (to '1' or '0') to +You can specify `CERTVERIFY` and `FORCESSL` directive (to `1` or `0`) to define a default security rule to apply to all host not specified with a -dedicated 'CERTHOST' directive. +dedicated `CERTHOST` directive. -If a host is not specified in a 'CERTHOST' directive, its expected certificate +If a host is not specified in a `CERTHOST` directive, its expected certificate name is its hostname. upsmon (optional): certificate database and self certificate ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Like upsd, upsmon may need to authenticate itself (upsd's 'CERTREQUEST' -directive set to 'REQUEST' or 'REQUIRE'). +Like upsd, upsmon may need to authenticate itself (upsd's `CERTREQUEST` +directive set to `REQUEST` or `REQUIRE`). It must access to a certificate (and its private key) in a certificate database -configuring 'CERTPATH' and 'CERTIDENT' in upsmon.conf in the same way than upsd. +configuring `CERTPATH` and `CERTIDENT` in upsmon.conf in the same way than upsd. CERTPATH /usr/local/ups/etc/cert_db CERTIDENT 'certificate name' 'database password' @@ -506,8 +518,9 @@ Restart upsd It should come back up without any complaints. If it says something about keys or certificates, then you probably missed a step. -If you run upsd as a separate user id (like nutsrv), make sure that -user can read files in certificate directory. +If you run upsd as a separate user ID (like nutsrv), make sure that +user can read files in the certificate directory. NUT reads the keys and +certificates after forking and dropping privileges. Restart upsmon ~~~~~~~~~~~~~~ @@ -516,7 +529,7 @@ You should see something like this in the syslog from upsd: foo upsd[1234]: Client mon@localhost logged in to UPS [myups] (SSL) -If upsd or upsmon give any error messages, or the (SSL) is missing, +If upsd or upsmon give any error messages, or the `(SSL)` is missing, then something isn't right. If in doubt about upsmon, start it with -D so it will stay in @@ -525,14 +538,14 @@ like this every couple of seconds: polling ups: myups@localhost [SSL] -Obviously, if the '[SSL]' isn't there, something's broken. +Obviously, if the `[SSL]` isn't there, something's broken. Recommended: sniff the connection to see it for yourself ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Using tcpdump, Wireshark (Ethereal), or another network sniffer tool, tell it to monitor port 3493/tcp and see what happens. You should only -see 'STARTTLS' go out, 'OK STARTTLS' come back, and the rest will be +see `STARTTLS` go out, `OK STARTTLS` come back, and the rest will be certificate data and then seemingly random characters. If you see any plaintext besides that (USERNAME, PASSWORD, etc.) @@ -561,7 +574,7 @@ pair using the procedure above. Conclusion ~~~~~~~~~~ -SSL support should be considered stable but purposely underdocumented +SSL support should be considered stable but purposely under-documented since various bits of the implementation or configuration may change in the future. In other words, if you use this and it stops working after an upgrade, come back to this file to find out what changed. @@ -583,7 +596,7 @@ license change. This is actually a feature, since it means nobody can unilaterally run off with the source - not even the NUT team. Note that the replacement of OpenSSL by Mozilla Network Security Services -(NSS) is scheduled in the future, to avoid the above licensing issues. +(NSS) should avoid the above licensing issues. chrooting and other forms of paranoia diff --git a/docs/xhtml.xsl b/docs/xhtml.xsl index b84425d..e8dc331 100644 --- a/docs/xhtml.xsl +++ b/docs/xhtml.xsl @@ -11,9 +11,4 @@ - - - - - diff --git a/drivers/Makefile.am b/drivers/Makefile.am index be71e91..bf36319 100644 --- a/drivers/Makefile.am +++ b/drivers/Makefile.am @@ -44,6 +44,7 @@ USB_LIBUSB_DRIVERLIST = usbhid-ups bcmxcp_usb tripplite_usb \ USB_DRIVERLIST = $(USB_LIBUSB_DRIVERLIST) NEONXML_DRIVERLIST = netxml-ups MACOSX_DRIVERLIST = macosx-ups +LINUX_I2C_DRIVERLIST = asem # distribute all drivers, even ones that are not built by default EXTRA_PROGRAMS = $(SERIAL_DRIVERLIST) $(SNMP_DRIVERLIST) $(USB_DRIVERLIST) $(NEONXML_DRIVERLIST) $(MACOSX_DRIVERLIST) @@ -74,6 +75,9 @@ endif if WITH_MACOSX driverexec_PROGRAMS += $(MACOSX_DRIVERLIST) endif +if WITH_LINUX_I2C + driverexec_PROGRAMS += $(LINUX_I2C_DRIVERLIST) +endif else driverexec_PROGRAMS += skel endif @@ -171,7 +175,7 @@ tripplite_usb_SOURCES = tripplite_usb.c libusb.c usb-common.c tripplite_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm bcmxcp_usb_SOURCES = bcmxcp_usb.c bcmxcp.c usb-common.c -bcmxcp_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) +bcmxcp_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm blazer_usb_SOURCES = blazer.c blazer_usb.c libusb.c usb-common.c blazer_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm @@ -219,6 +223,10 @@ macosx_ups_LDADD = $(LDADD_DRIVERS) macosx_ups_LDFLAGS = $(LDFLAGS) -framework IOKit -framework CoreFoundation macosx_ups_SOURCES = macosx-ups.c +# Asem +asem_LDADD = $(LDADD_DRIVERS) +asem_SOURCES = asem.c + # nutdrv_qx USB/Serial nutdrv_qx_SOURCES = nutdrv_qx.c nutdrv_qx_LDADD = $(LDADD_DRIVERS) -lm @@ -232,9 +240,10 @@ nutdrv_qx_CFLAGS += -DQX_USB nutdrv_qx_SOURCES += libusb.c usb-common.c nutdrv_qx_LDADD += $(LIBUSB_LIBS) endif -NUTDRV_QX_SUBDRIVERS = nutdrv_qx_blazer-common.c nutdrv_qx_mecer.c \ - nutdrv_qx_megatec.c nutdrv_qx_megatec-old.c nutdrv_qx_mustek.c \ - nutdrv_qx_q1.c nutdrv_qx_voltronic.c nutdrv_qx_voltronic-qs.c nutdrv_qx_zinto.c +NUTDRV_QX_SUBDRIVERS = nutdrv_qx_bestups.c nutdrv_qx_blazer-common.c \ + nutdrv_qx_mecer.c nutdrv_qx_megatec.c nutdrv_qx_megatec-old.c \ + nutdrv_qx_mustek.c nutdrv_qx_q1.c nutdrv_qx_voltronic.c \ + nutdrv_qx_voltronic-qs.c nutdrv_qx_voltronic-qs-hex.c nutdrv_qx_zinto.c nutdrv_qx_SOURCES += $(NUTDRV_QX_SUBDRIVERS) # ---------------------------------------------------------------------- @@ -252,9 +261,9 @@ dist_noinst_HEADERS = apc-mib.h apc-hid.h baytech-mib.h bcmxcp.h \ safenet.h serial.h snmp-ups.h solis.h tripplite.h tripplite-hid.h \ upshandler.h usb-common.h usbhid-ups.h powercom-hid.h compaq-mib.h idowell-hid.h \ apcsmart.h apcsmart_tabs.h apcsmart-old.h apcupsd-ups.h cyberpower-mib.h riello.h openups-hid.h \ - delta_ups-mib.h nutdrv_qx.h nutdrv_qx_blazer-common.h nutdrv_qx_mecer.h \ + delta_ups-mib.h nutdrv_qx.h nutdrv_qx_bestups.h nutdrv_qx_blazer-common.h nutdrv_qx_mecer.h \ nutdrv_qx_megatec.h nutdrv_qx_megatec-old.h nutdrv_qx_mustek.h nutdrv_qx_q1.h \ - nutdrv_qx_voltronic.h nutdrv_qx_voltronic-qs.h nutdrv_qx_zinto.h \ + nutdrv_qx_voltronic.h nutdrv_qx_voltronic-qs.h nutdrv_qx_voltronic-qs-hex.h nutdrv_qx_zinto.h \ xppc-mib.h # Define a dummy library so that Automake builds rules for the diff --git a/drivers/Makefile.in b/drivers/Makefile.in index 11a9f93..6824bc3 100644 --- a/drivers/Makefile.in +++ b/drivers/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -19,23 +18,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -65,12 +92,14 @@ EXTRA_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_4) \ @SOME_DRIVERS_FALSE@driverexec_PROGRAMS = $(am__EXEEXT_7) \ @SOME_DRIVERS_FALSE@ $(am__EXEEXT_8) $(am__EXEEXT_9) \ @SOME_DRIVERS_FALSE@ $(am__EXEEXT_10) $(am__EXEEXT_11) \ -@SOME_DRIVERS_FALSE@ $(am__EXEEXT_12) $(am__EXEEXT_13) +@SOME_DRIVERS_FALSE@ $(am__EXEEXT_12) $(am__EXEEXT_13) \ +@SOME_DRIVERS_FALSE@ $(am__EXEEXT_15) @SOME_DRIVERS_TRUE@driverexec_PROGRAMS = $(DRIVER_BUILD_LIST) \ @SOME_DRIVERS_TRUE@ $(am__EXEEXT_7) $(am__EXEEXT_8) \ @SOME_DRIVERS_TRUE@ $(am__EXEEXT_9) $(am__EXEEXT_10) \ @SOME_DRIVERS_TRUE@ $(am__EXEEXT_11) $(am__EXEEXT_12) \ -@SOME_DRIVERS_TRUE@ $(am__EXEEXT_13) skel$(EXEEXT) +@SOME_DRIVERS_TRUE@ $(am__EXEEXT_13) $(am__EXEEXT_15) \ +@SOME_DRIVERS_TRUE@ skel$(EXEEXT) @SOME_DRIVERS_FALSE@@WITH_SERIAL_TRUE@am__append_6 = $(SERIAL_DRIVERLIST) @SOME_DRIVERS_FALSE@@WITH_SNMP_TRUE@am__append_7 = $(SNMP_DRIVERLIST) @SOME_DRIVERS_FALSE@@WITH_USB_TRUE@am__append_8 = $(USB_LIBUSB_DRIVERLIST) @@ -78,18 +107,19 @@ EXTRA_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_4) \ @SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__append_10 = powerman-pdu @SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@am__append_11 = nut-ipmipsu @SOME_DRIVERS_FALSE@@WITH_MACOSX_TRUE@am__append_12 = $(MACOSX_DRIVERLIST) +@SOME_DRIVERS_FALSE@@WITH_LINUX_I2C_TRUE@am__append_13 = $(LINUX_I2C_DRIVERLIST) sbin_PROGRAMS = upsdrvctl$(EXEEXT) -@WITH_SSL_TRUE@am__append_13 = $(LIBSSL_CFLAGS) -@WITH_SSL_TRUE@am__append_14 = $(LIBSSL_LIBS) -@WITH_FREEIPMI_TRUE@am__append_15 = nut-libfreeipmi.c -@WITH_SERIAL_TRUE@am__append_16 = -DQX_SERIAL -@WITH_SERIAL_TRUE@am__append_17 = $(SERLIBS) serial.o -@WITH_USB_TRUE@am__append_18 = -DQX_USB -@WITH_USB_TRUE@am__append_19 = libusb.c usb-common.c -@WITH_USB_TRUE@am__append_20 = $(LIBUSB_LIBS) +@WITH_SSL_TRUE@am__append_14 = $(LIBSSL_CFLAGS) +@WITH_SSL_TRUE@am__append_15 = $(LIBSSL_LIBS) +@WITH_FREEIPMI_TRUE@am__append_16 = nut-libfreeipmi.c +@WITH_SERIAL_TRUE@am__append_17 = -DQX_SERIAL +@WITH_SERIAL_TRUE@am__append_18 = $(SERLIBS) serial.o +@WITH_USB_TRUE@am__append_19 = -DQX_USB +@WITH_USB_TRUE@am__append_20 = libusb.c usb-common.c +@WITH_USB_TRUE@am__append_21 = $(LIBUSB_LIBS) subdir = drivers -DIST_COMMON = $(dist_noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp $(dist_noinst_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -119,6 +149,10 @@ CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libdummy_a_AR = $(AR) $(ARFLAGS) libdummy_a_LIBADD = am_libdummy_a_OBJECTS = main.$(OBJEXT) dstate.$(OBJEXT) \ @@ -155,6 +189,9 @@ am__EXEEXT_6 = macosx-ups$(EXEEXT) @SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@am__EXEEXT_12 = \ @SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@ nut-ipmipsu$(EXEEXT) @SOME_DRIVERS_FALSE@@WITH_MACOSX_TRUE@am__EXEEXT_13 = $(am__EXEEXT_6) +am__EXEEXT_14 = asem$(EXEEXT) +@SOME_DRIVERS_FALSE@@WITH_LINUX_I2C_TRUE@am__EXEEXT_15 = \ +@SOME_DRIVERS_FALSE@@WITH_LINUX_I2C_TRUE@ $(am__EXEEXT_14) am__installdirs = "$(DESTDIR)$(driverexecdir)" "$(DESTDIR)$(sbindir)" PROGRAMS = $(driverexec_PROGRAMS) $(sbin_PROGRAMS) am_al175_OBJECTS = al175.$(OBJEXT) @@ -163,6 +200,10 @@ al175_LDADD = $(LDADD) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(LDADD_DRIVERS) $(am__DEPENDENCIES_1) serial.o al175_DEPENDENCIES = $(am__DEPENDENCIES_2) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = am_apcsmart_OBJECTS = apcsmart.$(OBJEXT) apcsmart_tabs.$(OBJEXT) apcsmart_OBJECTS = $(am_apcsmart_OBJECTS) apcsmart_LDADD = $(LDADD) @@ -174,9 +215,12 @@ apcsmart_old_DEPENDENCIES = $(am__DEPENDENCIES_2) am_apcupsd_ups_OBJECTS = apcupsd_ups-apcupsd-ups.$(OBJEXT) apcupsd_ups_OBJECTS = $(am_apcupsd_ups_OBJECTS) apcupsd_ups_DEPENDENCIES = $(LDADD_DRIVERS) -apcupsd_ups_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ +apcupsd_ups_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(apcupsd_ups_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_asem_OBJECTS = asem.$(OBJEXT) +asem_OBJECTS = $(am_asem_OBJECTS) +asem_DEPENDENCIES = $(LDADD_DRIVERS) am_bcmxcp_OBJECTS = bcmxcp.$(OBJEXT) bcmxcp_ser.$(OBJEXT) bcmxcp_OBJECTS = $(am_bcmxcp_OBJECTS) am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) @@ -229,7 +273,7 @@ dummy_ups_OBJECTS = $(am_dummy_ups_OBJECTS) @WITH_SSL_TRUE@am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1) dummy_ups_DEPENDENCIES = $(LDADD_DRIVERS) ../clients/libupsclient.la \ $(am__DEPENDENCIES_4) -dummy_ups_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ +dummy_ups_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(dummy_ups_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_etapro_OBJECTS = etapro.$(OBJEXT) @@ -266,7 +310,7 @@ liebert_esp2_DEPENDENCIES = $(am__DEPENDENCIES_2) am_macosx_ups_OBJECTS = macosx-ups.$(OBJEXT) macosx_ups_OBJECTS = $(am_macosx_ups_OBJECTS) macosx_ups_DEPENDENCIES = $(LDADD_DRIVERS) -macosx_ups_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ +macosx_ups_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(macosx_ups_LDFLAGS) $(LDFLAGS) -o $@ am_masterguard_OBJECTS = masterguard.$(OBJEXT) @@ -282,9 +326,9 @@ am_mge_shut_OBJECTS = mge_shut-usbhid-ups.$(OBJEXT) \ mge_shut-hidparser.$(OBJEXT) mge_shut-mge-hid.$(OBJEXT) mge_shut_OBJECTS = $(am_mge_shut_OBJECTS) mge_shut_DEPENDENCIES = $(am__DEPENDENCIES_3) -mge_shut_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(mge_shut_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +mge_shut_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(mge_shut_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_mge_utalk_OBJECTS = mge-utalk.$(OBJEXT) mge_utalk_OBJECTS = $(am_mge_utalk_OBJECTS) mge_utalk_LDADD = $(LDADD) @@ -306,13 +350,15 @@ am_nutdrv_atcl_usb_OBJECTS = nutdrv_atcl_usb.$(OBJEXT) \ nutdrv_atcl_usb_OBJECTS = $(am_nutdrv_atcl_usb_OBJECTS) nutdrv_atcl_usb_DEPENDENCIES = $(LDADD_DRIVERS) $(am__DEPENDENCIES_1) am__nutdrv_qx_SOURCES_DIST = nutdrv_qx.c libusb.c usb-common.c \ - nutdrv_qx_blazer-common.c nutdrv_qx_mecer.c \ - nutdrv_qx_megatec.c nutdrv_qx_megatec-old.c nutdrv_qx_mustek.c \ - nutdrv_qx_q1.c nutdrv_qx_voltronic.c nutdrv_qx_voltronic-qs.c \ + nutdrv_qx_bestups.c nutdrv_qx_blazer-common.c \ + nutdrv_qx_mecer.c nutdrv_qx_megatec.c nutdrv_qx_megatec-old.c \ + nutdrv_qx_mustek.c nutdrv_qx_q1.c nutdrv_qx_voltronic.c \ + nutdrv_qx_voltronic-qs.c nutdrv_qx_voltronic-qs-hex.c \ nutdrv_qx_zinto.c @WITH_USB_TRUE@am__objects_2 = nutdrv_qx-libusb.$(OBJEXT) \ @WITH_USB_TRUE@ nutdrv_qx-usb-common.$(OBJEXT) -am__objects_3 = nutdrv_qx-nutdrv_qx_blazer-common.$(OBJEXT) \ +am__objects_3 = nutdrv_qx-nutdrv_qx_bestups.$(OBJEXT) \ + nutdrv_qx-nutdrv_qx_blazer-common.$(OBJEXT) \ nutdrv_qx-nutdrv_qx_mecer.$(OBJEXT) \ nutdrv_qx-nutdrv_qx_megatec.$(OBJEXT) \ nutdrv_qx-nutdrv_qx_megatec-old.$(OBJEXT) \ @@ -320,6 +366,7 @@ am__objects_3 = nutdrv_qx-nutdrv_qx_blazer-common.$(OBJEXT) \ nutdrv_qx-nutdrv_qx_q1.$(OBJEXT) \ nutdrv_qx-nutdrv_qx_voltronic.$(OBJEXT) \ nutdrv_qx-nutdrv_qx_voltronic-qs.$(OBJEXT) \ + nutdrv_qx-nutdrv_qx_voltronic-qs-hex.$(OBJEXT) \ nutdrv_qx-nutdrv_qx_zinto.$(OBJEXT) am_nutdrv_qx_OBJECTS = nutdrv_qx-nutdrv_qx.$(OBJEXT) $(am__objects_2) \ $(am__objects_3) @@ -328,7 +375,7 @@ nutdrv_qx_OBJECTS = $(am_nutdrv_qx_OBJECTS) @WITH_USB_TRUE@am__DEPENDENCIES_6 = $(am__DEPENDENCIES_1) nutdrv_qx_DEPENDENCIES = $(LDADD_DRIVERS) $(am__DEPENDENCIES_5) \ $(am__DEPENDENCIES_6) -nutdrv_qx_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ +nutdrv_qx_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(nutdrv_qx_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_oldmge_shut_OBJECTS = mge-shut.$(OBJEXT) hidparser.$(OBJEXT) @@ -417,21 +464,42 @@ am_victronups_OBJECTS = victronups.$(OBJEXT) victronups_OBJECTS = $(am_victronups_OBJECTS) victronups_LDADD = $(LDADD) victronups_DEPENDENCIES = $(am__DEPENDENCIES_2) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libdummy_a_SOURCES) $(al175_SOURCES) $(apcsmart_SOURCES) \ - $(apcsmart_old_SOURCES) $(apcupsd_ups_SOURCES) \ + $(apcsmart_old_SOURCES) $(apcupsd_ups_SOURCES) $(asem_SOURCES) \ $(bcmxcp_SOURCES) $(bcmxcp_usb_SOURCES) $(belkin_SOURCES) \ $(belkinunv_SOURCES) $(bestfcom_SOURCES) bestfortress.c \ $(bestuferrups_SOURCES) $(bestups_SOURCES) \ @@ -455,26 +523,26 @@ SOURCES = $(libdummy_a_SOURCES) $(al175_SOURCES) $(apcsmart_SOURCES) \ $(victronups_SOURCES) DIST_SOURCES = $(libdummy_a_SOURCES) $(al175_SOURCES) \ $(apcsmart_SOURCES) $(apcsmart_old_SOURCES) \ - $(apcupsd_ups_SOURCES) $(bcmxcp_SOURCES) $(bcmxcp_usb_SOURCES) \ - $(belkin_SOURCES) $(belkinunv_SOURCES) $(bestfcom_SOURCES) \ - bestfortress.c $(bestuferrups_SOURCES) $(bestups_SOURCES) \ - $(blazer_ser_SOURCES) $(blazer_usb_SOURCES) $(clone_SOURCES) \ - $(clone_outlet_SOURCES) $(dummy_ups_SOURCES) $(etapro_SOURCES) \ - $(everups_SOURCES) $(gamatronic_SOURCES) $(genericups_SOURCES) \ - $(isbmex_SOURCES) $(ivtscd_SOURCES) $(liebert_SOURCES) \ - $(liebert_esp2_SOURCES) $(macosx_ups_SOURCES) \ - $(masterguard_SOURCES) $(metasys_SOURCES) $(mge_shut_SOURCES) \ - $(mge_utalk_SOURCES) $(microdowell_SOURCES) \ - $(netxml_ups_SOURCES) $(am__nut_ipmipsu_SOURCES_DIST) \ - $(nutdrv_atcl_usb_SOURCES) $(am__nutdrv_qx_SOURCES_DIST) \ - $(oldmge_shut_SOURCES) $(oneac_SOURCES) $(optiups_SOURCES) \ - $(powercom_SOURCES) $(powerman_pdu_SOURCES) \ - $(powerpanel_SOURCES) $(rhino_SOURCES) $(richcomm_usb_SOURCES) \ - $(riello_ser_SOURCES) $(riello_usb_SOURCES) $(safenet_SOURCES) \ - $(skel_SOURCES) $(snmp_ups_SOURCES) $(solis_SOURCES) \ - $(tripplite_SOURCES) $(tripplite_usb_SOURCES) \ - $(tripplitesu_SOURCES) $(upscode2_SOURCES) \ - $(upsdrvctl_SOURCES) $(usbhid_ups_SOURCES) \ + $(apcupsd_ups_SOURCES) $(asem_SOURCES) $(bcmxcp_SOURCES) \ + $(bcmxcp_usb_SOURCES) $(belkin_SOURCES) $(belkinunv_SOURCES) \ + $(bestfcom_SOURCES) bestfortress.c $(bestuferrups_SOURCES) \ + $(bestups_SOURCES) $(blazer_ser_SOURCES) $(blazer_usb_SOURCES) \ + $(clone_SOURCES) $(clone_outlet_SOURCES) $(dummy_ups_SOURCES) \ + $(etapro_SOURCES) $(everups_SOURCES) $(gamatronic_SOURCES) \ + $(genericups_SOURCES) $(isbmex_SOURCES) $(ivtscd_SOURCES) \ + $(liebert_SOURCES) $(liebert_esp2_SOURCES) \ + $(macosx_ups_SOURCES) $(masterguard_SOURCES) \ + $(metasys_SOURCES) $(mge_shut_SOURCES) $(mge_utalk_SOURCES) \ + $(microdowell_SOURCES) $(netxml_ups_SOURCES) \ + $(am__nut_ipmipsu_SOURCES_DIST) $(nutdrv_atcl_usb_SOURCES) \ + $(am__nutdrv_qx_SOURCES_DIST) $(oldmge_shut_SOURCES) \ + $(oneac_SOURCES) $(optiups_SOURCES) $(powercom_SOURCES) \ + $(powerman_pdu_SOURCES) $(powerpanel_SOURCES) $(rhino_SOURCES) \ + $(richcomm_usb_SOURCES) $(riello_ser_SOURCES) \ + $(riello_usb_SOURCES) $(safenet_SOURCES) $(skel_SOURCES) \ + $(snmp_ups_SOURCES) $(solis_SOURCES) $(tripplite_SOURCES) \ + $(tripplite_usb_SOURCES) $(tripplitesu_SOURCES) \ + $(upscode2_SOURCES) $(upsdrvctl_SOURCES) $(usbhid_ups_SOURCES) \ $(victronups_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ @@ -482,12 +550,30 @@ am__can_run_installinfo = \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(dist_noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -594,12 +680,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -644,6 +733,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -697,6 +787,7 @@ USB_LIBUSB_DRIVERLIST = usbhid-ups bcmxcp_usb tripplite_usb \ USB_DRIVERLIST = $(USB_LIBUSB_DRIVERLIST) NEONXML_DRIVERLIST = netxml-ups MACOSX_DRIVERLIST = macosx-ups +LINUX_I2C_DRIVERLIST = asem # ========================================================================== # Driver build details @@ -756,9 +847,9 @@ riello_ser_LDADD = $(LDADD) -lm # dummy dummy_ups_SOURCES = dummy-ups.c dummy_ups_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/clients \ - $(am__append_13) -dummy_ups_LDADD = $(LDADD_DRIVERS) ../clients/libupsclient.la \ $(am__append_14) +dummy_ups_LDADD = $(LDADD_DRIVERS) ../clients/libupsclient.la \ + $(am__append_15) # Clone drivers clone_SOURCES = clone.c @@ -785,7 +876,7 @@ usbhid_ups_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) tripplite_usb_SOURCES = tripplite_usb.c libusb.c usb-common.c tripplite_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm bcmxcp_usb_SOURCES = bcmxcp_usb.c bcmxcp.c usb-common.c -bcmxcp_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) +bcmxcp_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm blazer_usb_SOURCES = blazer.c blazer_usb.c libusb.c usb-common.c blazer_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm nutdrv_atcl_usb_SOURCES = nutdrv_atcl_usb.c usb-common.c @@ -818,7 +909,7 @@ powerman_pdu_SOURCES = powerman-pdu.c powerman_pdu_LDADD = $(LDADD) $(LIBPOWERMAN_LIBS) # IPMI PSU -nut_ipmipsu_SOURCES = nut-ipmipsu.c $(am__append_15) +nut_ipmipsu_SOURCES = nut-ipmipsu.c $(am__append_16) nut_ipmipsu_LDADD = $(LDADD) $(LIBIPMI_LIBS) # Mac OS X metadriver @@ -826,15 +917,20 @@ macosx_ups_LDADD = $(LDADD_DRIVERS) macosx_ups_LDFLAGS = $(LDFLAGS) -framework IOKit -framework CoreFoundation macosx_ups_SOURCES = macosx-ups.c +# Asem +asem_LDADD = $(LDADD_DRIVERS) +asem_SOURCES = asem.c + # nutdrv_qx USB/Serial -nutdrv_qx_SOURCES = nutdrv_qx.c $(am__append_19) \ +nutdrv_qx_SOURCES = nutdrv_qx.c $(am__append_20) \ $(NUTDRV_QX_SUBDRIVERS) -nutdrv_qx_LDADD = $(LDADD_DRIVERS) -lm $(am__append_17) \ - $(am__append_20) -nutdrv_qx_CFLAGS = $(AM_CFLAGS) $(am__append_16) $(am__append_18) -NUTDRV_QX_SUBDRIVERS = nutdrv_qx_blazer-common.c nutdrv_qx_mecer.c \ - nutdrv_qx_megatec.c nutdrv_qx_megatec-old.c nutdrv_qx_mustek.c \ - nutdrv_qx_q1.c nutdrv_qx_voltronic.c nutdrv_qx_voltronic-qs.c nutdrv_qx_zinto.c +nutdrv_qx_LDADD = $(LDADD_DRIVERS) -lm $(am__append_18) \ + $(am__append_21) +nutdrv_qx_CFLAGS = $(AM_CFLAGS) $(am__append_17) $(am__append_19) +NUTDRV_QX_SUBDRIVERS = nutdrv_qx_bestups.c nutdrv_qx_blazer-common.c \ + nutdrv_qx_mecer.c nutdrv_qx_megatec.c nutdrv_qx_megatec-old.c \ + nutdrv_qx_mustek.c nutdrv_qx_q1.c nutdrv_qx_voltronic.c \ + nutdrv_qx_voltronic-qs.c nutdrv_qx_voltronic-qs-hex.c nutdrv_qx_zinto.c # ---------------------------------------------------------------------- @@ -851,9 +947,9 @@ dist_noinst_HEADERS = apc-mib.h apc-hid.h baytech-mib.h bcmxcp.h \ safenet.h serial.h snmp-ups.h solis.h tripplite.h tripplite-hid.h \ upshandler.h usb-common.h usbhid-ups.h powercom-hid.h compaq-mib.h idowell-hid.h \ apcsmart.h apcsmart_tabs.h apcsmart-old.h apcupsd-ups.h cyberpower-mib.h riello.h openups-hid.h \ - delta_ups-mib.h nutdrv_qx.h nutdrv_qx_blazer-common.h nutdrv_qx_mecer.h \ + delta_ups-mib.h nutdrv_qx.h nutdrv_qx_bestups.h nutdrv_qx_blazer-common.h nutdrv_qx_mecer.h \ nutdrv_qx_megatec.h nutdrv_qx_megatec-old.h nutdrv_qx_mustek.h nutdrv_qx_q1.h \ - nutdrv_qx_voltronic.h nutdrv_qx_voltronic-qs.h nutdrv_qx_zinto.h \ + nutdrv_qx_voltronic.h nutdrv_qx_voltronic-qs.h nutdrv_qx_voltronic-qs-hex.h nutdrv_qx_zinto.h \ xppc-mib.h @@ -895,10 +991,11 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): + libdummy.a: $(libdummy_a_OBJECTS) $(libdummy_a_DEPENDENCIES) $(EXTRA_libdummy_a_DEPENDENCIES) - -rm -f libdummy.a - $(libdummy_a_AR) libdummy.a $(libdummy_a_OBJECTS) $(libdummy_a_LIBADD) - $(RANLIB) libdummy.a + $(AM_V_at)-rm -f libdummy.a + $(AM_V_AR)$(libdummy_a_AR) libdummy.a $(libdummy_a_OBJECTS) $(libdummy_a_LIBADD) + $(AM_V_at)$(RANLIB) libdummy.a install-driverexecPROGRAMS: $(driverexec_PROGRAMS) @$(NORMAL_INSTALL) @list='$(driverexec_PROGRAMS)'; test -n "$(driverexecdir)" || list=; \ @@ -908,10 +1005,12 @@ install-driverexecPROGRAMS: $(driverexec_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -932,7 +1031,8 @@ uninstall-driverexecPROGRAMS: @list='$(driverexec_PROGRAMS)'; test -n "$(driverexecdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(driverexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(driverexecdir)" && rm -f $$files @@ -954,10 +1054,12 @@ install-sbinPROGRAMS: $(sbin_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -978,7 +1080,8 @@ uninstall-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files @@ -991,174 +1094,234 @@ clean-sbinPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + al175$(EXEEXT): $(al175_OBJECTS) $(al175_DEPENDENCIES) $(EXTRA_al175_DEPENDENCIES) @rm -f al175$(EXEEXT) - $(LINK) $(al175_OBJECTS) $(al175_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(al175_OBJECTS) $(al175_LDADD) $(LIBS) + apcsmart$(EXEEXT): $(apcsmart_OBJECTS) $(apcsmart_DEPENDENCIES) $(EXTRA_apcsmart_DEPENDENCIES) @rm -f apcsmart$(EXEEXT) - $(LINK) $(apcsmart_OBJECTS) $(apcsmart_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(apcsmart_OBJECTS) $(apcsmart_LDADD) $(LIBS) + apcsmart-old$(EXEEXT): $(apcsmart_old_OBJECTS) $(apcsmart_old_DEPENDENCIES) $(EXTRA_apcsmart_old_DEPENDENCIES) @rm -f apcsmart-old$(EXEEXT) - $(LINK) $(apcsmart_old_OBJECTS) $(apcsmart_old_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(apcsmart_old_OBJECTS) $(apcsmart_old_LDADD) $(LIBS) + apcupsd-ups$(EXEEXT): $(apcupsd_ups_OBJECTS) $(apcupsd_ups_DEPENDENCIES) $(EXTRA_apcupsd_ups_DEPENDENCIES) @rm -f apcupsd-ups$(EXEEXT) - $(apcupsd_ups_LINK) $(apcupsd_ups_OBJECTS) $(apcupsd_ups_LDADD) $(LIBS) + $(AM_V_CCLD)$(apcupsd_ups_LINK) $(apcupsd_ups_OBJECTS) $(apcupsd_ups_LDADD) $(LIBS) + +asem$(EXEEXT): $(asem_OBJECTS) $(asem_DEPENDENCIES) $(EXTRA_asem_DEPENDENCIES) + @rm -f asem$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(asem_OBJECTS) $(asem_LDADD) $(LIBS) + bcmxcp$(EXEEXT): $(bcmxcp_OBJECTS) $(bcmxcp_DEPENDENCIES) $(EXTRA_bcmxcp_DEPENDENCIES) @rm -f bcmxcp$(EXEEXT) - $(LINK) $(bcmxcp_OBJECTS) $(bcmxcp_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(bcmxcp_OBJECTS) $(bcmxcp_LDADD) $(LIBS) + bcmxcp_usb$(EXEEXT): $(bcmxcp_usb_OBJECTS) $(bcmxcp_usb_DEPENDENCIES) $(EXTRA_bcmxcp_usb_DEPENDENCIES) @rm -f bcmxcp_usb$(EXEEXT) - $(LINK) $(bcmxcp_usb_OBJECTS) $(bcmxcp_usb_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(bcmxcp_usb_OBJECTS) $(bcmxcp_usb_LDADD) $(LIBS) + belkin$(EXEEXT): $(belkin_OBJECTS) $(belkin_DEPENDENCIES) $(EXTRA_belkin_DEPENDENCIES) @rm -f belkin$(EXEEXT) - $(LINK) $(belkin_OBJECTS) $(belkin_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(belkin_OBJECTS) $(belkin_LDADD) $(LIBS) + belkinunv$(EXEEXT): $(belkinunv_OBJECTS) $(belkinunv_DEPENDENCIES) $(EXTRA_belkinunv_DEPENDENCIES) @rm -f belkinunv$(EXEEXT) - $(LINK) $(belkinunv_OBJECTS) $(belkinunv_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(belkinunv_OBJECTS) $(belkinunv_LDADD) $(LIBS) + bestfcom$(EXEEXT): $(bestfcom_OBJECTS) $(bestfcom_DEPENDENCIES) $(EXTRA_bestfcom_DEPENDENCIES) @rm -f bestfcom$(EXEEXT) - $(LINK) $(bestfcom_OBJECTS) $(bestfcom_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(bestfcom_OBJECTS) $(bestfcom_LDADD) $(LIBS) + bestfortress$(EXEEXT): $(bestfortress_OBJECTS) $(bestfortress_DEPENDENCIES) $(EXTRA_bestfortress_DEPENDENCIES) @rm -f bestfortress$(EXEEXT) - $(LINK) $(bestfortress_OBJECTS) $(bestfortress_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(bestfortress_OBJECTS) $(bestfortress_LDADD) $(LIBS) + bestuferrups$(EXEEXT): $(bestuferrups_OBJECTS) $(bestuferrups_DEPENDENCIES) $(EXTRA_bestuferrups_DEPENDENCIES) @rm -f bestuferrups$(EXEEXT) - $(LINK) $(bestuferrups_OBJECTS) $(bestuferrups_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(bestuferrups_OBJECTS) $(bestuferrups_LDADD) $(LIBS) + bestups$(EXEEXT): $(bestups_OBJECTS) $(bestups_DEPENDENCIES) $(EXTRA_bestups_DEPENDENCIES) @rm -f bestups$(EXEEXT) - $(LINK) $(bestups_OBJECTS) $(bestups_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(bestups_OBJECTS) $(bestups_LDADD) $(LIBS) + blazer_ser$(EXEEXT): $(blazer_ser_OBJECTS) $(blazer_ser_DEPENDENCIES) $(EXTRA_blazer_ser_DEPENDENCIES) @rm -f blazer_ser$(EXEEXT) - $(LINK) $(blazer_ser_OBJECTS) $(blazer_ser_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(blazer_ser_OBJECTS) $(blazer_ser_LDADD) $(LIBS) + blazer_usb$(EXEEXT): $(blazer_usb_OBJECTS) $(blazer_usb_DEPENDENCIES) $(EXTRA_blazer_usb_DEPENDENCIES) @rm -f blazer_usb$(EXEEXT) - $(LINK) $(blazer_usb_OBJECTS) $(blazer_usb_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(blazer_usb_OBJECTS) $(blazer_usb_LDADD) $(LIBS) + clone$(EXEEXT): $(clone_OBJECTS) $(clone_DEPENDENCIES) $(EXTRA_clone_DEPENDENCIES) @rm -f clone$(EXEEXT) - $(LINK) $(clone_OBJECTS) $(clone_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(clone_OBJECTS) $(clone_LDADD) $(LIBS) + clone-outlet$(EXEEXT): $(clone_outlet_OBJECTS) $(clone_outlet_DEPENDENCIES) $(EXTRA_clone_outlet_DEPENDENCIES) @rm -f clone-outlet$(EXEEXT) - $(LINK) $(clone_outlet_OBJECTS) $(clone_outlet_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(clone_outlet_OBJECTS) $(clone_outlet_LDADD) $(LIBS) + dummy-ups$(EXEEXT): $(dummy_ups_OBJECTS) $(dummy_ups_DEPENDENCIES) $(EXTRA_dummy_ups_DEPENDENCIES) @rm -f dummy-ups$(EXEEXT) - $(dummy_ups_LINK) $(dummy_ups_OBJECTS) $(dummy_ups_LDADD) $(LIBS) + $(AM_V_CCLD)$(dummy_ups_LINK) $(dummy_ups_OBJECTS) $(dummy_ups_LDADD) $(LIBS) + etapro$(EXEEXT): $(etapro_OBJECTS) $(etapro_DEPENDENCIES) $(EXTRA_etapro_DEPENDENCIES) @rm -f etapro$(EXEEXT) - $(LINK) $(etapro_OBJECTS) $(etapro_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(etapro_OBJECTS) $(etapro_LDADD) $(LIBS) + everups$(EXEEXT): $(everups_OBJECTS) $(everups_DEPENDENCIES) $(EXTRA_everups_DEPENDENCIES) @rm -f everups$(EXEEXT) - $(LINK) $(everups_OBJECTS) $(everups_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(everups_OBJECTS) $(everups_LDADD) $(LIBS) + gamatronic$(EXEEXT): $(gamatronic_OBJECTS) $(gamatronic_DEPENDENCIES) $(EXTRA_gamatronic_DEPENDENCIES) @rm -f gamatronic$(EXEEXT) - $(LINK) $(gamatronic_OBJECTS) $(gamatronic_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(gamatronic_OBJECTS) $(gamatronic_LDADD) $(LIBS) + genericups$(EXEEXT): $(genericups_OBJECTS) $(genericups_DEPENDENCIES) $(EXTRA_genericups_DEPENDENCIES) @rm -f genericups$(EXEEXT) - $(LINK) $(genericups_OBJECTS) $(genericups_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(genericups_OBJECTS) $(genericups_LDADD) $(LIBS) + isbmex$(EXEEXT): $(isbmex_OBJECTS) $(isbmex_DEPENDENCIES) $(EXTRA_isbmex_DEPENDENCIES) @rm -f isbmex$(EXEEXT) - $(LINK) $(isbmex_OBJECTS) $(isbmex_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(isbmex_OBJECTS) $(isbmex_LDADD) $(LIBS) + ivtscd$(EXEEXT): $(ivtscd_OBJECTS) $(ivtscd_DEPENDENCIES) $(EXTRA_ivtscd_DEPENDENCIES) @rm -f ivtscd$(EXEEXT) - $(LINK) $(ivtscd_OBJECTS) $(ivtscd_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(ivtscd_OBJECTS) $(ivtscd_LDADD) $(LIBS) + liebert$(EXEEXT): $(liebert_OBJECTS) $(liebert_DEPENDENCIES) $(EXTRA_liebert_DEPENDENCIES) @rm -f liebert$(EXEEXT) - $(LINK) $(liebert_OBJECTS) $(liebert_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(liebert_OBJECTS) $(liebert_LDADD) $(LIBS) + liebert-esp2$(EXEEXT): $(liebert_esp2_OBJECTS) $(liebert_esp2_DEPENDENCIES) $(EXTRA_liebert_esp2_DEPENDENCIES) @rm -f liebert-esp2$(EXEEXT) - $(LINK) $(liebert_esp2_OBJECTS) $(liebert_esp2_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(liebert_esp2_OBJECTS) $(liebert_esp2_LDADD) $(LIBS) + macosx-ups$(EXEEXT): $(macosx_ups_OBJECTS) $(macosx_ups_DEPENDENCIES) $(EXTRA_macosx_ups_DEPENDENCIES) @rm -f macosx-ups$(EXEEXT) - $(macosx_ups_LINK) $(macosx_ups_OBJECTS) $(macosx_ups_LDADD) $(LIBS) + $(AM_V_CCLD)$(macosx_ups_LINK) $(macosx_ups_OBJECTS) $(macosx_ups_LDADD) $(LIBS) + masterguard$(EXEEXT): $(masterguard_OBJECTS) $(masterguard_DEPENDENCIES) $(EXTRA_masterguard_DEPENDENCIES) @rm -f masterguard$(EXEEXT) - $(LINK) $(masterguard_OBJECTS) $(masterguard_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(masterguard_OBJECTS) $(masterguard_LDADD) $(LIBS) + metasys$(EXEEXT): $(metasys_OBJECTS) $(metasys_DEPENDENCIES) $(EXTRA_metasys_DEPENDENCIES) @rm -f metasys$(EXEEXT) - $(LINK) $(metasys_OBJECTS) $(metasys_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(metasys_OBJECTS) $(metasys_LDADD) $(LIBS) + mge-shut$(EXEEXT): $(mge_shut_OBJECTS) $(mge_shut_DEPENDENCIES) $(EXTRA_mge_shut_DEPENDENCIES) @rm -f mge-shut$(EXEEXT) - $(mge_shut_LINK) $(mge_shut_OBJECTS) $(mge_shut_LDADD) $(LIBS) + $(AM_V_CCLD)$(mge_shut_LINK) $(mge_shut_OBJECTS) $(mge_shut_LDADD) $(LIBS) + mge-utalk$(EXEEXT): $(mge_utalk_OBJECTS) $(mge_utalk_DEPENDENCIES) $(EXTRA_mge_utalk_DEPENDENCIES) @rm -f mge-utalk$(EXEEXT) - $(LINK) $(mge_utalk_OBJECTS) $(mge_utalk_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(mge_utalk_OBJECTS) $(mge_utalk_LDADD) $(LIBS) + microdowell$(EXEEXT): $(microdowell_OBJECTS) $(microdowell_DEPENDENCIES) $(EXTRA_microdowell_DEPENDENCIES) @rm -f microdowell$(EXEEXT) - $(LINK) $(microdowell_OBJECTS) $(microdowell_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(microdowell_OBJECTS) $(microdowell_LDADD) $(LIBS) + netxml-ups$(EXEEXT): $(netxml_ups_OBJECTS) $(netxml_ups_DEPENDENCIES) $(EXTRA_netxml_ups_DEPENDENCIES) @rm -f netxml-ups$(EXEEXT) - $(LINK) $(netxml_ups_OBJECTS) $(netxml_ups_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(netxml_ups_OBJECTS) $(netxml_ups_LDADD) $(LIBS) + nut-ipmipsu$(EXEEXT): $(nut_ipmipsu_OBJECTS) $(nut_ipmipsu_DEPENDENCIES) $(EXTRA_nut_ipmipsu_DEPENDENCIES) @rm -f nut-ipmipsu$(EXEEXT) - $(LINK) $(nut_ipmipsu_OBJECTS) $(nut_ipmipsu_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(nut_ipmipsu_OBJECTS) $(nut_ipmipsu_LDADD) $(LIBS) + nutdrv_atcl_usb$(EXEEXT): $(nutdrv_atcl_usb_OBJECTS) $(nutdrv_atcl_usb_DEPENDENCIES) $(EXTRA_nutdrv_atcl_usb_DEPENDENCIES) @rm -f nutdrv_atcl_usb$(EXEEXT) - $(LINK) $(nutdrv_atcl_usb_OBJECTS) $(nutdrv_atcl_usb_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(nutdrv_atcl_usb_OBJECTS) $(nutdrv_atcl_usb_LDADD) $(LIBS) + nutdrv_qx$(EXEEXT): $(nutdrv_qx_OBJECTS) $(nutdrv_qx_DEPENDENCIES) $(EXTRA_nutdrv_qx_DEPENDENCIES) @rm -f nutdrv_qx$(EXEEXT) - $(nutdrv_qx_LINK) $(nutdrv_qx_OBJECTS) $(nutdrv_qx_LDADD) $(LIBS) + $(AM_V_CCLD)$(nutdrv_qx_LINK) $(nutdrv_qx_OBJECTS) $(nutdrv_qx_LDADD) $(LIBS) + oldmge-shut$(EXEEXT): $(oldmge_shut_OBJECTS) $(oldmge_shut_DEPENDENCIES) $(EXTRA_oldmge_shut_DEPENDENCIES) @rm -f oldmge-shut$(EXEEXT) - $(LINK) $(oldmge_shut_OBJECTS) $(oldmge_shut_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(oldmge_shut_OBJECTS) $(oldmge_shut_LDADD) $(LIBS) + oneac$(EXEEXT): $(oneac_OBJECTS) $(oneac_DEPENDENCIES) $(EXTRA_oneac_DEPENDENCIES) @rm -f oneac$(EXEEXT) - $(LINK) $(oneac_OBJECTS) $(oneac_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(oneac_OBJECTS) $(oneac_LDADD) $(LIBS) + optiups$(EXEEXT): $(optiups_OBJECTS) $(optiups_DEPENDENCIES) $(EXTRA_optiups_DEPENDENCIES) @rm -f optiups$(EXEEXT) - $(LINK) $(optiups_OBJECTS) $(optiups_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(optiups_OBJECTS) $(optiups_LDADD) $(LIBS) + powercom$(EXEEXT): $(powercom_OBJECTS) $(powercom_DEPENDENCIES) $(EXTRA_powercom_DEPENDENCIES) @rm -f powercom$(EXEEXT) - $(LINK) $(powercom_OBJECTS) $(powercom_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(powercom_OBJECTS) $(powercom_LDADD) $(LIBS) + powerman-pdu$(EXEEXT): $(powerman_pdu_OBJECTS) $(powerman_pdu_DEPENDENCIES) $(EXTRA_powerman_pdu_DEPENDENCIES) @rm -f powerman-pdu$(EXEEXT) - $(LINK) $(powerman_pdu_OBJECTS) $(powerman_pdu_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(powerman_pdu_OBJECTS) $(powerman_pdu_LDADD) $(LIBS) + powerpanel$(EXEEXT): $(powerpanel_OBJECTS) $(powerpanel_DEPENDENCIES) $(EXTRA_powerpanel_DEPENDENCIES) @rm -f powerpanel$(EXEEXT) - $(LINK) $(powerpanel_OBJECTS) $(powerpanel_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(powerpanel_OBJECTS) $(powerpanel_LDADD) $(LIBS) + rhino$(EXEEXT): $(rhino_OBJECTS) $(rhino_DEPENDENCIES) $(EXTRA_rhino_DEPENDENCIES) @rm -f rhino$(EXEEXT) - $(LINK) $(rhino_OBJECTS) $(rhino_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(rhino_OBJECTS) $(rhino_LDADD) $(LIBS) + richcomm_usb$(EXEEXT): $(richcomm_usb_OBJECTS) $(richcomm_usb_DEPENDENCIES) $(EXTRA_richcomm_usb_DEPENDENCIES) @rm -f richcomm_usb$(EXEEXT) - $(LINK) $(richcomm_usb_OBJECTS) $(richcomm_usb_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(richcomm_usb_OBJECTS) $(richcomm_usb_LDADD) $(LIBS) + riello_ser$(EXEEXT): $(riello_ser_OBJECTS) $(riello_ser_DEPENDENCIES) $(EXTRA_riello_ser_DEPENDENCIES) @rm -f riello_ser$(EXEEXT) - $(LINK) $(riello_ser_OBJECTS) $(riello_ser_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(riello_ser_OBJECTS) $(riello_ser_LDADD) $(LIBS) + riello_usb$(EXEEXT): $(riello_usb_OBJECTS) $(riello_usb_DEPENDENCIES) $(EXTRA_riello_usb_DEPENDENCIES) @rm -f riello_usb$(EXEEXT) - $(LINK) $(riello_usb_OBJECTS) $(riello_usb_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(riello_usb_OBJECTS) $(riello_usb_LDADD) $(LIBS) + safenet$(EXEEXT): $(safenet_OBJECTS) $(safenet_DEPENDENCIES) $(EXTRA_safenet_DEPENDENCIES) @rm -f safenet$(EXEEXT) - $(LINK) $(safenet_OBJECTS) $(safenet_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(safenet_OBJECTS) $(safenet_LDADD) $(LIBS) + skel$(EXEEXT): $(skel_OBJECTS) $(skel_DEPENDENCIES) $(EXTRA_skel_DEPENDENCIES) @rm -f skel$(EXEEXT) - $(LINK) $(skel_OBJECTS) $(skel_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(skel_OBJECTS) $(skel_LDADD) $(LIBS) + snmp-ups$(EXEEXT): $(snmp_ups_OBJECTS) $(snmp_ups_DEPENDENCIES) $(EXTRA_snmp_ups_DEPENDENCIES) @rm -f snmp-ups$(EXEEXT) - $(LINK) $(snmp_ups_OBJECTS) $(snmp_ups_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(snmp_ups_OBJECTS) $(snmp_ups_LDADD) $(LIBS) + solis$(EXEEXT): $(solis_OBJECTS) $(solis_DEPENDENCIES) $(EXTRA_solis_DEPENDENCIES) @rm -f solis$(EXEEXT) - $(LINK) $(solis_OBJECTS) $(solis_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(solis_OBJECTS) $(solis_LDADD) $(LIBS) + tripplite$(EXEEXT): $(tripplite_OBJECTS) $(tripplite_DEPENDENCIES) $(EXTRA_tripplite_DEPENDENCIES) @rm -f tripplite$(EXEEXT) - $(LINK) $(tripplite_OBJECTS) $(tripplite_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(tripplite_OBJECTS) $(tripplite_LDADD) $(LIBS) + tripplite_usb$(EXEEXT): $(tripplite_usb_OBJECTS) $(tripplite_usb_DEPENDENCIES) $(EXTRA_tripplite_usb_DEPENDENCIES) @rm -f tripplite_usb$(EXEEXT) - $(LINK) $(tripplite_usb_OBJECTS) $(tripplite_usb_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(tripplite_usb_OBJECTS) $(tripplite_usb_LDADD) $(LIBS) + tripplitesu$(EXEEXT): $(tripplitesu_OBJECTS) $(tripplitesu_DEPENDENCIES) $(EXTRA_tripplitesu_DEPENDENCIES) @rm -f tripplitesu$(EXEEXT) - $(LINK) $(tripplitesu_OBJECTS) $(tripplitesu_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(tripplitesu_OBJECTS) $(tripplitesu_LDADD) $(LIBS) + upscode2$(EXEEXT): $(upscode2_OBJECTS) $(upscode2_DEPENDENCIES) $(EXTRA_upscode2_DEPENDENCIES) @rm -f upscode2$(EXEEXT) - $(LINK) $(upscode2_OBJECTS) $(upscode2_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upscode2_OBJECTS) $(upscode2_LDADD) $(LIBS) + upsdrvctl$(EXEEXT): $(upsdrvctl_OBJECTS) $(upsdrvctl_DEPENDENCIES) $(EXTRA_upsdrvctl_DEPENDENCIES) @rm -f upsdrvctl$(EXEEXT) - $(LINK) $(upsdrvctl_OBJECTS) $(upsdrvctl_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upsdrvctl_OBJECTS) $(upsdrvctl_LDADD) $(LIBS) + usbhid-ups$(EXEEXT): $(usbhid_ups_OBJECTS) $(usbhid_ups_DEPENDENCIES) $(EXTRA_usbhid_ups_DEPENDENCIES) @rm -f usbhid-ups$(EXEEXT) - $(LINK) $(usbhid_ups_OBJECTS) $(usbhid_ups_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(usbhid_ups_OBJECTS) $(usbhid_ups_LDADD) $(LIBS) + victronups$(EXEEXT): $(victronups_OBJECTS) $(victronups_DEPENDENCIES) $(EXTRA_victronups_DEPENDENCIES) @rm -f victronups$(EXEEXT) - $(LINK) $(victronups_OBJECTS) $(victronups_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(victronups_OBJECTS) $(victronups_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -1173,6 +1336,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/apcsmart.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/apcsmart_tabs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/apcupsd_ups-apcupsd-ups.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/baytech-mib.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bcmxcp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bcmxcp_ser.Po@am__quote@ @@ -1234,12 +1398,14 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_atcl_usb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-libusb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_bestups.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs-hex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Po@am__quote@ @@ -1277,291 +1443,322 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xppc-mib.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< apcupsd_ups-apcupsd-ups.o: apcupsd-ups.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(apcupsd_ups_CFLAGS) $(CFLAGS) -MT apcupsd_ups-apcupsd-ups.o -MD -MP -MF $(DEPDIR)/apcupsd_ups-apcupsd-ups.Tpo -c -o apcupsd_ups-apcupsd-ups.o `test -f 'apcupsd-ups.c' || echo '$(srcdir)/'`apcupsd-ups.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/apcupsd_ups-apcupsd-ups.Tpo $(DEPDIR)/apcupsd_ups-apcupsd-ups.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='apcupsd-ups.c' object='apcupsd_ups-apcupsd-ups.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(apcupsd_ups_CFLAGS) $(CFLAGS) -MT apcupsd_ups-apcupsd-ups.o -MD -MP -MF $(DEPDIR)/apcupsd_ups-apcupsd-ups.Tpo -c -o apcupsd_ups-apcupsd-ups.o `test -f 'apcupsd-ups.c' || echo '$(srcdir)/'`apcupsd-ups.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/apcupsd_ups-apcupsd-ups.Tpo $(DEPDIR)/apcupsd_ups-apcupsd-ups.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='apcupsd-ups.c' object='apcupsd_ups-apcupsd-ups.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(apcupsd_ups_CFLAGS) $(CFLAGS) -c -o apcupsd_ups-apcupsd-ups.o `test -f 'apcupsd-ups.c' || echo '$(srcdir)/'`apcupsd-ups.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(apcupsd_ups_CFLAGS) $(CFLAGS) -c -o apcupsd_ups-apcupsd-ups.o `test -f 'apcupsd-ups.c' || echo '$(srcdir)/'`apcupsd-ups.c apcupsd_ups-apcupsd-ups.obj: apcupsd-ups.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(apcupsd_ups_CFLAGS) $(CFLAGS) -MT apcupsd_ups-apcupsd-ups.obj -MD -MP -MF $(DEPDIR)/apcupsd_ups-apcupsd-ups.Tpo -c -o apcupsd_ups-apcupsd-ups.obj `if test -f 'apcupsd-ups.c'; then $(CYGPATH_W) 'apcupsd-ups.c'; else $(CYGPATH_W) '$(srcdir)/apcupsd-ups.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/apcupsd_ups-apcupsd-ups.Tpo $(DEPDIR)/apcupsd_ups-apcupsd-ups.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='apcupsd-ups.c' object='apcupsd_ups-apcupsd-ups.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(apcupsd_ups_CFLAGS) $(CFLAGS) -MT apcupsd_ups-apcupsd-ups.obj -MD -MP -MF $(DEPDIR)/apcupsd_ups-apcupsd-ups.Tpo -c -o apcupsd_ups-apcupsd-ups.obj `if test -f 'apcupsd-ups.c'; then $(CYGPATH_W) 'apcupsd-ups.c'; else $(CYGPATH_W) '$(srcdir)/apcupsd-ups.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/apcupsd_ups-apcupsd-ups.Tpo $(DEPDIR)/apcupsd_ups-apcupsd-ups.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='apcupsd-ups.c' object='apcupsd_ups-apcupsd-ups.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(apcupsd_ups_CFLAGS) $(CFLAGS) -c -o apcupsd_ups-apcupsd-ups.obj `if test -f 'apcupsd-ups.c'; then $(CYGPATH_W) 'apcupsd-ups.c'; else $(CYGPATH_W) '$(srcdir)/apcupsd-ups.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(apcupsd_ups_CFLAGS) $(CFLAGS) -c -o apcupsd_ups-apcupsd-ups.obj `if test -f 'apcupsd-ups.c'; then $(CYGPATH_W) 'apcupsd-ups.c'; else $(CYGPATH_W) '$(srcdir)/apcupsd-ups.c'; fi` dummy_ups-dummy-ups.o: dummy-ups.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dummy_ups_CFLAGS) $(CFLAGS) -MT dummy_ups-dummy-ups.o -MD -MP -MF $(DEPDIR)/dummy_ups-dummy-ups.Tpo -c -o dummy_ups-dummy-ups.o `test -f 'dummy-ups.c' || echo '$(srcdir)/'`dummy-ups.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dummy_ups-dummy-ups.Tpo $(DEPDIR)/dummy_ups-dummy-ups.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dummy-ups.c' object='dummy_ups-dummy-ups.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dummy_ups_CFLAGS) $(CFLAGS) -MT dummy_ups-dummy-ups.o -MD -MP -MF $(DEPDIR)/dummy_ups-dummy-ups.Tpo -c -o dummy_ups-dummy-ups.o `test -f 'dummy-ups.c' || echo '$(srcdir)/'`dummy-ups.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dummy_ups-dummy-ups.Tpo $(DEPDIR)/dummy_ups-dummy-ups.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dummy-ups.c' object='dummy_ups-dummy-ups.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dummy_ups_CFLAGS) $(CFLAGS) -c -o dummy_ups-dummy-ups.o `test -f 'dummy-ups.c' || echo '$(srcdir)/'`dummy-ups.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dummy_ups_CFLAGS) $(CFLAGS) -c -o dummy_ups-dummy-ups.o `test -f 'dummy-ups.c' || echo '$(srcdir)/'`dummy-ups.c dummy_ups-dummy-ups.obj: dummy-ups.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dummy_ups_CFLAGS) $(CFLAGS) -MT dummy_ups-dummy-ups.obj -MD -MP -MF $(DEPDIR)/dummy_ups-dummy-ups.Tpo -c -o dummy_ups-dummy-ups.obj `if test -f 'dummy-ups.c'; then $(CYGPATH_W) 'dummy-ups.c'; else $(CYGPATH_W) '$(srcdir)/dummy-ups.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dummy_ups-dummy-ups.Tpo $(DEPDIR)/dummy_ups-dummy-ups.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dummy-ups.c' object='dummy_ups-dummy-ups.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dummy_ups_CFLAGS) $(CFLAGS) -MT dummy_ups-dummy-ups.obj -MD -MP -MF $(DEPDIR)/dummy_ups-dummy-ups.Tpo -c -o dummy_ups-dummy-ups.obj `if test -f 'dummy-ups.c'; then $(CYGPATH_W) 'dummy-ups.c'; else $(CYGPATH_W) '$(srcdir)/dummy-ups.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dummy_ups-dummy-ups.Tpo $(DEPDIR)/dummy_ups-dummy-ups.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dummy-ups.c' object='dummy_ups-dummy-ups.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dummy_ups_CFLAGS) $(CFLAGS) -c -o dummy_ups-dummy-ups.obj `if test -f 'dummy-ups.c'; then $(CYGPATH_W) 'dummy-ups.c'; else $(CYGPATH_W) '$(srcdir)/dummy-ups.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dummy_ups_CFLAGS) $(CFLAGS) -c -o dummy_ups-dummy-ups.obj `if test -f 'dummy-ups.c'; then $(CYGPATH_W) 'dummy-ups.c'; else $(CYGPATH_W) '$(srcdir)/dummy-ups.c'; fi` mge_shut-usbhid-ups.o: usbhid-ups.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-usbhid-ups.o -MD -MP -MF $(DEPDIR)/mge_shut-usbhid-ups.Tpo -c -o mge_shut-usbhid-ups.o `test -f 'usbhid-ups.c' || echo '$(srcdir)/'`usbhid-ups.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-usbhid-ups.Tpo $(DEPDIR)/mge_shut-usbhid-ups.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='usbhid-ups.c' object='mge_shut-usbhid-ups.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-usbhid-ups.o -MD -MP -MF $(DEPDIR)/mge_shut-usbhid-ups.Tpo -c -o mge_shut-usbhid-ups.o `test -f 'usbhid-ups.c' || echo '$(srcdir)/'`usbhid-ups.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mge_shut-usbhid-ups.Tpo $(DEPDIR)/mge_shut-usbhid-ups.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='usbhid-ups.c' object='mge_shut-usbhid-ups.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-usbhid-ups.o `test -f 'usbhid-ups.c' || echo '$(srcdir)/'`usbhid-ups.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-usbhid-ups.o `test -f 'usbhid-ups.c' || echo '$(srcdir)/'`usbhid-ups.c mge_shut-usbhid-ups.obj: usbhid-ups.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-usbhid-ups.obj -MD -MP -MF $(DEPDIR)/mge_shut-usbhid-ups.Tpo -c -o mge_shut-usbhid-ups.obj `if test -f 'usbhid-ups.c'; then $(CYGPATH_W) 'usbhid-ups.c'; else $(CYGPATH_W) '$(srcdir)/usbhid-ups.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-usbhid-ups.Tpo $(DEPDIR)/mge_shut-usbhid-ups.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='usbhid-ups.c' object='mge_shut-usbhid-ups.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-usbhid-ups.obj -MD -MP -MF $(DEPDIR)/mge_shut-usbhid-ups.Tpo -c -o mge_shut-usbhid-ups.obj `if test -f 'usbhid-ups.c'; then $(CYGPATH_W) 'usbhid-ups.c'; else $(CYGPATH_W) '$(srcdir)/usbhid-ups.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mge_shut-usbhid-ups.Tpo $(DEPDIR)/mge_shut-usbhid-ups.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='usbhid-ups.c' object='mge_shut-usbhid-ups.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-usbhid-ups.obj `if test -f 'usbhid-ups.c'; then $(CYGPATH_W) 'usbhid-ups.c'; else $(CYGPATH_W) '$(srcdir)/usbhid-ups.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-usbhid-ups.obj `if test -f 'usbhid-ups.c'; then $(CYGPATH_W) 'usbhid-ups.c'; else $(CYGPATH_W) '$(srcdir)/usbhid-ups.c'; fi` mge_shut-libshut.o: libshut.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-libshut.o -MD -MP -MF $(DEPDIR)/mge_shut-libshut.Tpo -c -o mge_shut-libshut.o `test -f 'libshut.c' || echo '$(srcdir)/'`libshut.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-libshut.Tpo $(DEPDIR)/mge_shut-libshut.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libshut.c' object='mge_shut-libshut.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-libshut.o -MD -MP -MF $(DEPDIR)/mge_shut-libshut.Tpo -c -o mge_shut-libshut.o `test -f 'libshut.c' || echo '$(srcdir)/'`libshut.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mge_shut-libshut.Tpo $(DEPDIR)/mge_shut-libshut.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libshut.c' object='mge_shut-libshut.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-libshut.o `test -f 'libshut.c' || echo '$(srcdir)/'`libshut.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-libshut.o `test -f 'libshut.c' || echo '$(srcdir)/'`libshut.c mge_shut-libshut.obj: libshut.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-libshut.obj -MD -MP -MF $(DEPDIR)/mge_shut-libshut.Tpo -c -o mge_shut-libshut.obj `if test -f 'libshut.c'; then $(CYGPATH_W) 'libshut.c'; else $(CYGPATH_W) '$(srcdir)/libshut.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-libshut.Tpo $(DEPDIR)/mge_shut-libshut.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libshut.c' object='mge_shut-libshut.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-libshut.obj -MD -MP -MF $(DEPDIR)/mge_shut-libshut.Tpo -c -o mge_shut-libshut.obj `if test -f 'libshut.c'; then $(CYGPATH_W) 'libshut.c'; else $(CYGPATH_W) '$(srcdir)/libshut.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mge_shut-libshut.Tpo $(DEPDIR)/mge_shut-libshut.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libshut.c' object='mge_shut-libshut.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-libshut.obj `if test -f 'libshut.c'; then $(CYGPATH_W) 'libshut.c'; else $(CYGPATH_W) '$(srcdir)/libshut.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-libshut.obj `if test -f 'libshut.c'; then $(CYGPATH_W) 'libshut.c'; else $(CYGPATH_W) '$(srcdir)/libshut.c'; fi` mge_shut-libhid.o: libhid.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-libhid.o -MD -MP -MF $(DEPDIR)/mge_shut-libhid.Tpo -c -o mge_shut-libhid.o `test -f 'libhid.c' || echo '$(srcdir)/'`libhid.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-libhid.Tpo $(DEPDIR)/mge_shut-libhid.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhid.c' object='mge_shut-libhid.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-libhid.o -MD -MP -MF $(DEPDIR)/mge_shut-libhid.Tpo -c -o mge_shut-libhid.o `test -f 'libhid.c' || echo '$(srcdir)/'`libhid.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mge_shut-libhid.Tpo $(DEPDIR)/mge_shut-libhid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libhid.c' object='mge_shut-libhid.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-libhid.o `test -f 'libhid.c' || echo '$(srcdir)/'`libhid.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-libhid.o `test -f 'libhid.c' || echo '$(srcdir)/'`libhid.c mge_shut-libhid.obj: libhid.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-libhid.obj -MD -MP -MF $(DEPDIR)/mge_shut-libhid.Tpo -c -o mge_shut-libhid.obj `if test -f 'libhid.c'; then $(CYGPATH_W) 'libhid.c'; else $(CYGPATH_W) '$(srcdir)/libhid.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-libhid.Tpo $(DEPDIR)/mge_shut-libhid.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhid.c' object='mge_shut-libhid.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-libhid.obj -MD -MP -MF $(DEPDIR)/mge_shut-libhid.Tpo -c -o mge_shut-libhid.obj `if test -f 'libhid.c'; then $(CYGPATH_W) 'libhid.c'; else $(CYGPATH_W) '$(srcdir)/libhid.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mge_shut-libhid.Tpo $(DEPDIR)/mge_shut-libhid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libhid.c' object='mge_shut-libhid.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-libhid.obj `if test -f 'libhid.c'; then $(CYGPATH_W) 'libhid.c'; else $(CYGPATH_W) '$(srcdir)/libhid.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-libhid.obj `if test -f 'libhid.c'; then $(CYGPATH_W) 'libhid.c'; else $(CYGPATH_W) '$(srcdir)/libhid.c'; fi` mge_shut-hidparser.o: hidparser.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-hidparser.o -MD -MP -MF $(DEPDIR)/mge_shut-hidparser.Tpo -c -o mge_shut-hidparser.o `test -f 'hidparser.c' || echo '$(srcdir)/'`hidparser.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-hidparser.Tpo $(DEPDIR)/mge_shut-hidparser.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hidparser.c' object='mge_shut-hidparser.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-hidparser.o -MD -MP -MF $(DEPDIR)/mge_shut-hidparser.Tpo -c -o mge_shut-hidparser.o `test -f 'hidparser.c' || echo '$(srcdir)/'`hidparser.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mge_shut-hidparser.Tpo $(DEPDIR)/mge_shut-hidparser.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hidparser.c' object='mge_shut-hidparser.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-hidparser.o `test -f 'hidparser.c' || echo '$(srcdir)/'`hidparser.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-hidparser.o `test -f 'hidparser.c' || echo '$(srcdir)/'`hidparser.c mge_shut-hidparser.obj: hidparser.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-hidparser.obj -MD -MP -MF $(DEPDIR)/mge_shut-hidparser.Tpo -c -o mge_shut-hidparser.obj `if test -f 'hidparser.c'; then $(CYGPATH_W) 'hidparser.c'; else $(CYGPATH_W) '$(srcdir)/hidparser.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-hidparser.Tpo $(DEPDIR)/mge_shut-hidparser.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hidparser.c' object='mge_shut-hidparser.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-hidparser.obj -MD -MP -MF $(DEPDIR)/mge_shut-hidparser.Tpo -c -o mge_shut-hidparser.obj `if test -f 'hidparser.c'; then $(CYGPATH_W) 'hidparser.c'; else $(CYGPATH_W) '$(srcdir)/hidparser.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mge_shut-hidparser.Tpo $(DEPDIR)/mge_shut-hidparser.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hidparser.c' object='mge_shut-hidparser.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-hidparser.obj `if test -f 'hidparser.c'; then $(CYGPATH_W) 'hidparser.c'; else $(CYGPATH_W) '$(srcdir)/hidparser.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-hidparser.obj `if test -f 'hidparser.c'; then $(CYGPATH_W) 'hidparser.c'; else $(CYGPATH_W) '$(srcdir)/hidparser.c'; fi` mge_shut-mge-hid.o: mge-hid.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-mge-hid.o -MD -MP -MF $(DEPDIR)/mge_shut-mge-hid.Tpo -c -o mge_shut-mge-hid.o `test -f 'mge-hid.c' || echo '$(srcdir)/'`mge-hid.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-mge-hid.Tpo $(DEPDIR)/mge_shut-mge-hid.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mge-hid.c' object='mge_shut-mge-hid.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-mge-hid.o -MD -MP -MF $(DEPDIR)/mge_shut-mge-hid.Tpo -c -o mge_shut-mge-hid.o `test -f 'mge-hid.c' || echo '$(srcdir)/'`mge-hid.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mge_shut-mge-hid.Tpo $(DEPDIR)/mge_shut-mge-hid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mge-hid.c' object='mge_shut-mge-hid.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-mge-hid.o `test -f 'mge-hid.c' || echo '$(srcdir)/'`mge-hid.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-mge-hid.o `test -f 'mge-hid.c' || echo '$(srcdir)/'`mge-hid.c mge_shut-mge-hid.obj: mge-hid.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-mge-hid.obj -MD -MP -MF $(DEPDIR)/mge_shut-mge-hid.Tpo -c -o mge_shut-mge-hid.obj `if test -f 'mge-hid.c'; then $(CYGPATH_W) 'mge-hid.c'; else $(CYGPATH_W) '$(srcdir)/mge-hid.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-mge-hid.Tpo $(DEPDIR)/mge_shut-mge-hid.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mge-hid.c' object='mge_shut-mge-hid.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-mge-hid.obj -MD -MP -MF $(DEPDIR)/mge_shut-mge-hid.Tpo -c -o mge_shut-mge-hid.obj `if test -f 'mge-hid.c'; then $(CYGPATH_W) 'mge-hid.c'; else $(CYGPATH_W) '$(srcdir)/mge-hid.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mge_shut-mge-hid.Tpo $(DEPDIR)/mge_shut-mge-hid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mge-hid.c' object='mge_shut-mge-hid.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-mge-hid.obj `if test -f 'mge-hid.c'; then $(CYGPATH_W) 'mge-hid.c'; else $(CYGPATH_W) '$(srcdir)/mge-hid.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-mge-hid.obj `if test -f 'mge-hid.c'; then $(CYGPATH_W) 'mge-hid.c'; else $(CYGPATH_W) '$(srcdir)/mge-hid.c'; fi` nutdrv_qx-nutdrv_qx.o: nutdrv_qx.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx.Tpo -c -o nutdrv_qx-nutdrv_qx.o `test -f 'nutdrv_qx.c' || echo '$(srcdir)/'`nutdrv_qx.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx.c' object='nutdrv_qx-nutdrv_qx.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx.Tpo -c -o nutdrv_qx-nutdrv_qx.o `test -f 'nutdrv_qx.c' || echo '$(srcdir)/'`nutdrv_qx.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx.c' object='nutdrv_qx-nutdrv_qx.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx.o `test -f 'nutdrv_qx.c' || echo '$(srcdir)/'`nutdrv_qx.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx.o `test -f 'nutdrv_qx.c' || echo '$(srcdir)/'`nutdrv_qx.c nutdrv_qx-nutdrv_qx.obj: nutdrv_qx.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx.Tpo -c -o nutdrv_qx-nutdrv_qx.obj `if test -f 'nutdrv_qx.c'; then $(CYGPATH_W) 'nutdrv_qx.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx.c' object='nutdrv_qx-nutdrv_qx.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx.Tpo -c -o nutdrv_qx-nutdrv_qx.obj `if test -f 'nutdrv_qx.c'; then $(CYGPATH_W) 'nutdrv_qx.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx.c' object='nutdrv_qx-nutdrv_qx.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx.obj `if test -f 'nutdrv_qx.c'; then $(CYGPATH_W) 'nutdrv_qx.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx.obj `if test -f 'nutdrv_qx.c'; then $(CYGPATH_W) 'nutdrv_qx.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx.c'; fi` nutdrv_qx-libusb.o: libusb.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-libusb.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-libusb.Tpo -c -o nutdrv_qx-libusb.o `test -f 'libusb.c' || echo '$(srcdir)/'`libusb.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-libusb.Tpo $(DEPDIR)/nutdrv_qx-libusb.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libusb.c' object='nutdrv_qx-libusb.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-libusb.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-libusb.Tpo -c -o nutdrv_qx-libusb.o `test -f 'libusb.c' || echo '$(srcdir)/'`libusb.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-libusb.Tpo $(DEPDIR)/nutdrv_qx-libusb.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libusb.c' object='nutdrv_qx-libusb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-libusb.o `test -f 'libusb.c' || echo '$(srcdir)/'`libusb.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-libusb.o `test -f 'libusb.c' || echo '$(srcdir)/'`libusb.c nutdrv_qx-libusb.obj: libusb.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-libusb.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-libusb.Tpo -c -o nutdrv_qx-libusb.obj `if test -f 'libusb.c'; then $(CYGPATH_W) 'libusb.c'; else $(CYGPATH_W) '$(srcdir)/libusb.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-libusb.Tpo $(DEPDIR)/nutdrv_qx-libusb.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libusb.c' object='nutdrv_qx-libusb.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-libusb.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-libusb.Tpo -c -o nutdrv_qx-libusb.obj `if test -f 'libusb.c'; then $(CYGPATH_W) 'libusb.c'; else $(CYGPATH_W) '$(srcdir)/libusb.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-libusb.Tpo $(DEPDIR)/nutdrv_qx-libusb.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libusb.c' object='nutdrv_qx-libusb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-libusb.obj `if test -f 'libusb.c'; then $(CYGPATH_W) 'libusb.c'; else $(CYGPATH_W) '$(srcdir)/libusb.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-libusb.obj `if test -f 'libusb.c'; then $(CYGPATH_W) 'libusb.c'; else $(CYGPATH_W) '$(srcdir)/libusb.c'; fi` nutdrv_qx-usb-common.o: usb-common.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-usb-common.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-usb-common.Tpo -c -o nutdrv_qx-usb-common.o `test -f 'usb-common.c' || echo '$(srcdir)/'`usb-common.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-usb-common.Tpo $(DEPDIR)/nutdrv_qx-usb-common.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='usb-common.c' object='nutdrv_qx-usb-common.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-usb-common.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-usb-common.Tpo -c -o nutdrv_qx-usb-common.o `test -f 'usb-common.c' || echo '$(srcdir)/'`usb-common.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-usb-common.Tpo $(DEPDIR)/nutdrv_qx-usb-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='usb-common.c' object='nutdrv_qx-usb-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-usb-common.o `test -f 'usb-common.c' || echo '$(srcdir)/'`usb-common.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-usb-common.o `test -f 'usb-common.c' || echo '$(srcdir)/'`usb-common.c nutdrv_qx-usb-common.obj: usb-common.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-usb-common.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-usb-common.Tpo -c -o nutdrv_qx-usb-common.obj `if test -f 'usb-common.c'; then $(CYGPATH_W) 'usb-common.c'; else $(CYGPATH_W) '$(srcdir)/usb-common.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-usb-common.Tpo $(DEPDIR)/nutdrv_qx-usb-common.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='usb-common.c' object='nutdrv_qx-usb-common.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-usb-common.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-usb-common.Tpo -c -o nutdrv_qx-usb-common.obj `if test -f 'usb-common.c'; then $(CYGPATH_W) 'usb-common.c'; else $(CYGPATH_W) '$(srcdir)/usb-common.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-usb-common.Tpo $(DEPDIR)/nutdrv_qx-usb-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='usb-common.c' object='nutdrv_qx-usb-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-usb-common.obj `if test -f 'usb-common.c'; then $(CYGPATH_W) 'usb-common.c'; else $(CYGPATH_W) '$(srcdir)/usb-common.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-usb-common.obj `if test -f 'usb-common.c'; then $(CYGPATH_W) 'usb-common.c'; else $(CYGPATH_W) '$(srcdir)/usb-common.c'; fi` + +nutdrv_qx-nutdrv_qx_bestups.o: nutdrv_qx_bestups.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_bestups.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_bestups.Tpo -c -o nutdrv_qx-nutdrv_qx_bestups.o `test -f 'nutdrv_qx_bestups.c' || echo '$(srcdir)/'`nutdrv_qx_bestups.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_bestups.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_bestups.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_bestups.c' object='nutdrv_qx-nutdrv_qx_bestups.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_bestups.o `test -f 'nutdrv_qx_bestups.c' || echo '$(srcdir)/'`nutdrv_qx_bestups.c + +nutdrv_qx-nutdrv_qx_bestups.obj: nutdrv_qx_bestups.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_bestups.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_bestups.Tpo -c -o nutdrv_qx-nutdrv_qx_bestups.obj `if test -f 'nutdrv_qx_bestups.c'; then $(CYGPATH_W) 'nutdrv_qx_bestups.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_bestups.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_bestups.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_bestups.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_bestups.c' object='nutdrv_qx-nutdrv_qx_bestups.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_bestups.obj `if test -f 'nutdrv_qx_bestups.c'; then $(CYGPATH_W) 'nutdrv_qx_bestups.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_bestups.c'; fi` nutdrv_qx-nutdrv_qx_blazer-common.o: nutdrv_qx_blazer-common.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_blazer-common.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Tpo -c -o nutdrv_qx-nutdrv_qx_blazer-common.o `test -f 'nutdrv_qx_blazer-common.c' || echo '$(srcdir)/'`nutdrv_qx_blazer-common.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_blazer-common.c' object='nutdrv_qx-nutdrv_qx_blazer-common.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_blazer-common.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Tpo -c -o nutdrv_qx-nutdrv_qx_blazer-common.o `test -f 'nutdrv_qx_blazer-common.c' || echo '$(srcdir)/'`nutdrv_qx_blazer-common.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_blazer-common.c' object='nutdrv_qx-nutdrv_qx_blazer-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_blazer-common.o `test -f 'nutdrv_qx_blazer-common.c' || echo '$(srcdir)/'`nutdrv_qx_blazer-common.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_blazer-common.o `test -f 'nutdrv_qx_blazer-common.c' || echo '$(srcdir)/'`nutdrv_qx_blazer-common.c nutdrv_qx-nutdrv_qx_blazer-common.obj: nutdrv_qx_blazer-common.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_blazer-common.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Tpo -c -o nutdrv_qx-nutdrv_qx_blazer-common.obj `if test -f 'nutdrv_qx_blazer-common.c'; then $(CYGPATH_W) 'nutdrv_qx_blazer-common.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_blazer-common.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_blazer-common.c' object='nutdrv_qx-nutdrv_qx_blazer-common.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_blazer-common.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Tpo -c -o nutdrv_qx-nutdrv_qx_blazer-common.obj `if test -f 'nutdrv_qx_blazer-common.c'; then $(CYGPATH_W) 'nutdrv_qx_blazer-common.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_blazer-common.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_blazer-common.c' object='nutdrv_qx-nutdrv_qx_blazer-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_blazer-common.obj `if test -f 'nutdrv_qx_blazer-common.c'; then $(CYGPATH_W) 'nutdrv_qx_blazer-common.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_blazer-common.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_blazer-common.obj `if test -f 'nutdrv_qx_blazer-common.c'; then $(CYGPATH_W) 'nutdrv_qx_blazer-common.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_blazer-common.c'; fi` nutdrv_qx-nutdrv_qx_mecer.o: nutdrv_qx_mecer.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_mecer.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Tpo -c -o nutdrv_qx-nutdrv_qx_mecer.o `test -f 'nutdrv_qx_mecer.c' || echo '$(srcdir)/'`nutdrv_qx_mecer.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_mecer.c' object='nutdrv_qx-nutdrv_qx_mecer.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_mecer.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Tpo -c -o nutdrv_qx-nutdrv_qx_mecer.o `test -f 'nutdrv_qx_mecer.c' || echo '$(srcdir)/'`nutdrv_qx_mecer.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_mecer.c' object='nutdrv_qx-nutdrv_qx_mecer.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_mecer.o `test -f 'nutdrv_qx_mecer.c' || echo '$(srcdir)/'`nutdrv_qx_mecer.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_mecer.o `test -f 'nutdrv_qx_mecer.c' || echo '$(srcdir)/'`nutdrv_qx_mecer.c nutdrv_qx-nutdrv_qx_mecer.obj: nutdrv_qx_mecer.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_mecer.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Tpo -c -o nutdrv_qx-nutdrv_qx_mecer.obj `if test -f 'nutdrv_qx_mecer.c'; then $(CYGPATH_W) 'nutdrv_qx_mecer.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mecer.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_mecer.c' object='nutdrv_qx-nutdrv_qx_mecer.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_mecer.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Tpo -c -o nutdrv_qx-nutdrv_qx_mecer.obj `if test -f 'nutdrv_qx_mecer.c'; then $(CYGPATH_W) 'nutdrv_qx_mecer.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mecer.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_mecer.c' object='nutdrv_qx-nutdrv_qx_mecer.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_mecer.obj `if test -f 'nutdrv_qx_mecer.c'; then $(CYGPATH_W) 'nutdrv_qx_mecer.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mecer.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_mecer.obj `if test -f 'nutdrv_qx_mecer.c'; then $(CYGPATH_W) 'nutdrv_qx_mecer.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mecer.c'; fi` nutdrv_qx-nutdrv_qx_megatec.o: nutdrv_qx_megatec.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_megatec.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Tpo -c -o nutdrv_qx-nutdrv_qx_megatec.o `test -f 'nutdrv_qx_megatec.c' || echo '$(srcdir)/'`nutdrv_qx_megatec.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_megatec.c' object='nutdrv_qx-nutdrv_qx_megatec.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_megatec.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Tpo -c -o nutdrv_qx-nutdrv_qx_megatec.o `test -f 'nutdrv_qx_megatec.c' || echo '$(srcdir)/'`nutdrv_qx_megatec.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_megatec.c' object='nutdrv_qx-nutdrv_qx_megatec.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_megatec.o `test -f 'nutdrv_qx_megatec.c' || echo '$(srcdir)/'`nutdrv_qx_megatec.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_megatec.o `test -f 'nutdrv_qx_megatec.c' || echo '$(srcdir)/'`nutdrv_qx_megatec.c nutdrv_qx-nutdrv_qx_megatec.obj: nutdrv_qx_megatec.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_megatec.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Tpo -c -o nutdrv_qx-nutdrv_qx_megatec.obj `if test -f 'nutdrv_qx_megatec.c'; then $(CYGPATH_W) 'nutdrv_qx_megatec.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_megatec.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_megatec.c' object='nutdrv_qx-nutdrv_qx_megatec.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_megatec.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Tpo -c -o nutdrv_qx-nutdrv_qx_megatec.obj `if test -f 'nutdrv_qx_megatec.c'; then $(CYGPATH_W) 'nutdrv_qx_megatec.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_megatec.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_megatec.c' object='nutdrv_qx-nutdrv_qx_megatec.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_megatec.obj `if test -f 'nutdrv_qx_megatec.c'; then $(CYGPATH_W) 'nutdrv_qx_megatec.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_megatec.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_megatec.obj `if test -f 'nutdrv_qx_megatec.c'; then $(CYGPATH_W) 'nutdrv_qx_megatec.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_megatec.c'; fi` nutdrv_qx-nutdrv_qx_megatec-old.o: nutdrv_qx_megatec-old.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_megatec-old.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Tpo -c -o nutdrv_qx-nutdrv_qx_megatec-old.o `test -f 'nutdrv_qx_megatec-old.c' || echo '$(srcdir)/'`nutdrv_qx_megatec-old.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_megatec-old.c' object='nutdrv_qx-nutdrv_qx_megatec-old.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_megatec-old.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Tpo -c -o nutdrv_qx-nutdrv_qx_megatec-old.o `test -f 'nutdrv_qx_megatec-old.c' || echo '$(srcdir)/'`nutdrv_qx_megatec-old.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_megatec-old.c' object='nutdrv_qx-nutdrv_qx_megatec-old.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_megatec-old.o `test -f 'nutdrv_qx_megatec-old.c' || echo '$(srcdir)/'`nutdrv_qx_megatec-old.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_megatec-old.o `test -f 'nutdrv_qx_megatec-old.c' || echo '$(srcdir)/'`nutdrv_qx_megatec-old.c nutdrv_qx-nutdrv_qx_megatec-old.obj: nutdrv_qx_megatec-old.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_megatec-old.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Tpo -c -o nutdrv_qx-nutdrv_qx_megatec-old.obj `if test -f 'nutdrv_qx_megatec-old.c'; then $(CYGPATH_W) 'nutdrv_qx_megatec-old.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_megatec-old.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_megatec-old.c' object='nutdrv_qx-nutdrv_qx_megatec-old.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_megatec-old.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Tpo -c -o nutdrv_qx-nutdrv_qx_megatec-old.obj `if test -f 'nutdrv_qx_megatec-old.c'; then $(CYGPATH_W) 'nutdrv_qx_megatec-old.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_megatec-old.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_megatec-old.c' object='nutdrv_qx-nutdrv_qx_megatec-old.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_megatec-old.obj `if test -f 'nutdrv_qx_megatec-old.c'; then $(CYGPATH_W) 'nutdrv_qx_megatec-old.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_megatec-old.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_megatec-old.obj `if test -f 'nutdrv_qx_megatec-old.c'; then $(CYGPATH_W) 'nutdrv_qx_megatec-old.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_megatec-old.c'; fi` nutdrv_qx-nutdrv_qx_mustek.o: nutdrv_qx_mustek.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_mustek.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Tpo -c -o nutdrv_qx-nutdrv_qx_mustek.o `test -f 'nutdrv_qx_mustek.c' || echo '$(srcdir)/'`nutdrv_qx_mustek.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_mustek.c' object='nutdrv_qx-nutdrv_qx_mustek.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_mustek.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Tpo -c -o nutdrv_qx-nutdrv_qx_mustek.o `test -f 'nutdrv_qx_mustek.c' || echo '$(srcdir)/'`nutdrv_qx_mustek.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_mustek.c' object='nutdrv_qx-nutdrv_qx_mustek.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_mustek.o `test -f 'nutdrv_qx_mustek.c' || echo '$(srcdir)/'`nutdrv_qx_mustek.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_mustek.o `test -f 'nutdrv_qx_mustek.c' || echo '$(srcdir)/'`nutdrv_qx_mustek.c nutdrv_qx-nutdrv_qx_mustek.obj: nutdrv_qx_mustek.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_mustek.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Tpo -c -o nutdrv_qx-nutdrv_qx_mustek.obj `if test -f 'nutdrv_qx_mustek.c'; then $(CYGPATH_W) 'nutdrv_qx_mustek.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mustek.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_mustek.c' object='nutdrv_qx-nutdrv_qx_mustek.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_mustek.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Tpo -c -o nutdrv_qx-nutdrv_qx_mustek.obj `if test -f 'nutdrv_qx_mustek.c'; then $(CYGPATH_W) 'nutdrv_qx_mustek.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mustek.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_mustek.c' object='nutdrv_qx-nutdrv_qx_mustek.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_mustek.obj `if test -f 'nutdrv_qx_mustek.c'; then $(CYGPATH_W) 'nutdrv_qx_mustek.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mustek.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_mustek.obj `if test -f 'nutdrv_qx_mustek.c'; then $(CYGPATH_W) 'nutdrv_qx_mustek.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mustek.c'; fi` nutdrv_qx-nutdrv_qx_q1.o: nutdrv_qx_q1.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_q1.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Tpo -c -o nutdrv_qx-nutdrv_qx_q1.o `test -f 'nutdrv_qx_q1.c' || echo '$(srcdir)/'`nutdrv_qx_q1.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_q1.c' object='nutdrv_qx-nutdrv_qx_q1.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_q1.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Tpo -c -o nutdrv_qx-nutdrv_qx_q1.o `test -f 'nutdrv_qx_q1.c' || echo '$(srcdir)/'`nutdrv_qx_q1.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_q1.c' object='nutdrv_qx-nutdrv_qx_q1.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_q1.o `test -f 'nutdrv_qx_q1.c' || echo '$(srcdir)/'`nutdrv_qx_q1.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_q1.o `test -f 'nutdrv_qx_q1.c' || echo '$(srcdir)/'`nutdrv_qx_q1.c nutdrv_qx-nutdrv_qx_q1.obj: nutdrv_qx_q1.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_q1.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Tpo -c -o nutdrv_qx-nutdrv_qx_q1.obj `if test -f 'nutdrv_qx_q1.c'; then $(CYGPATH_W) 'nutdrv_qx_q1.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_q1.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_q1.c' object='nutdrv_qx-nutdrv_qx_q1.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_q1.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Tpo -c -o nutdrv_qx-nutdrv_qx_q1.obj `if test -f 'nutdrv_qx_q1.c'; then $(CYGPATH_W) 'nutdrv_qx_q1.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_q1.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_q1.c' object='nutdrv_qx-nutdrv_qx_q1.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_q1.obj `if test -f 'nutdrv_qx_q1.c'; then $(CYGPATH_W) 'nutdrv_qx_q1.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_q1.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_q1.obj `if test -f 'nutdrv_qx_q1.c'; then $(CYGPATH_W) 'nutdrv_qx_q1.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_q1.c'; fi` nutdrv_qx-nutdrv_qx_voltronic.o: nutdrv_qx_voltronic.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic.o `test -f 'nutdrv_qx_voltronic.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_voltronic.c' object='nutdrv_qx-nutdrv_qx_voltronic.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic.o `test -f 'nutdrv_qx_voltronic.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_voltronic.c' object='nutdrv_qx-nutdrv_qx_voltronic.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic.o `test -f 'nutdrv_qx_voltronic.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic.o `test -f 'nutdrv_qx_voltronic.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic.c nutdrv_qx-nutdrv_qx_voltronic.obj: nutdrv_qx_voltronic.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic.obj `if test -f 'nutdrv_qx_voltronic.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_voltronic.c' object='nutdrv_qx-nutdrv_qx_voltronic.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic.obj `if test -f 'nutdrv_qx_voltronic.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_voltronic.c' object='nutdrv_qx-nutdrv_qx_voltronic.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic.obj `if test -f 'nutdrv_qx_voltronic.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic.obj `if test -f 'nutdrv_qx_voltronic.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic.c'; fi` nutdrv_qx-nutdrv_qx_voltronic-qs.o: nutdrv_qx_voltronic-qs.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic-qs.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic-qs.o `test -f 'nutdrv_qx_voltronic-qs.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic-qs.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_voltronic-qs.c' object='nutdrv_qx-nutdrv_qx_voltronic-qs.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic-qs.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic-qs.o `test -f 'nutdrv_qx_voltronic-qs.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic-qs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_voltronic-qs.c' object='nutdrv_qx-nutdrv_qx_voltronic-qs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic-qs.o `test -f 'nutdrv_qx_voltronic-qs.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic-qs.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic-qs.o `test -f 'nutdrv_qx_voltronic-qs.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic-qs.c nutdrv_qx-nutdrv_qx_voltronic-qs.obj: nutdrv_qx_voltronic-qs.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic-qs.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic-qs.obj `if test -f 'nutdrv_qx_voltronic-qs.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic-qs.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic-qs.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_voltronic-qs.c' object='nutdrv_qx-nutdrv_qx_voltronic-qs.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic-qs.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic-qs.obj `if test -f 'nutdrv_qx_voltronic-qs.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic-qs.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic-qs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_voltronic-qs.c' object='nutdrv_qx-nutdrv_qx_voltronic-qs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic-qs.obj `if test -f 'nutdrv_qx_voltronic-qs.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic-qs.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic-qs.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic-qs.obj `if test -f 'nutdrv_qx_voltronic-qs.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic-qs.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic-qs.c'; fi` + +nutdrv_qx-nutdrv_qx_voltronic-qs-hex.o: nutdrv_qx_voltronic-qs-hex.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic-qs-hex.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs-hex.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic-qs-hex.o `test -f 'nutdrv_qx_voltronic-qs-hex.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic-qs-hex.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs-hex.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs-hex.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_voltronic-qs-hex.c' object='nutdrv_qx-nutdrv_qx_voltronic-qs-hex.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic-qs-hex.o `test -f 'nutdrv_qx_voltronic-qs-hex.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic-qs-hex.c + +nutdrv_qx-nutdrv_qx_voltronic-qs-hex.obj: nutdrv_qx_voltronic-qs-hex.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic-qs-hex.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs-hex.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic-qs-hex.obj `if test -f 'nutdrv_qx_voltronic-qs-hex.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic-qs-hex.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic-qs-hex.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs-hex.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs-hex.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_voltronic-qs-hex.c' object='nutdrv_qx-nutdrv_qx_voltronic-qs-hex.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic-qs-hex.obj `if test -f 'nutdrv_qx_voltronic-qs-hex.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic-qs-hex.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic-qs-hex.c'; fi` nutdrv_qx-nutdrv_qx_zinto.o: nutdrv_qx_zinto.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_zinto.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Tpo -c -o nutdrv_qx-nutdrv_qx_zinto.o `test -f 'nutdrv_qx_zinto.c' || echo '$(srcdir)/'`nutdrv_qx_zinto.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_zinto.c' object='nutdrv_qx-nutdrv_qx_zinto.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_zinto.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Tpo -c -o nutdrv_qx-nutdrv_qx_zinto.o `test -f 'nutdrv_qx_zinto.c' || echo '$(srcdir)/'`nutdrv_qx_zinto.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_zinto.c' object='nutdrv_qx-nutdrv_qx_zinto.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_zinto.o `test -f 'nutdrv_qx_zinto.c' || echo '$(srcdir)/'`nutdrv_qx_zinto.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_zinto.o `test -f 'nutdrv_qx_zinto.c' || echo '$(srcdir)/'`nutdrv_qx_zinto.c nutdrv_qx-nutdrv_qx_zinto.obj: nutdrv_qx_zinto.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_zinto.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Tpo -c -o nutdrv_qx-nutdrv_qx_zinto.obj `if test -f 'nutdrv_qx_zinto.c'; then $(CYGPATH_W) 'nutdrv_qx_zinto.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_zinto.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_zinto.c' object='nutdrv_qx-nutdrv_qx_zinto.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_zinto.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Tpo -c -o nutdrv_qx-nutdrv_qx_zinto.obj `if test -f 'nutdrv_qx_zinto.c'; then $(CYGPATH_W) 'nutdrv_qx_zinto.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_zinto.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_zinto.c' object='nutdrv_qx-nutdrv_qx_zinto.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_zinto.obj `if test -f 'nutdrv_qx_zinto.c'; then $(CYGPATH_W) 'nutdrv_qx_zinto.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_zinto.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_zinto.obj `if test -f 'nutdrv_qx_zinto.c'; then $(CYGPATH_W) 'nutdrv_qx_zinto.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_zinto.c'; fi` mostlyclean-libtool: -rm -f *.lo @@ -1569,26 +1766,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -1600,15 +1786,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -1617,6 +1799,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -1761,21 +1958,21 @@ uninstall-am: uninstall-driverexecPROGRAMS uninstall-sbinPROGRAMS .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-driverexecPROGRAMS clean-generic clean-libtool \ - clean-sbinPROGRAMS ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-driverexecPROGRAMS \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-sbinPROGRAMS install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-driverexecPROGRAMS \ - uninstall-sbinPROGRAMS + clean-sbinPROGRAMS cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-driverexecPROGRAMS install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-driverexecPROGRAMS uninstall-sbinPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/drivers/apc-hid.c b/drivers/apc-hid.c index 1d85621..34601d5 100644 --- a/drivers/apc-hid.c +++ b/drivers/apc-hid.c @@ -79,6 +79,8 @@ static void *general_apc_check(USBDevice_t *device) /* USB IDs device table */ static usb_device_id_t apc_usb_device_table[] = { + /* APC AP9584 Serial->USB kit */ + { USB_DEVICE(APC_VENDORID, 0x0000), NULL }, /* various models */ { USB_DEVICE(APC_VENDORID, 0x0002), general_apc_check }, /* various 5G models */ diff --git a/drivers/apcsmart.c b/drivers/apcsmart.c index 018b29d..d437467 100644 --- a/drivers/apcsmart.c +++ b/drivers/apcsmart.c @@ -1004,7 +1004,7 @@ static void apc_getcaps(int qco) /* make sure setvar knows what this is */ vt->flags |= APC_RW | APC_ENUM; - } else if (vt->flags & APC_PACK) + } else if (vt && (vt->flags & APC_PACK)) /* * Currently we assume - basing on the following * feedback: @@ -1208,7 +1208,7 @@ static int getbaseinfo(void) { unsigned int i; int ret, qco; - char *cmds, temp[APC_LBUF]; + char *cmds, *tail, temp[APC_LBUF]; /* * try firmware lookup first; we could start with 'a', but older models @@ -1243,9 +1243,16 @@ static int getbaseinfo(void) /* * returned set is verified for validity above, so just extract * what's interesting for us + * + * the known format is: + * ver.alerts.commands[.stuff] */ - cmds = strrchr(temp, '.'); - for (i = 1; i < strlen(cmds); i++) + cmds = strchr(temp, '.'); + cmds = strchr(cmds + 1, '.'); + tail = strchr(++cmds, '.'); + if (tail) + *tail = 0; + for (i = 0; i < strlen(cmds); i++) protocol_verify(cmds[i]); deprecate_vars(); @@ -1691,7 +1698,7 @@ static int setvar_enum(apc_vartab_t *vt, const char *val) return STAT_SET_HANDLED; /* FUTURE: no change */ } - for (i = 0; i < 6; i++) { + for (i = 0; i < 32; i++) { if (apc_write(APC_NEXTVAL) != 1) return STAT_SET_FAILED; diff --git a/drivers/apcsmart.h b/drivers/apcsmart.h index c0155db..8bfc914 100644 --- a/drivers/apcsmart.h +++ b/drivers/apcsmart.h @@ -143,7 +143,7 @@ #define APC_GOSMART 'Y' #define APC_GODUMB 'R' #define APC_CMDSET 'a' -#define APC_CMDSET_FMT "^[0-9]\\.[^.]*\\.[^.]+$" +#define APC_CMDSET_FMT "^[0-9]\\.[^.]*\\.[^.]+(\\.[^.]+)?$" #define APC_CAPS '\032' /* ^Z */ #define APC_NEXTVAL '-' #define APC_FW_OLD 'V' diff --git a/drivers/asem.c b/drivers/asem.c new file mode 100644 index 0000000..d5d6ea5 --- /dev/null +++ b/drivers/asem.c @@ -0,0 +1,373 @@ +/* asem.c - driver for ASEM PB 1300 hardware, accessible through i2c. + + Copyright (C) 2014 Giuseppe Corbelli + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + ASEM SPA contributed with support and documentation. + Copan Italia SPA funded the development. + + There are 2 versions of the charger. Older one is based on Max1667, + newer one is a custom solution. Both are on address 0x09. + To be compatible with both versions just read bit 15 of address 0x13 + to have online/on battery status. + Battery monitor is a BQ2060 at address 0x0B. + + Beware that the SystemIO memory used by the i2c controller is reserved by ACPI. + On Linux, as of 3.5.x kernel only a native driver (i2c_i801) is available, + so you need to boot with acpi_enforce_resources=lax option. +*/ + +/* Depends on i2c-dev.h, Linux only */ +#include +#include +#include +#include + +#include "main.h" + +#ifndef __STR__ +# define __STR__(x) #x +#endif +#ifndef __XSTR__ +# define __XSTR__(x) __STR__(x) +#endif + +#define DRIVER_NAME "ASEM" +#define DRIVER_VERSION "0.10" + +/* Valid on ASEM PB1300 UPS */ +#define BQ2060_ADDRESS 0x0B +#define CHARGER_ADDRESS 0x09 + +#define CMD_DEVICENAME 0x21 + +#define LOW_BATTERY_THRESHOLD 25 +#define HIGH_BATTERY_THRESHOLD 75 + +#define ACCESS_DEVICE(fd, address) \ + if (ioctl(fd, I2C_SLAVE, address) < 0) { \ + fatal_with_errno(EXIT_FAILURE, "Failed to acquire bus access and/or talk to slave 0x%02X", address); \ + } + +static unsigned long lb_threshold = LOW_BATTERY_THRESHOLD; +static unsigned long hb_threshold = HIGH_BATTERY_THRESHOLD; + +static char *valid_devicename_data[] = { + "ASEM SPA", + NULL +}; + +upsdrv_info_t upsdrv_info = { + DRIVER_NAME, + DRIVER_VERSION, + "Giuseppe Corbelli ", + DRV_EXPERIMENTAL, + {NULL} +}; + +void upsdrv_initinfo(void) +{ + __s32 i2c_status; + __u8 buffer[10]; + unsigned short year, month, day; + + ACCESS_DEVICE(upsfd, BQ2060_ADDRESS); + + /* Set capacity mode in mA(h) */ + i2c_status = i2c_smbus_read_word_data(upsfd, 0x03); + if (i2c_status == -1) { + fatal_with_errno(EXIT_FAILURE, "Could not read BatteryMode word data"); + } + /* Clear 15th bit */ + i2c_status = i2c_smbus_write_word_data(upsfd, 0x03, i2c_status & ~0x8000); + if (i2c_status == -1) { + fatal_with_errno(EXIT_FAILURE, "Could not set BatteryMode word data"); + } + + /* Device name */ + memset(buffer, 0, 10); + i2c_status = i2c_smbus_read_block_data(upsfd, 0x21, buffer); + if (i2c_status == -1) { + fatal_with_errno(EXIT_FAILURE, "Could not read DeviceName block data"); + } + upsdebugx(1, "UPS model %s", (char *) buffer); + dstate_setinfo("ups.model", "%s", (char *) buffer); + + /* Manufacturing date */ + i2c_status = i2c_smbus_read_word_data(upsfd, 0x1B); + if (i2c_status == -1) { + fatal_with_errno(EXIT_FAILURE, "Could not read ManufactureDate word data"); + } + /* (Year - 1980) * 512 */ + year = (i2c_status >> 9) & 0x000000FF; + /* Month * 32 */ + month = (i2c_status >> 4) & 0x0000001F; + day = i2c_status & 0x0000001F; + upsdebugx(1, "UPS manufacturing date %d-%02d-%02d (%d)", year + 1980, month, day, i2c_status); + dstate_setinfo("ups.mfr.date", "%d-%02d-%02d", year + 1980, month, day); + + /* Device chemistry */ + memset(buffer, 0, 10); + i2c_status = i2c_smbus_read_block_data(upsfd, 0x22, buffer); + if (i2c_status == -1) { + fatal_with_errno(EXIT_FAILURE, "Could not read DeviceChemistry block data"); + } + upsdebugx(1, "Battery chemistry %s", (char *) buffer); + dstate_setinfo("battery.type", "%s", (char *) buffer); + + /* Serial number */ + i2c_status = i2c_smbus_read_word_data(upsfd, 0x1C); + if (i2c_status == -1) { + fatal_with_errno(EXIT_FAILURE, "Could not read SerialNumber block data"); + } + upsdebugx(1, "Serial Number %d", i2c_status); + dstate_setinfo("ups.serial", "%d", i2c_status); +} + +void upsdrv_updateinfo(void) +{ + static char online; + static char discharging; + static char fully_charged; + static unsigned short charge_percentage; + static unsigned short voltage; + static unsigned short capacity; + static signed short current; + static __s32 i2c_status; + static __s32 temperature; + static __s32 runtime_to_empty; + + ACCESS_DEVICE(upsfd, CHARGER_ADDRESS); + /* Charger only supplies online/offline status */ + i2c_status = i2c_smbus_read_word_data(upsfd, 0x13); + if (i2c_status == -1) { + dstate_datastale(); + upslogx(LOG_ERR, "Could not read charger status word at address 0x13"); + return; + } + online = (i2c_status & 0x8000) != 0; + upsdebugx(3, "Charger status 0x%02X, online %d", i2c_status, online); + + ACCESS_DEVICE(upsfd, BQ2060_ADDRESS); + i2c_status = i2c_smbus_read_word_data(upsfd, 0x16); + if (i2c_status == -1) { + dstate_datastale(); + upslogx(LOG_ERR, "Could not read bq2060 status word at address 0x16"); + return; + } + upsdebugx(3, "bq2060 status 0x04%X", i2c_status); + /* Busy, leave data as stale, try next time */ + if (i2c_status & 0x0001) { + dstate_datastale(); + upslogx(LOG_NOTICE, "bq2060 is busy"); + return; + } + /* Error, leave data as stale, try next time */ + if (i2c_status & 0x000F) { + dstate_datastale(); + upslogx(LOG_WARNING, "bq2060 returned error code 0x%02X", i2c_status & 0x000F); + return; + } + + discharging = (i2c_status & 0x0040); + fully_charged = (i2c_status & 0x0020); + + /* Charge percentage */ + i2c_status = i2c_smbus_read_word_data(upsfd, 0x0D); + if (i2c_status == -1) { + dstate_datastale(); + upslogx(LOG_ERR, "Could not read charge percentage from bq2060 at address 0x0D"); + return; + } + charge_percentage = i2c_status & 0xFFFF; + upsdebugx(3, "Charge percentage %03d", charge_percentage); + + /* Battery voltage in mV */ + i2c_status = i2c_smbus_read_word_data(upsfd, 0x09); + if (i2c_status == -1) { + dstate_datastale(); + upslogx(LOG_ERR, "Could not read voltage from bq2060 at address 0x09"); + return; + } + voltage = i2c_status & 0x0000FFFF; + upsdebugx(3, "Battery voltage %d mV", voltage); + + /* Temperature in °K */ + temperature = i2c_smbus_read_word_data(upsfd, 0x08); + if (temperature == -1) { + dstate_datastale(); + upslogx(LOG_ERR, "Could not read temperature from bq2060 at address 0x08"); + return; + } + upsdebugx(3, "Temperature %4.1f K", temperature / 10.0); + + /* Current load in mA, positive for charge, negative for discharge */ + i2c_status = i2c_smbus_read_word_data(upsfd, 0x0A); + if (i2c_status == -1) { + dstate_datastale(); + upslogx(LOG_ERR, "Could not read current from bq2060 at address 0x0A"); + return; + } + current = i2c_status & 0x0000FFFF; + upsdebugx(3, "Current %d mA", current); + + /* Current capacity */ + i2c_status = i2c_smbus_read_word_data(upsfd, 0x0F); + if (i2c_status == -1) { + dstate_datastale(); + upslogx(LOG_ERR, "Could not read RemainingCapacity word data"); + return; + } + capacity = i2c_status & 0x0000FFFF; + upsdebugx(3, "Current capacity %d mAh", capacity); + + /* Expected runtime capacity, averaged by gauge */ + runtime_to_empty = i2c_smbus_read_word_data(upsfd, 0x12); + if (runtime_to_empty == -1) { + dstate_datastale(); + upslogx(LOG_ERR, "Could not read AverageTimeToEmpty word data"); + return; + } + upsdebugx(3, "Expected run-time to empty %d m", runtime_to_empty); + + status_init(); + status_set(online ? "OL" : "OB"); + if (!discharging & !fully_charged) + status_set("CHRG"); + else if (discharging && current < 0) + status_set("DISCHRG"); + + if (charge_percentage >= hb_threshold) + status_set("HB"); + else if (charge_percentage <= lb_threshold) + status_set("LB"); + + /* In V */ + dstate_setinfo("battery.voltage", "%2.3f", voltage / 1000.0); + /* In mAh */ + dstate_setinfo("battery.current", "%2.3f", current / 1000.0); + dstate_setinfo("battery.charge", "%d", charge_percentage); + /* In mAh */ + dstate_setinfo("battery.capacity", "%2.3f", capacity / 1000.0); + /* In °C */ + dstate_setinfo("ups.temperature", "%4.1f", (temperature / 10.0) - 273.15); + /* In seconds */ + dstate_setinfo("battery.runtime", "%d", runtime_to_empty * 60); + status_commit(); + dstate_dataok(); +} + +void upsdrv_shutdown(void) +{ + /* tell the UPS to shut down, then return - DO NOT SLEEP HERE */ + + /* maybe try to detect the UPS here, but try a shutdown even if + it doesn't respond at first if possible */ + + /* replace with a proper shutdown function */ + fatalx(EXIT_FAILURE, "shutdown not supported"); + + /* you may have to check the line status since the commands + for toggling power are frequently different for OL vs. OB */ + + /* OL: this must power cycle the load if possible */ + + /* OB: the load must remain off until the power returns */ +} + +void upsdrv_help(void) +{ + /* Redundant */ + printf("\nASEM options\n"); + printf(" HIGH/low battery thresholds\n"); + printf(" lb = " __XSTR__(LOW_BATTERY_THRESHOLD) " (battery is low under this level)\n"); + printf(" hb = " __XSTR__(HIGH_BATTERY_THRESHOLD) " (battery is high above this level)\n"); +} + +/* list flags and values that you want to receive via -x */ +void upsdrv_makevartable(void) +{ + addvar(VAR_VALUE, "lb", "Low battery threshold, default " __XSTR__(LOW_BATTERY_THRESHOLD)); + addvar(VAR_VALUE, "hb", "High battery threshold, default " __XSTR__(HIGH_BATTERY_THRESHOLD)); +} + +void upsdrv_initups(void) +{ + __s32 i2c_status; + __u8 DeviceName_buffer[10]; + unsigned int i; + unsigned long x; + char *DeviceName; + char *option; + + upsfd = open(device_path, O_RDWR); + if (upsfd < 0) { + fatal_with_errno(EXIT_FAILURE, "Could not open device port '%s'", device_path); + } + + ACCESS_DEVICE(upsfd, BQ2060_ADDRESS); + + /* Get ManufacturerName */ + memset(DeviceName_buffer, 0, 10); + i2c_status = i2c_smbus_read_block_data(upsfd, 0x20, DeviceName_buffer); + if (i2c_status == -1) { + fatal_with_errno(EXIT_FAILURE, "Could not read DeviceName block data"); + } + i = 0; + while ( (DeviceName = valid_devicename_data[i++]) ) { + if (0 == memcmp(DeviceName, DeviceName_buffer, i2c_status)) + break; + } + if (!DeviceName) { + fatal_with_errno(EXIT_FAILURE, "Device '%s' unknown", (char *) DeviceName_buffer); + } + upsdebugx(1, "Found device '%s' on port '%s'", (char *) DeviceName, device_path); + dstate_setinfo("ups.mfr", "%s", (char *) DeviceName); + + option = getval("lb"); + if (option) { + x = strtoul(option, NULL, 0); + if ((x == 0) && (errno != 0)) { + upslogx(LOG_WARNING, "Invalid value specified for low battery threshold: '%s'", option); + } else { + lb_threshold = x; + } + } + option = getval("hb"); + if (option) { + x = strtoul(option, NULL, 0); + if ((x == 0) && (errno != 0)) { + upslogx(LOG_WARNING, "Invalid value specified for high battery threshold: '%s'", option); + } else if ((x < 1) || (x > 100)) { + upslogx(LOG_WARNING, "Invalid value specified for high battery threshold: '%s' (must be 1 < hb <= 100)", option); + } else { + hb_threshold = x; + } + } + /* Invalid values specified */ + if (lb_threshold > hb_threshold) { + upslogx(LOG_WARNING, "lb > hb specified in options. Returning to defaults."); + lb_threshold = LOW_BATTERY_THRESHOLD; + hb_threshold = HIGH_BATTERY_THRESHOLD; + } + + upslogx(LOG_NOTICE, "High battery threshold is %lu, low battery threshold is %lu", lb_threshold, hb_threshold); +} + +void upsdrv_cleanup(void) +{ + close(upsfd); +} diff --git a/drivers/bcmxcp.c b/drivers/bcmxcp.c index ad3c5eb..98553c1 100644 --- a/drivers/bcmxcp.c +++ b/drivers/bcmxcp.c @@ -9,7 +9,7 @@ Copyright (C) 2004 Kjell Claesson 2004 Tore Ørpetveit - 2011 - 2012 Arnaud Quette + 2011 - 2015 Arnaud Quette Thanks to Tore Ørpetveit that sent me the manuals for bcm/xcp. @@ -22,7 +22,7 @@ ojw0000 2007Apr5 Oliver Wilcock - modified to control individual load segments (outlet.2.shutdown.return) on Powerware PW5125. Modified to support setvar for outlet.n.delay.start by Rich Wrenn (RFW) 9-3-11. - Modified to support setvar for outlet.n.delay.shutdown by Arnaud Quette, 9-12-11 + Modified to support setvar for outlet.n.delay.shutdown by Arnaud Quette, 9-12-11 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -40,72 +40,72 @@ This program is free software; you can redistribute it and/or modify TODO List: - Extend the parsing of the Standard ID Block, to read: + Extend the parsing of the Standard ID Block, to read: - Config Block Length: (High priority) - Give information if config block is - present, and how long it is, if it exist. - If config block exist, read the config block and parse the - 'Length of the Extended Limits Configuration Block' for - extended configuration commands + Config Block Length: (High priority) + Give information if config block is + present, and how long it is, if it exist. + If config block exist, read the config block and parse the + 'Length of the Extended Limits Configuration Block' for + extended configuration commands - Statistic map Size: (Low priority) - May be used to se if there is a Statistic Map. - It holds data on the utility power quality for - the past month and since last reset. Number of - times on battery and how long. Up time and utility - frequency deviation. (Only larger ups'es) + Statistic map Size: (Low priority) + May be used to se if there is a Statistic Map. + It holds data on the utility power quality for + the past month and since last reset. Number of + times on battery and how long. Up time and utility + frequency deviation. (Only larger ups'es) - Size of Alarm History Log: (Low priority) - See if it have any alarm history block and enable - command to dump it. + Size of Alarm History Log: (Low priority) + See if it have any alarm history block and enable + command to dump it. - Maximum Supported Command Length: ( Med. to High priority) - Give info about the ups receive buffer size. + Maximum Supported Command Length: ( Med. to High priority) + Give info about the ups receive buffer size. - Size of Alarm Block: ( Med. to High priority) - Make a smarter handling of the Active alarm's if we know the length - of the Active Alarm Block. Don't need the long loop to parse the - alarm's. Maybe use another way to set up the alarm struct in the - 'init_alarm_map'. + Size of Alarm Block: ( Med. to High priority) + Make a smarter handling of the Active alarm's if we know the length + of the Active Alarm Block. Don't need the long loop to parse the + alarm's. Maybe use another way to set up the alarm struct in the + 'init_alarm_map'. - Parse 'Communication Capabilities Block' ( Low priority) - Get info of the connected ports ID, number of baud rates, - command and respnse length. + Parse 'Communication Capabilities Block' ( Low priority) + Get info of the connected ports ID, number of baud rates, + command and respnse length. - Parse 'Communication Port List Block': ( Low priority) - This block gives info about the communication ports. Some ups'es - have multiple comport's, and use one port for eatch load segment. - In this block it is possible to get: - Number of ports. (In this List) - This Comport id (Which Comm Port is reporting this block.) - Comport id (Id for eatch port listed. The first comport ID=1) - Baudrate of the listed port. - Serial config. - Port usage: - What this Comm Port is being used for: - 0 = Unknown usage, No communication occurring. - 1 = Undefined / Unknown communication occurring - 2 = Waiting to communicate with a UPS - 3 = Communication established with a UPS - 4 = Waiting to communicate with software or adapter - 5 = Communication established software (e.g., LanSafe) - or adapter (e.g., ConnectUPS) - 6 = Communicating with a Display Device - 7 = Multi-drop Serial channel - 8 = Communicating with an Outlet Controller - Number of outlets. (Number of Outlets "assigned to" (controlled by) this Comm Port) - Outlet number. (Each assigned Outlet is listed (1-64)) + Parse 'Communication Port List Block': ( Low priority) + This block gives info about the communication ports. Some ups'es + have multiple comport's, and use one port for eatch load segment. + In this block it is possible to get: + Number of ports. (In this List) + This Comport id (Which Comm Port is reporting this block.) + Comport id (Id for eatch port listed. The first comport ID=1) + Baudrate of the listed port. + Serial config. + Port usage: + What this Comm Port is being used for: + 0 = Unknown usage, No communication occurring. + 1 = Undefined / Unknown communication occurring + 2 = Waiting to communicate with a UPS + 3 = Communication established with a UPS + 4 = Waiting to communicate with software or adapter + 5 = Communication established software (e.g., LanSafe) + or adapter (e.g., ConnectUPS) + 6 = Communicating with a Display Device + 7 = Multi-drop Serial channel + 8 = Communicating with an Outlet Controller + Number of outlets. (Number of Outlets "assigned to" (controlled by) this Comm Port) + Outlet number. (Each assigned Outlet is listed (1-64)) - 'Set outlet parameter command (0x97)' to alter the delay - settings or turn the outlet on or off with a delay (0 - 32767 seconds) + 'Set outlet parameter command (0x97)' to alter the delay + settings or turn the outlet on or off with a delay (0 - 32767 seconds) - Rewrite some parts of the driver, to minimise code duplication. (Like the instant commands) + Rewrite some parts of the driver, to minimise code duplication. (Like the instant commands) - Implement support for Password Authorization (XCP spec, §4.3.2) + Implement support for Password Authorization (XCP spec, §4.3.2) - Complete support for settable variables (upsh.setvar) + Complete support for settable variables (upsh.setvar) */ @@ -117,24 +117,26 @@ TODO List: #include "bcmxcp.h" #define DRIVER_NAME "BCMXCP UPS driver" -#define DRIVER_VERSION "0.28" +#define DRIVER_VERSION "0.30" #define MAX_NUT_NAME_LENGTH 128 #define NUT_OUTLET_POSITION 7 /* driver description structure */ upsdrv_info_t upsdrv_info = { - DRIVER_NAME, - DRIVER_VERSION, - "Martin Schroeder \n" \ - "Kjell Claesson \n" \ - "Tore Ørpetveit \n" \ - "Wolfgang Ocker \n" \ - "Oliver Wilcock\n" \ - "Prachi Gandhi \n" \ - "Alf Høgemark ", - DRV_STABLE, - { &comm_upsdrv_info, NULL } + DRIVER_NAME, + DRIVER_VERSION, + "Martin Schroeder \n" \ + "Kjell Claesson \n" \ + "Tore Ørpetveit \n" \ + "Arnaud Quette \n" \ + "Wolfgang Ocker \n" \ + "Oliver Wilcock\n" \ + "Prachi Gandhi \n" \ + "Alf Høgemark \n" \ + "Gavrilov Igor", + DRV_STABLE, + { &comm_upsdrv_info, NULL } }; static int get_word(const unsigned char*); @@ -146,6 +148,7 @@ static void init_alarm_map(void); static bool_t init_command(int size); static void init_config(void); static void init_limit(void); +static void init_ext_vars(void); static void init_topology(void); static void init_ups_meter_map(const unsigned char *map, unsigned char len); static void init_ups_alarm_map(const unsigned char *map, unsigned char len); @@ -156,18 +159,20 @@ static void init_system_test_capabilities(void); static int instcmd(const char *cmdname, const char *extra); static int setvar(const char *varname, const char *val); static int decode_instcmd_exec(const int res, const unsigned char exec_status, const char *cmdname, const char *success_msg); +static int decode_setvar_exec(const int res, const unsigned char exec_status, const char *cmdname, const char *success_msg); static float calculate_ups_load(const unsigned char *data); static const char *nut_find_infoval(info_lkp_t *xcp2info, const double value, const bool_t debug_output_nonexisting); const char *FreqTol[3] = {"+/-2%", "+/-5%", "+/-7"}; -const char *ABMStatus[4] = {"Charging", "Discharging", "Floating", "Resting"}; +const char *ABMStatus[4] = {"charging", "discharging", "floating", "resting"}; +const char *OutletStatus[9] = {"unknown","on/closed","off/open","on with pending","off with pending","unknown","unknown","failed and closed","failed and open"}; /* Standard Authorization Block */ unsigned char AUTHOR[4] = {0xCF, 0x69, 0xE8, 0xD5}; int nphases = 0; int outlet_block_len = 0; const char *cpu_name[5] = {"Cont:", "Inve:", "Rect:", "Netw:", "Disp:"}; - +const char *horn_stat[3] = {"disabled", "enabled", "muted"}; /* Battery test results */ @@ -214,6 +219,8 @@ info_lkp_t command_map_info[] = { { PW_INIT_BAT_TEST, "test.battery.start", NULL }, { PW_LOAD_OFF_RESTART, "shutdown.return", NULL }, { PW_UPS_OFF, "shutdown.stayoff", NULL }, + { PW_UPS_ON, "load.on", NULL}, + { PW_GO_TO_BYPASS, "bypass.start", NULL}, { 0, NULL, NULL } }; @@ -1003,7 +1010,8 @@ int init_outlet(unsigned char len) outlet_state = answer[iIndex++]; upsdebugx(2, "Outlet state: %d", outlet_state); snprintf(outlet_name, sizeof(outlet_name)-1, "outlet.%d.status", num); - dstate_setinfo(outlet_name, "%s", (outlet_state & 0x01 ? "On" : "Off")); + if (outlet_state>0 && outlet_state <9 ) + dstate_setinfo(outlet_name, "%s", OutletStatus[outlet_state] ); auto_dly_off = get_word(answer+iIndex); iIndex += 2; @@ -1025,10 +1033,91 @@ int init_outlet(unsigned char len) return num_outlet; } +void init_ext_vars(void) +{ + unsigned char answer[PW_ANSWER_MAX_SIZE],cbuf[5]; + int length=0,index=0; + + send_write_command(AUTHOR, 4); + + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + cbuf[0] = PW_SET_CONF_COMMAND; + cbuf[1] = PW_CONF_REQ; + cbuf[2] = 0x0; + cbuf[3] = 0x0; + + length=command_write_sequence(cbuf,4,answer); + if (length <= 0) + fatal_with_errno(EXIT_FAILURE, "Could not communicate with the ups"); + if (length < 4) //UPS dont have configurable vars + return; + for( index=3; index < length; index++) { + switch(answer[index]){ + case PW_CONF_LOW_DEV_LIMIT: dstate_setinfo("input.transfer.boost.high","%d",0); + dstate_setflags("input.transfer.boost.high", ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux("input.transfer.boost.high", 3); + break; + + case PW_CONF_HIGH_DEV_LIMIT: dstate_setinfo("input.transfer.trim.low","%d",0); + dstate_setflags("input.transfer.trim.low", ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux("input.transfer.trim.low", 3); + break; + + case PW_CONF_LOW_BATT: dstate_setinfo("battery.runtime.low","%d",0); + dstate_setflags("battery.runtime.low", ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux("battery.runtime.low", 2); + break; + + case PW_CONF_BEEPER: dstate_addcmd("beeper.disable"); + dstate_addcmd("beeper.enable"); + dstate_addcmd("beeper.mute"); + break; + + case PW_CONF_RETURN_DELAY: dstate_setinfo("input.transfer.delay","%d",0); + dstate_setflags("input.transfer.delay", ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux("input.transfer.delay", 5); + break; + + case PW_CONF_RETURN_CAP: dstate_setinfo("battery.charge.restart","%d",0); + dstate_setflags("battery.charge.restart", ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux("battery.charge.restart", 3); + break; + + case PW_CONF_MAX_TEMP: dstate_setinfo("ambient.temperature.high","%d",0); + dstate_setflags("ambient.temperature.high", ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux("ambient.temperature.high", 3); + break; + + case PW_CONF_NOMINAL_OUT_VOLTAGE: dstate_setinfo("output.voltage.nominal","%d",0); + dstate_setflags("output.voltage.nominal", ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux("output.voltage.nominal", 3); + break; + + case PW_CONF_SLEEP_TH_LOAD: dstate_setinfo("battery.energysave.load","%d",0); + dstate_setflags("battery.energysave.load", ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux("battery.energysave.load", 3); + break; + + case PW_CONF_SLEEP_DELAY: dstate_setinfo("battery.energysave.delay","%d",0); + dstate_setflags("battery.energysave.delay", ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux("battery.energysave.delay", 3); + break; + + case PW_CONF_BATT_STRINGS: dstate_setinfo("battery.packs","%d",0); + dstate_setflags("battery.packs", ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux("battery.packs", 1); + break; + + } + } +} + + void init_config(void) { unsigned char answer[PW_ANSWER_MAX_SIZE]; - int voltage = 0, frequency = 0, res; + int voltage = 0, frequency = 0, res, tmp=0; char sValue[17]; char sPartNumber[17]; @@ -1049,11 +1138,16 @@ void init_config(void) if (frequency != 0) dstate_setinfo("output.frequency.nominal", "%d", frequency); + /*Number of EBM*/ + tmp = (int) *(answer + BCMXCP_CONFIG_BLOCK_BATTERY_DATA_WORD3); + if (tmp != 0) + dstate_setinfo("battery.packs", "%d", tmp); + /* UPS serial number */ snprintf(sValue, sizeof(sValue), "%s", answer + BCMXCP_CONFIG_BLOCK_SERIAL_NUMBER); if(sValue[0] != '\0') dstate_setinfo("ups.serial", "%s", sValue); - + /* UPS Part Number*/ snprintf(sPartNumber, sizeof(sPartNumber), "%s", answer + BCMXCP_CONFIG_BLOCK_PART_NUMBER); if(sPartNumber[0] != '\0') @@ -1064,7 +1158,6 @@ void init_limit(void) { unsigned char answer[PW_ANSWER_MAX_SIZE]; int value, res; - const char *horn_stat[3] = {"disabled", "enabled", "muted"}; res = command_read_sequence(PW_LIMIT_BLOCK_REQ, answer); if (res <= 0) { @@ -1141,6 +1234,37 @@ void init_limit(void) if (value != 0) { dstate_setinfo("ambient.temperature.high", "%d", value); } + + /*Sleep minimum load*/ + value = answer[BCMXCP_EXT_LIMITS_BLOCK_SLEEP_TH_LOAD]; + if (value != 0) { + dstate_setinfo("battery.energysave.load", "%d", value); + } + + /* Sleep delay*/ + value = answer[BCMXCP_EXT_LIMITS_BLOCK_SLEEP_DELAY]; + if (value != 0) { + dstate_setinfo("battery.energysave.delay", "%d", value); + } + + /* Low batt minutes warning*/ + value = answer[BCMXCP_EXT_LIMITS_BLOCK_LOW_BATT_WARNING]; + if (value != 0) { + dstate_setinfo("battery.runtime.low", "%d", value); + } + + /* Return to mains delay */ + value = get_word(answer + BCMXCP_EXT_LIMITS_BLOCK_RETURN_STAB_DELAY); + if (value != 0) { + dstate_setinfo("input.transfer.delay","%d",value); + } + + /* Minimum return capacity*/ + value = answer[BCMXCP_EXT_LIMITS_BLOCK_BATT_CAPACITY_RETURN]; + if (value != 0) { + dstate_setinfo("battery.charge.restart","%d",value); + } + } void init_topology(void) @@ -1168,7 +1292,7 @@ void init_system_test_capabilities(void) /* Query what system test capabilities are supported */ send_write_command(AUTHOR, 4); - + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ cbuf[0] = PW_INIT_SYS_TEST; @@ -1322,7 +1446,6 @@ void upsdrv_initinfo(void) /* Size of custom event log, always 0 according to spec */ iIndex += 2; - /* Size of topology block */ topology_block_len = get_word(answer+iIndex); upsdebugx(2, "Length of topology block: %d\n", topology_block_len); @@ -1359,6 +1482,10 @@ void upsdrv_initinfo(void) for(res = 1 ; res <= len ; res++) { snprintf(outlet_name, sizeof(outlet_name)-1, "outlet.%d.shutdown.return", res); dstate_addcmd(outlet_name); + snprintf(outlet_name, sizeof(outlet_name)-1, "outlet.%d.load.on", res); + dstate_addcmd(outlet_name); + snprintf(outlet_name, sizeof(outlet_name)-1, "outlet.%d.load.off", res); + dstate_addcmd(outlet_name); } } @@ -1384,6 +1511,8 @@ void upsdrv_initinfo(void) if (bcmxcp_command_map[PW_INIT_SYS_TEST].command_byte > 0) { init_system_test_capabilities(); } + /* Get information about configurable external variables*/ + init_ext_vars(); upsh.instcmd = instcmd; upsh.setvar = setvar; @@ -1394,7 +1523,7 @@ void upsdrv_updateinfo(void) unsigned char answer[PW_ANSWER_MAX_SIZE]; unsigned char status, topology; char sValue[128]; - int iIndex, res; + int iIndex, res,value; bool_t has_ups_load = FALSE; int batt_status = 0; const char *nutvalue; @@ -1565,7 +1694,7 @@ void upsdrv_updateinfo(void) * 03 0a d7 25 42 0a d7 25 42 00 9a 19 6d 43 cd cc 4c 3e 01 00 01 03 */ upsdebug_hex(2, "Battery Status", answer, res); - batt_status = answer[0]; + batt_status = answer[BCMXCP_BATTDATA_BLOCK_BATT_TEST_STATUS]; if ((nutvalue = nut_find_infoval(batt_test_info, batt_status, TRUE)) != NULL) { dstate_setinfo("ups.test.result", "%s", nutvalue); @@ -1574,8 +1703,125 @@ void upsdrv_updateinfo(void) else { upsdebugx(1, "Failed to extract Battery Status from answer"); } + + /*Extracting internal batteries ABM status*/ + /*Placed first in ABM statuses list. For examples above - on position BCMXCP_BATTDATA_BLOCK_NUMBER_OF_STRINGS (18): + PW5115RM - 0 - no external strings, no status bytes, + so next byte (19) - number of ABM statuses, next (20) - first ABM Status for internal batteries. + + PW9130 - 1 - one external string, so one additional status byte (#19 - 00 - no test run), next(20) - number of ABM statuses, + next (21) - ABM Status for internal batteries. + */ + value=*(answer + BCMXCP_BATTDATA_BLOCK_NUMBER_OF_STRINGS + *(answer + BCMXCP_BATTDATA_BLOCK_NUMBER_OF_STRINGS)*1+2 ); + upsdebugx(2, "ABM Status = %d ",value); + if (value > 0 && value < 5) + dstate_setinfo("battery.charger.status","%s",ABMStatus[value-1]); } + + res = command_read_sequence(PW_LIMIT_BLOCK_REQ, answer); + if (res <= 0) { + upsdebugx(1, "Failed to read EXT LIMITs from UPS"); + } else + { + /* Nominal input voltage */ + value = get_word((answer + BCMXCP_EXT_LIMITS_BLOCK_NOMINAL_INPUT_VOLTAGE)); + + if (value != 0) { + dstate_setinfo("input.voltage.nominal", "%d", value); + } + + /* Bypass Voltage Low Deviation Limit / Transfer to Boost Voltage */ + value = get_word((answer + BCMXCP_EXT_LIMITS_BLOCK_VOLTAGE_LOW_DEV_LIMIT)); + + if (value != 0) { + dstate_setinfo("input.transfer.boost.high", "%d", value); + } + + /* Bypass Voltage High Deviation Limit / Transfer to Buck Voltage */ + value = get_word((answer + BCMXCP_EXT_LIMITS_BLOCK_VOLTAGE_HIGE_DEV_LIMIT)); + + if (value != 0) { + dstate_setinfo("input.transfer.trim.low", "%d", value); + } + + /* Minimum Supported Input Voltage */ + value = get_word((answer + BCMXCP_EXT_LIMITS_BLOCK_MIN_INPUT_VOLTAGE)); + + if (value != 0) { + dstate_setinfo("input.transfer.low", "%d", value); + } + + /* Maximum Supported Input Voltage */ + value = get_word((answer + BCMXCP_EXT_LIMITS_BLOCK_MAX_INPUT_VOLTAGE)); + + if (value != 0) { + dstate_setinfo("input.transfer.high", "%d", value); + } + + /* Horn Status: */ + value = answer[BCMXCP_EXT_LIMITS_BLOCK_HORN_STATUS]; + + if (value >= 0 && value <= 2) { + dstate_setinfo("ups.beeper.status", "%s", horn_stat[value]); + } + /* AAmbient Temperature Upper Alarm Limit */ + value = answer[BCMXCP_EXT_LIMITS_BLOCK_AMBIENT_TEMP_HIGE]; + + if (value != 0) { + dstate_setinfo("ambient.temperature.high", "%d", value); + } + + /*Sleep minimum load*/ + value = answer[BCMXCP_EXT_LIMITS_BLOCK_SLEEP_TH_LOAD]; + if (value != 0) { + dstate_setinfo("battery.energysave.load", "%d", value); + } + + /* Sleep delay*/ + value = answer[BCMXCP_EXT_LIMITS_BLOCK_SLEEP_DELAY]; + if (value != 0) { + dstate_setinfo("battery.energysave.delay", "%d", value); + } + + /* Low batt minutes warning*/ + value = answer[BCMXCP_EXT_LIMITS_BLOCK_LOW_BATT_WARNING]; + if (value != 0) { + dstate_setinfo("battery.runtime.low", "%d", value); + } + + /* Return to mains delay */ + value = get_word(answer + BCMXCP_EXT_LIMITS_BLOCK_RETURN_STAB_DELAY); + if (value != 0) { + dstate_setinfo("input.transfer.delay","%d",value); + } + + /* Minimum return capacity*/ + value = answer[BCMXCP_EXT_LIMITS_BLOCK_BATT_CAPACITY_RETURN]; + if (value != 0) { + dstate_setinfo("battery.charge.restart","%d",value); + } + }; + + res = command_read_sequence(PW_CONFIG_BLOCK_REQ, answer); + if (res <= 0) { + upsdebugx(1, "Failed to read CONF BLOCK from UPS"); + } + else + { + /*Nominal output voltage*/ + value = get_word((answer + BCMXCP_CONFIG_BLOCK_NOMINAL_OUTPUT_VOLTAGE)); + + if (value != 0) + dstate_setinfo("output.voltage.nominal", "%d", value); + /*Number of EBM*/ + value = (int) *(answer + BCMXCP_CONFIG_BLOCK_BATTERY_DATA_WORD3); + if (value != 0) + dstate_setinfo("battery.packs", "%d", value); + + } + + dstate_dataok(); } @@ -1634,41 +1880,14 @@ static int instcmd(const char *cmdname, const char *extra) { unsigned char answer[128], cbuf[6]; char success_msg[40]; + char namebuf[MAX_NUT_NAME_LENGTH]; char varname[32]; const char *varvalue = NULL; - int res, sec; + int res, sec, outlet_num; int sddelay = 0x03; /* outlet off in 3 seconds, by default */ upsdebugx(1, "entering instcmd(%s)", cmdname); - /* ojw0000 outlet power cycle for PW5125 and perhaps others */ - if (!strcasecmp(cmdname, "outlet.1.shutdown.return") - || !strcasecmp(cmdname, "outlet.2.shutdown.return") - || !strcasecmp(cmdname, "outlet.3.shutdown.return") - ) { - send_write_command(AUTHOR, 4); - - sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ - - /* Get the shutdown delay, if any */ - snprintf(varname, sizeof(varname)-1, "outlet.%c.delay.shutdown", cmdname[7]); - if ((varvalue = dstate_getinfo(varname)) != NULL) { - sddelay = atoi(varvalue); - } - - cbuf[0] = PW_LOAD_OFF_RESTART; - cbuf[1] = sddelay & 0xff; - cbuf[2] = sddelay >> 8; /* high byte of the 2 byte time argument */ - cbuf[3] = cmdname[7] - '0'; /* which outlet load segment? Assumes outlet number at position 8 of the command string. */ - - res = command_write_sequence(cbuf, 4, answer); - - sec = (256 * (unsigned char)answer[3]) + (unsigned char)answer[2]; - snprintf(success_msg, sizeof(success_msg)-1, "Going down in %d sec", sec); - - return decode_instcmd_exec(res, (unsigned char)answer[0], cmdname, success_msg); - } /* ojw0000 end outlet power cycle */ - if (!strcasecmp(cmdname, "shutdown.return")) { send_write_command(AUTHOR, 4); @@ -1696,6 +1915,26 @@ static int instcmd(const char *cmdname, const char *extra) return decode_instcmd_exec(res, (unsigned char)answer[0], cmdname, "Going down NOW"); } + if (!strcasecmp(cmdname, "load.on")) { + send_write_command(AUTHOR, 4); + + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + res = command_read_sequence(PW_UPS_ON, answer); + + return decode_instcmd_exec(res, (unsigned char)answer[0], cmdname, "Enabling"); + } + + if (!strcasecmp(cmdname, "bypass.start")) { + send_write_command(AUTHOR, 4); + + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + res = command_read_sequence(PW_GO_TO_BYPASS, answer); + + return decode_instcmd_exec(res, (unsigned char)answer[0], cmdname, "Bypass enabled"); + } + /* Note: test result will be parsed from Battery status block, * part of the update loop, and published into ups.test.result */ @@ -1716,11 +1955,11 @@ static int instcmd(const char *cmdname, const char *extra) answer from the test. Or return, as we may lose line power and need to do a shutdown.*/ - } - + } + if (!strcasecmp(cmdname, "test.system.start")) { send_write_command(AUTHOR, 4); - + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ cbuf[0] = PW_INIT_SYS_TEST; @@ -1732,7 +1971,7 @@ static int instcmd(const char *cmdname, const char *extra) if (!strcasecmp(cmdname, "test.panel.start")) { send_write_command(AUTHOR, 4); - + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ cbuf[0] = PW_INIT_SYS_TEST; @@ -1741,6 +1980,93 @@ static int instcmd(const char *cmdname, const char *extra) res = command_write_sequence(cbuf, 3, answer); return decode_instcmd_exec(res, (unsigned char)answer[0], cmdname, "Testing panel now"); + } + + if (!strcasecmp(cmdname, "beeper.disable") || !strcasecmp(cmdname, "beeper.enable") || !strcasecmp(cmdname, "beeper.mute")) { + send_write_command(AUTHOR, 4); + + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + cbuf[0] = PW_SET_CONF_COMMAND; + cbuf[1] = PW_CONF_BEEPER; + switch (cmdname[7]){ + + case 'd': + case 'D': { + cbuf[2] = 0x0; /*disable beeper*/ + break; + } + case 'e': + case 'E': { + cbuf[2] = 0x1; /*enable beeper*/ + break; + } + case 'm': + case 'M': { + cbuf[2] = 0x2; + break; /*mute beeper*/ + } + } + cbuf[3] = 0x0; /*padding*/ + + res = command_write_sequence(cbuf, 4, answer); + return decode_instcmd_exec(res, (unsigned char)answer[0], cmdname, "Beeper status changed"); + } + + strncpy(namebuf, cmdname, sizeof(namebuf)); + namebuf[NUT_OUTLET_POSITION] = 'n'; /* Assumes a maximum of 9 outlets */ + + if (!strcasecmp(namebuf, "outlet.n.shutdown.return")) { + send_write_command(AUTHOR, 4); + + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + /* Get the shutdown delay, if any */ + snprintf(varname, sizeof(varname)-1, "outlet.%c.delay.shutdown", cmdname[NUT_OUTLET_POSITION]); + if ((varvalue = dstate_getinfo(varname)) != NULL) { + sddelay = atoi(varvalue); + } + + /*if -1 then use global shutdown_delay from ups.conf*/ + if (sddelay == -1) sddelay=bcmxcp_status.shutdowndelay; + + outlet_num = cmdname[NUT_OUTLET_POSITION] - '0'; + if (outlet_num < 1 || outlet_num > 9) + return STAT_INSTCMD_FAILED; + + cbuf[0] = PW_LOAD_OFF_RESTART; + cbuf[1] = sddelay & 0xff; + cbuf[2] = sddelay >> 8; /* high byte of the 2 byte time argument */ + cbuf[3] = outlet_num; /* which outlet load segment? Assumes outlet number at position 8 of the command string. */ + + res = command_write_sequence(cbuf, 4, answer); + + sec = (256 * (unsigned char)answer[3]) + (unsigned char)answer[2]; + snprintf(success_msg, sizeof(success_msg)-1, "Going down in %d sec", sec); + + return decode_instcmd_exec(res, (unsigned char)answer[0], cmdname, success_msg); + } + + if (!strcasecmp(namebuf,"outlet.n.load.on") || !strcasecmp(namebuf,"outlet.n.load.off")){ + send_write_command(AUTHOR, 4); + + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + outlet_num = cmdname[NUT_OUTLET_POSITION] - '0'; + if (outlet_num < 1 || outlet_num > 9) + return STAT_INSTCMD_FAILED; + + + cbuf[0] = (cmdname[NUT_OUTLET_POSITION+8] == 'n')?PW_UPS_ON:PW_UPS_OFF; /* Cmd oN or not*/ + cbuf[1] = outlet_num; /* Outlet number */ + + res = command_write_sequence(cbuf, 2, answer); + snprintf(success_msg, sizeof(success_msg)-1, "Outlet %d is %s",outlet_num, (cmdname[NUT_OUTLET_POSITION+8] == 'n')?"On":"Off"); + + return decode_instcmd_exec(res, (unsigned char)answer[0], cmdname, success_msg); + + + } upslogx(LOG_NOTICE, "instcmd: unknown command [%s]", cmdname); @@ -1813,99 +2139,337 @@ int setvar (const char *varname, const char *val) { unsigned char answer[128], cbuf[5]; char namebuf[MAX_NUT_NAME_LENGTH]; - int res, sec, outlet_num; + char success_msg[50]; + int res, sec, outlet_num,tmp; int onOff_setting = PW_AUTO_OFF_DELAY; upsdebugx(1, "entering setvar(%s, %s)", varname, val); + if (!strcasecmp(varname, "input.transfer.boost.high")) { + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + tmp=atoi(val); + if (tmp < 0 || tmp > 460) { + return STAT_SET_INVALID; + } + + cbuf[0]=PW_SET_CONF_COMMAND; + cbuf[1]=PW_CONF_LOW_DEV_LIMIT; + cbuf[2]=tmp&0xff; + cbuf[3]=tmp>>8; + + res = command_write_sequence(cbuf, 4, answer); + snprintf(success_msg, sizeof(success_msg)-1, " BOOST threshold volage set to %d V", tmp); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + + + } + + if (!strcasecmp(varname, "input.transfer.trim.low")) { + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + tmp=atoi(val); + if (tmp < 110 || tmp > 540) { + return STAT_SET_INVALID; + } + + cbuf[0]=PW_SET_CONF_COMMAND; + cbuf[1]=PW_CONF_HIGH_DEV_LIMIT; + cbuf[2]=tmp&0xff; + cbuf[3]=tmp>>8; + + res = command_write_sequence(cbuf, 4, answer); + snprintf(success_msg, sizeof(success_msg)-1, " TRIM threshold volage set to %d V", tmp); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + + } + + if (!strcasecmp(varname, "battery.runtime.low")) { + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + tmp=atoi(val); + if (tmp < 0 || tmp > 30) { + return STAT_SET_INVALID; + } + + cbuf[0]=PW_SET_CONF_COMMAND; + cbuf[1]=PW_CONF_LOW_BATT; + cbuf[2]=tmp; + cbuf[3]=0x0; + + res = command_write_sequence(cbuf, 4, answer); + snprintf(success_msg, sizeof(success_msg)-1, " Low battery warning time set to %d min", tmp); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + + } + + if (!strcasecmp(varname, "input.transfer.delay")) { + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + tmp=atoi(val); + if (tmp < 1 || tmp > 18000 ) { + return STAT_SET_INVALID; + } + + cbuf[0]=PW_SET_CONF_COMMAND; + cbuf[1]=PW_CONF_RETURN_DELAY; + cbuf[2]=tmp&0xff; + cbuf[3]=tmp>>8; + + res = command_write_sequence(cbuf, 4, answer); + snprintf(success_msg, sizeof(success_msg)-1, " Mains return delay set to %d sec", tmp); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + + } + + if (!strcasecmp(varname, "battery.charge.restart")) { + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + tmp=atoi(val); + if (tmp < 0 || tmp > 100 ) { + return STAT_SET_INVALID; + } + + cbuf[0]=PW_SET_CONF_COMMAND; + cbuf[1]=PW_CONF_RETURN_CAP; + cbuf[2]=tmp&0xff; + cbuf[3]=0x0; + + res = command_write_sequence(cbuf, 4, answer); + snprintf(success_msg, sizeof(success_msg)-1, " Mains return minimum battery capacity set to %d %%", tmp); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + + } + + + if (!strcasecmp(varname, "ambient.temperature.high")) { + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + tmp=atoi(val); + if (tmp < 0 || tmp > 100 ) { + return STAT_SET_INVALID; + } + + cbuf[0]=PW_SET_CONF_COMMAND; + cbuf[1]=PW_CONF_MAX_TEMP; + cbuf[2]=tmp&0xff; + cbuf[3]=0x0; + + res = command_write_sequence(cbuf, 4, answer); + snprintf(success_msg, sizeof(success_msg)-1, " Maximum temperature set to %d C", tmp); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + + } + + if (!strcasecmp(varname, "output.voltage.nominal")) { + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + tmp=atoi(val); + if (tmp < 0 || tmp > 460) { + return STAT_SET_INVALID; + } + + cbuf[0]=PW_SET_CONF_COMMAND; + cbuf[1]=PW_CONF_NOMINAL_OUT_VOLTAGE; + cbuf[2]=tmp&0xff; + cbuf[3]=tmp>>8; + + res = command_write_sequence(cbuf, 4, answer); + snprintf(success_msg, sizeof(success_msg)-1, " Nominal output voltage set to %d V", tmp); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + + } + + if (!strcasecmp(varname, "battery.energysave.load")) { + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + tmp=atoi(val); + if (tmp < 0 || tmp > 100) { + return STAT_SET_INVALID; + } + + cbuf[0]=PW_SET_CONF_COMMAND; + cbuf[1]=PW_CONF_SLEEP_TH_LOAD; + cbuf[2]=tmp&0xff; + cbuf[3]=0x0; + + res = command_write_sequence(cbuf, 4, answer); + snprintf(success_msg, sizeof(success_msg)-1, " Minimum load before sleep countdown set to %d %%", tmp); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + + + } + + + if (!strcasecmp(varname, "battery.energysave.delay")) { + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + tmp=atoi(val); + if (tmp < 0 || tmp > 255) { + return STAT_SET_INVALID; + } + + cbuf[0]=PW_SET_CONF_COMMAND; + cbuf[1]=PW_CONF_SLEEP_DELAY; + cbuf[2]=tmp&0xff; + cbuf[3]=0x0; + + res = command_write_sequence(cbuf, 4, answer); + snprintf(success_msg, sizeof(success_msg)-1, " Delay before sleep shutdown set to %d min", tmp); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + + + } + + if (!strcasecmp(varname, "battery.packs")) { + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + tmp=atoi(val); + if (tmp < 0 || tmp > 5) { + return STAT_SET_INVALID; + } + + cbuf[0]=PW_SET_CONF_COMMAND; + cbuf[1]=PW_CONF_BATT_STRINGS; + cbuf[2]=tmp; + cbuf[3]=0x0; + + res = command_write_sequence(cbuf, 4, answer); + snprintf(success_msg, sizeof(success_msg)-1, "EBM Count set to %d ", tmp); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + + + } + strncpy(namebuf, varname, sizeof(namebuf)); namebuf[NUT_OUTLET_POSITION] = 'n'; /* Assumes a maximum of 9 outlets */ - if ( (strcasecmp(namebuf, "outlet.n.delay.start")) && - (strcasecmp(namebuf, "outlet.n.delay.shutdown")) ) { - return STAT_SET_UNKNOWN; + if ( (!strcasecmp(namebuf, "outlet.n.delay.start")) || + (!strcasecmp(namebuf, "outlet.n.delay.shutdown")) ) { + + + if (outlet_block_len <= 8) { + return STAT_SET_INVALID; + } + + if (!strcasecmp(namebuf, "outlet.n.delay.start")) { + onOff_setting = PW_AUTO_ON_DELAY; + } + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + outlet_num = varname[NUT_OUTLET_POSITION] - '0'; + if (outlet_num < 1 || outlet_num > 9) { + return STAT_SET_INVALID; + } + + sec = atoi(val); + /* Check value: + * 0-32767 are valid values + * -1 means no Automatic off or restart + * for Auto Off Delay: + * 0-30 are valid but ill-advised */ + if (sec < -1 || sec > 0x7FFF) { + return STAT_SET_INVALID; + } + + cbuf[0] = PW_SET_OUTLET_COMMAND; /* Cmd */ + cbuf[1] = onOff_setting; /* Set Auto Off (1) or On (2) Delay */ + cbuf[2] = outlet_num; /* Outlet number */ + cbuf[3] = sec&0xff; /* Delay in seconds LSB */ + cbuf[4] = sec>>8; /* Delay in seconds MSB */ + + res = command_write_sequence(cbuf, 5, answer); + snprintf(success_msg, sizeof(success_msg)-1, "Outlet %d %s delay set to %d sec", + outlet_num, (onOff_setting == PW_AUTO_ON_DELAY)?"start":"shutdown", sec); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + } - if (outlet_block_len <= 8) { - return STAT_SET_INVALID; - } + return STAT_SET_INVALID; +} - if (!strcasecmp(namebuf, "outlet.n.delay.start")) { - onOff_setting = PW_AUTO_ON_DELAY; - } - - send_write_command(AUTHOR, 4); - sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ - - outlet_num = varname[NUT_OUTLET_POSITION] - '0'; - if (outlet_num < 1 || outlet_num > 9) { - return STAT_SET_INVALID; - } - - sec = atoi(val); - /* Check value: - * 0-32767 are valid values - * -1 means no Automatic off or restart - * for Auto Off Delay: - * 0-30 are valid but ill-advised */ - if (sec < -1 || sec > 0x7FFF) { - return STAT_SET_INVALID; - } - - cbuf[0] = PW_SET_OUTLET_COMMAND; /* Cmd */ - cbuf[1] = onOff_setting; /* Set Auto Off (1) or On (2) Delay */ - cbuf[2] = outlet_num; /* Outlet number */ - cbuf[3] = sec&0xff; /* Delay in seconds LSB */ - cbuf[4] = sec>>8; /* Delay in seconds MSB */ - - res = command_write_sequence(cbuf, 5, answer); +static int decode_setvar_exec(const int res, const unsigned char exec_status, const char *cmdname, const char *success_msg) +{ if (res <= 0) { - upslogx(LOG_ERR, "Short read from UPS"); + upslogx(LOG_ERR, "[%s] Short read from UPS", cmdname); dstate_datastale(); - return -1; + return STAT_SET_FAILED; } - switch ((unsigned char) answer[0]) { + /* Decode the status code from command execution */ + switch (exec_status) { case BCMXCP_RETURN_ACCEPTED: { - upslogx(LOG_NOTICE,"Outlet %d %s delay set to %d sec", - outlet_num, (onOff_setting == PW_AUTO_ON_DELAY)?"start":"shutdown", sec); - dstate_setinfo(varname, "%d", sec); + upslogx(LOG_NOTICE, "[%s] %s", cmdname, success_msg); upsdrv_comm_good(); return STAT_SET_HANDLED; break; } case BCMXCP_RETURN_ACCEPTED_PARAMETER_ADJUST: { - upslogx(LOG_NOTICE,"Outlet %d %s delay set, but UPS adjusted parameter %d sec", - outlet_num, (onOff_setting == PW_AUTO_ON_DELAY)?"start":"shutdown", sec); - dstate_setinfo(varname, "%d", sec); + upslogx(LOG_NOTICE, "[%s] Parameter adjusted", cmdname); + upslogx(LOG_NOTICE, "[%s] %s", cmdname, success_msg); upsdrv_comm_good(); return STAT_SET_HANDLED; break; } case BCMXCP_RETURN_BUSY: { - upslogx(LOG_NOTICE, "Set [%s] failed due to UPS busy", varname); - /* TODO: we should probably retry... */ - return STAT_SET_UNKNOWN; - break; - } - case BCMXCP_RETURN_PARAMETER_OUT_OF_RANGE: { - upslogx(LOG_NOTICE, "Set [%s %s] failed due to parameter out of range", varname, val); - return STAT_SET_UNKNOWN; - break; - } - case BCMXCP_RETURN_INVALID_PARAMETER: { - upslogx(LOG_NOTICE, "Set [%s %s] failed due to invalid parameter", varname, val); - return STAT_SET_UNKNOWN; - break; - } - default: { - upslogx(LOG_NOTICE, "Set [%s] not supported", varname); + upslogx(LOG_NOTICE, "[%s] Busy or disbled by front panel", cmdname); return STAT_SET_FAILED; break; } + case BCMXCP_RETURN_UNRECOGNISED: { + upslogx(LOG_NOTICE, "[%s] Unrecognised command byte or corrupt checksum", cmdname); + return STAT_SET_FAILED; + break; + } + case BCMXCP_RETURN_INVALID_PARAMETER: { + upslogx(LOG_NOTICE, "[%s] Invalid parameter", cmdname); + return STAT_SET_INVALID; + break; + } + case BCMXCP_RETURN_PARAMETER_OUT_OF_RANGE: { + upslogx(LOG_NOTICE, "[%s] Parameter out of range", cmdname); + return STAT_SET_INVALID; + break; + } + default: { + upslogx(LOG_NOTICE, "[%s] Not supported", cmdname); + return STAT_SET_INVALID; + break; + } } - - return STAT_SET_INVALID; } /******************************* @@ -1934,4 +2498,3 @@ static const char *nut_find_infoval(info_lkp_t *xcp2info, const double value, co } return NULL; } - diff --git a/drivers/bcmxcp.h b/drivers/bcmxcp.h index 7d24f76..90c690c 100644 --- a/drivers/bcmxcp.h +++ b/drivers/bcmxcp.h @@ -77,6 +77,22 @@ #define PW_TURN_OFF_DELAY 3 #define PW_TURN_ON_DELAY 4 +/* Config vars*/ +#define PW_CONF_BYPASS_FREQ_DEV_LIMIT 0x01 +#define PW_CONF_LOW_DEV_LIMIT 0x02 +#define PW_CONF_HIGH_DEV_LIMIT 0x03 +#define PW_CONF_PHASE_DEV_LIMIT 0x04 +#define PW_CONF_LOW_BATT 0x05 +#define PW_CONF_BEEPER 0x06 +#define PW_CONF_RETURN_DELAY 0x07 +#define PW_CONF_RETURN_CAP 0x08 +#define PW_CONF_MAX_TEMP 0x0a +#define PW_CONF_NOMINAL_OUT_VOLTAGE 0x0b +#define PW_CONF_SLEEP_TH_LOAD 0x0d +#define PW_CONF_SLEEP_DELAY 0x0e +#define PW_CONF_BATT_STRINGS 0x0f +#define PW_CONF_REQ 0xff + /* Config block offsets */ #define BCMXCP_CONFIG_BLOCK_MACHINE_TYPE_CODE 0 #define BCMXCP_CONFIG_BLOCK_MODEL_NUMBER 2 @@ -97,6 +113,18 @@ #define BCMXCP_CONFIG_BLOCK_PART_NUMBER 48 #define BCMXCP_CONFIG_BLOCK_SERIAL_NUMBER 64 +/*Battery block offsets*/ + +#define BCMXCP_BATTDATA_BLOCK_BATT_TEST_STATUS 0 +#define BCMXCP_BATTDATA_BLOCK_BATT_VOLTS_T1 1 +#define BCMXCP_BATTDATA_BLOCK_BATT_VOLTS_T2 5 +#define BCMXCP_BATTDATA_BLOCK_TEST_DURATION 9 +#define BCMXCP_BATTDATA_BLOCK_UTIL_VOLT 10 +#define BCMXCP_BATTDATA_BLOCK_INPUT_CURRENT 14 +#define BCMXCP_BATTDATA_BLOCK_NUMBER_OF_STRINGS 18 +/*BATT_TEST_STATUS for external strings (1 byte each) if BCMXCP_BATTDATA_BLOCK_NUMBER_OF_STRINGS == 0 no external test statuses at all*/ +/*next - number of ABM Statuses - at least 1 for internal batteries*/ + /* Index for Extende Limits block offsets */ #define BCMXCP_EXT_LIMITS_BLOCK_NOMINAL_INPUT_VOLTAGE 0 #define BCMXCP_EXT_LIMITS_BLOCK_NOMINAL_INPUT_FREQ 2 @@ -114,6 +142,8 @@ #define BCMXCP_EXT_LIMITS_BLOCK_BATT_CAPACITY_RETURN 24 #define BCMXCP_EXT_LIMITS_BLOCK_AMBIENT_TEMP_LOW 25 #define BCMXCP_EXT_LIMITS_BLOCK_AMBIENT_TEMP_HIGE 26 +#define BCMXCP_EXT_LIMITS_BLOCK_SLEEP_TH_LOAD 29 +#define BCMXCP_EXT_LIMITS_BLOCK_SLEEP_DELAY 30 /* Indexes for meter map */ #define BCMXCP_METER_MAP_OUTPUT_VOLTS_AB 0 /* mapped */ diff --git a/drivers/belkin-hid.c b/drivers/belkin-hid.c index 212d6f3..5396d62 100644 --- a/drivers/belkin-hid.c +++ b/drivers/belkin-hid.c @@ -29,20 +29,20 @@ #include "belkin-hid.h" #include "usb-common.h" -#define BELKIN_HID_VERSION "Belkin HID 0.16" +#define BELKIN_HID_VERSION "Belkin/Liebert HID 0.17" /* Belkin */ #define BELKIN_VENDORID 0x050d /* Liebert */ #define LIEBERT_VENDORID 0x10af -/* Note that there are at least two Liebert firmware types which both report + +/*! USB IDs device table. + * Note that there are at least two Liebert firmware types which both report * a VID:PID of 10af:0001. The newer ones tend not to have the Belkin broken * Usage Pages (and therefore use standard HID PDC paths) but they have * incorrect exponents for some fields. */ - -/* USB IDs device table */ static usb_device_id_t belkin_usb_device_table[] = { /* F6C800-UNV */ { USB_DEVICE(BELKIN_VENDORID, 0x0980), NULL }, @@ -60,6 +60,8 @@ static usb_device_id_t belkin_usb_device_table[] = { { USB_DEVICE(BELKIN_VENDORID, 0x0751), NULL }, /* F6H375-USB */ { USB_DEVICE(BELKIN_VENDORID, 0x0375), NULL }, + /* Regulator PRO-USB */ + { USB_DEVICE(BELKIN_VENDORID, 0x0f51), NULL }, /* F6C1100-UNV, F6C1200-UNV */ { USB_DEVICE(BELKIN_VENDORID, 0x1100), NULL }, @@ -67,6 +69,8 @@ static usb_device_id_t belkin_usb_device_table[] = { { USB_DEVICE(LIEBERT_VENDORID, 0x0001), NULL }, /* Liebert PowerSure PSI 1440 */ { USB_DEVICE(LIEBERT_VENDORID, 0x0004), NULL }, + /* Liebert GXT3 */ + { USB_DEVICE(LIEBERT_VENDORID, 0x0008), NULL }, /* Terminating entry */ { -1, -1, NULL } @@ -521,6 +525,22 @@ static hid_info_t belkin_hid2nut[] = { yet implemented) workaround, see the belkinunv(8) man page. -PS 2005/08/28 */ +#if 0 + /* added for debugging Liebert GXT3 : */ + { "unmapped.ups.powersummary.iserialnumber", 0, 0, "UPS.PowerSummary.iSerialNumber", NULL, "%.0f", 0, NULL }, + { "unmapped.ups.powersummary.imanufacturer", 0, 0, "UPS.PowerSummary.iManufacturer", NULL, "%.0f", 0, NULL }, + { "unmapped.ups.powersummary.ioeminformation", 0, 0, "UPS.PowerSummary.iOEMInformation", NULL, "%s", 0, stringid_conversion }, + { "unmapped.ups.powersummary.designcapacity", 0, 0, "UPS.PowerSummary.DesignCapacity", NULL, "%.0f", 0, NULL }, + { "unmapped.ups.powersummary.remainingtimelimit", 0, 0, "UPS.PowerSummary.RemainingTimeLimit", NULL, "%.0f", 0, NULL }, + { "unmapped.ups.powersummary.capacitymode", 0, 0, "UPS.PowerSummary.CapacityMode", NULL, "%.0f", 0, NULL }, + { "unmapped.ups.powersummary.rechargeable", 0, 0, "UPS.PowerSummary.Rechargeable", NULL, "%.0f", 0, NULL }, + { "unmapped.ups.powersummary.batterypresent", 0, 0, "UPS.PowerSummary.BatteryPresent", NULL, "%.0f", 0, NULL }, + { "unmapped.ups.powersummary.fullchargecapacity", 0, 0, "UPS.PowerSummary.FullChargeCapacity", NULL, "%.0f", 0, NULL }, + { "unmapped.ups.powersummary.capacitygranularity1", 0, 0, "UPS.PowerSummary.CapacityGranularity1", NULL, "%.0f", 0, NULL }, + { "unmapped.ups.powersummary.capacitygranularity2", 0, 0, "UPS.PowerSummary.CapacityGranularity2", NULL, "%.0f", 0, NULL }, + { "unmapped.ups.powersummary.iproduct", 0, 0, "UPS.PowerSummary.iProduct", NULL, "%.0f", 0, NULL }, +#endif + /* end of structure. */ { NULL, 0, 0, NULL, NULL, NULL, 0, NULL } }; diff --git a/drivers/blazer_usb.c b/drivers/blazer_usb.c index 7ba4df2..14d2af9 100644 --- a/drivers/blazer_usb.c +++ b/drivers/blazer_usb.c @@ -498,14 +498,7 @@ void upsdrv_help(void) void upsdrv_makevartable(void) { addvar(VAR_VALUE, "subdriver", "Serial-over-USB subdriver selection"); - addvar(VAR_VALUE, "vendorid", "Regular expression to match UPS Manufacturer numerical ID (4 digits hexadecimal)"); - addvar(VAR_VALUE, "productid", "Regular expression to match UPS Product numerical ID (4 digits hexadecimal)"); - - addvar(VAR_VALUE, "vendor", "Regular expression to match UPS Manufacturer string"); - addvar(VAR_VALUE, "product", "Regular expression to match UPS Product string"); - addvar(VAR_VALUE, "serial", "Regular expression to match UPS Serial number"); - - addvar(VAR_VALUE, "bus", "Regular expression to match USB bus name"); + nut_usb_addvars(); addvar(VAR_VALUE, "langid_fix", "Apply the language ID workaround to the krauler subdriver (0x409 or 0x4095)"); diff --git a/drivers/compaq-mib.c b/drivers/compaq-mib.c index fc9fdd9..a4eacc0 100644 --- a/drivers/compaq-mib.c +++ b/drivers/compaq-mib.c @@ -83,15 +83,19 @@ #define CPQPOWER_OID_ALARM_LB ".1.3.6.1.4.1.232.165.3.7.4.0" /* UPS-MIB::upsLowBattery */ +/* Not used, as no longer supported by MIB ver. 1.76 (Github issue 118) static info_lkp_t cpqpower_alarm_ob[] = { { 1, "OB" }, { 0, "NULL" } -} ; +}; +*/ +/* Not used, as no longer supported by MIB ver. 1.76 (Github issue 118) static info_lkp_t cpqpower_alarm_lb[] = { { 1, "LB" }, { 0, "NULL" } -} ; +}; +*/ /* Defines for CPQPOWER_OID_POWER_STATUS (1) */ static info_lkp_t cpqpower_pwr_info[] = { diff --git a/drivers/cps-hid.c b/drivers/cps-hid.c index a6d64ba..78c952f 100644 --- a/drivers/cps-hid.c +++ b/drivers/cps-hid.c @@ -28,29 +28,36 @@ #include "cps-hid.h" #include "usb-common.h" -#define CPS_HID_VERSION "CyberPower HID 0.3" +#define CPS_HID_VERSION "CyberPower HID 0.4" /* Cyber Power Systems */ #define CPS_VENDORID 0x0764 -/* +/*! Battery voltage scale factor. * For some devices, the reported battery voltage is off by factor * of 1.5 so we need to apply a scale factor to it to get the real * battery voltage. By default, the factor is 1 (no scaling). */ static double battery_scale = 1; +static int might_need_battery_scale = 0; +static int battery_scale_checked = 0; + +/*! If the ratio of the battery voltage to the nominal battery voltage exceeds + * this factor, we assume that the battery voltage needs to be scaled by 2/3. + */ +static const double battery_voltage_sanity_check = 1.4; static void *cps_battery_scale(USBDevice_t *device) { - battery_scale = 0.667; + might_need_battery_scale = 1; return NULL; } /* USB IDs device table */ static usb_device_id_t cps_usb_device_table[] = { - /* 900AVR/BC900D, CP1200AVR/BC1200D */ + /* 900AVR/BC900D */ { USB_DEVICE(CPS_VENDORID, 0x0005), NULL }, - /* Dynex DX-800U? */ + /* Dynex DX-800U?, CP1200AVR/BC1200D, CP825AVR-G, CP1000AVRLCD, CP1000PFCLCD, CP1500C, CP550HG, etc. */ { USB_DEVICE(CPS_VENDORID, 0x0501), &cps_battery_scale }, /* OR2200LCDRM2U, OR700LCDRM1U, PR6000LCDRTXL5U */ { USB_DEVICE(CPS_VENDORID, 0x0601), NULL }, @@ -59,12 +66,48 @@ static usb_device_id_t cps_usb_device_table[] = { { -1, -1, NULL } }; +/*! Adjusts @a battery_scale if voltage is well above nominal. + */ +static void cps_adjust_battery_scale(double batt_volt) +{ + const char *batt_volt_nom_str; + double batt_volt_nom; + + if(battery_scale_checked) { + return; + } + + batt_volt_nom_str = dstate_getinfo("battery.voltage.nominal"); + if(!batt_volt_nom_str) { + upsdebugx(2, "%s: 'battery.voltage.nominal' not available yet; skipping scale determination", __func__); + return; + } + + batt_volt_nom = strtod(batt_volt_nom_str, NULL); + if(batt_volt_nom == 0) { + upsdebugx(3, "%s: 'battery.voltage.nominal' is %s", __func__, batt_volt_nom_str); + return; + } + + if( (batt_volt / batt_volt_nom) > battery_voltage_sanity_check ) { + upslogx(LOG_INFO, "%s: battery readings will be scaled by 2/3", __func__); + battery_scale = 2.0/3; + } + + battery_scale_checked = 1; +} + /* returns statically allocated string - must not use it again before done with result! */ static const char *cps_battvolt_fun(double value) { static char buf[8]; + if(might_need_battery_scale) { + cps_adjust_battery_scale(value); + } + + upsdebugx(5, "%s: battery_scale = %.3f", __func__, battery_scale); snprintf(buf, sizeof(buf), "%.1f", battery_scale * value); return buf; diff --git a/drivers/dstate.c b/drivers/dstate.c index 2e5bd7e..20d239a 100644 --- a/drivers/dstate.c +++ b/drivers/dstate.c @@ -238,23 +238,24 @@ static void sock_connect(int sock) } /* enable nonblocking I/O */ + if (!do_synchronous) { + ret = fcntl(fd, F_GETFL, 0); - ret = fcntl(fd, F_GETFL, 0); + if (ret < 0) { + upslog_with_errno(LOG_ERR, "fcntl get on unix fd failed"); + close(fd); + return; + } - if (ret < 0) { - upslog_with_errno(LOG_ERR, "fcntl get on unix fd failed"); - close(fd); - return; + ret = fcntl(fd, F_SETFL, ret | O_NDELAY); + + if (ret < 0) { + upslog_with_errno(LOG_ERR, "fcntl set O_NDELAY on unix fd failed"); + close(fd); + return; + } } - ret = fcntl(fd, F_SETFL, ret | O_NDELAY); - - if (ret < 0) { - upslog_with_errno(LOG_ERR, "fcntl set O_NDELAY on unix fd failed"); - close(fd); - return; - } - conn = xcalloc(1, sizeof(*conn)); conn->fd = fd; diff --git a/drivers/dstate.h b/drivers/dstate.h index b4a5aa9..35a7714 100644 --- a/drivers/dstate.h +++ b/drivers/dstate.h @@ -41,6 +41,10 @@ typedef struct conn_s { extern struct ups_handler upsh; + /* asynchronous (nonblocking) Vs synchronous (blocking) I/O + * Defaults to nonblocking, for backward compatibility */ + extern int do_synchronous; + void dstate_init(const char *prog, const char *devname); int dstate_poll_fds(struct timeval timeout, int extrafd); int dstate_setinfo(const char *var, const char *fmt, ...) diff --git a/drivers/eaton-mib.c b/drivers/eaton-mib.c index b06006e..77d9e00 100644 --- a/drivers/eaton-mib.c +++ b/drivers/eaton-mib.c @@ -1,6 +1,10 @@ -/* eaton-mib.c - data to monitor Eaton Aphel PDUs (Basic and Complex) +/* eaton-mib.c - data to monitor Eaton ePDUs: + * G1 Aphel based ePDUs (Basic and Complex) + * G1 Pulizzi Monitored and Switched ePDUs + * G2 Marlin SW / MI / MO / MA + * G3 Shark SW / MI / MO / MA * - * Copyright (C) 2008 - 2012 + * Copyright (C) 2008 - 2015 * Arnaud Quette * Arnaud Quette * @@ -30,7 +34,8 @@ /* APHEL-GENESIS-II-MIB (monitored ePDU) * ************************************* - * Note: we should also be able to support this one using netxml-ups! + * Note: There is also a basic XML interface, but not worth + * implementing in netxml-ups! */ #define APHEL1_OID_MIB ".1.3.6.1.4.1.17373" @@ -212,7 +217,7 @@ static snmp_info_t eaton_aphel_revelation_mib[] = { /* Eaton PDU-MIB - Marlin MIB * ************************** */ -#define EATON_MARLIN_MIB_VERSION "0.06" +#define EATON_MARLIN_MIB_VERSION "0.10" #define EATON_MARLIN_SYSOID ".1.3.6.1.4.1.534.6.6.7" #define EATON_MARLIN_OID_MODEL_NAME ".1.3.6.1.4.1.534.6.6.7.1.2.1.2.0" @@ -220,7 +225,7 @@ static info_lkp_t marlin_outlet_status_info[] = { { 0, "off" }, { 1, "on" }, { 2, "pendingOff" }, /* transitional status */ - { 3, "pendingOn" }, /* transitional status */ + { 3, "pendingOn" }, /* transitional status */ { 0, NULL } }; @@ -234,6 +239,7 @@ static info_lkp_t outlet_switchability_info[] = { /* Snmp2NUT lookup table for Eaton Marlin MIB */ static snmp_info_t eaton_marlin_mib[] = { + /* Device page */ { "device.mfr", ST_FLAG_STRING, SU_INFOSIZE, NULL, "EATON", SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL, NULL }, @@ -277,12 +283,61 @@ static snmp_info_t eaton_marlin_mib[] = { */ /* Input page */ + /* Historically, some of these data were previously published as + * outlet.{realpower,...} + * However, it's more suitable and logic to have these on input.{...} + */ { "input.phases", 0, 1, ".1.3.6.1.4.1.534.6.6.7.1.2.1.20.0", NULL, SU_FLAG_STATIC | SU_FLAG_OK, NULL, NULL }, - /* inputType.0.1 singlePhase (1) iso.3.6.1.4.1.534.6.6.7.3.1.1.2.0.1 */ + /* FIXME: to be implemented + * inputType.0.1 iso.3.6.1.4.1.534.6.6.7.3.1.1.2.0.1 + * singlePhase (1), ... split phase, three phase delta, or three phase wye + */ + + /* Frequency is measured globally */ { "input.frequency", 0, 0.1, ".1.3.6.1.4.1.534.6.6.7.3.1.1.3.0.1", NULL, 0, NULL, NULL }, + + /* inputCurrentPercentLoad (measured globally) + * Current percent load, based on the rated current capacity */ + /* FIXME: input.load is mapped on input.L1.load for both single and 3phase !!! */ + { "input.load", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.3.1.11.0.1.1", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "input.L1.load", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.3.1.11.0.1.1", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "input.L2.load", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.3.1.11.0.1.2", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "input.L3.load", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.3.1.11.0.1.3", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + + /* FIXME: + * - Voltage is only mesured per phase, as mV! + * so input.voltage == input.L1.voltage for both single and 3phase + * - As per NUT namespace (http://www.networkupstools.org/docs/developer-guide.chunked/apas01.html#_valid_contexts) + * Voltage has to be expressed either phase-phase or phase-neutral + * This is depending on OID inputVoltageMeasType + * INTEGER {singlePhase (1),phase1toN (2),phase2toN (3),phase3toN (4),phase1to2 (5),phase2to3 (6),phase3to1 (7)*/ { "input.voltage", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.3.2.1.3.0.1.1", NULL, 0, NULL, NULL }, - /* FIXME: check multiplier */ - { "input.current", 0, 0.01, ".1.3.6.1.4.1.534.6.6.7.3.3.1.4.0.1.1", NULL, 0, NULL, NULL }, + { "input.L1.voltage", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.3.2.1.3.0.1.1", NULL, 0, NULL, NULL }, + { "input.L2.voltage", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.3.2.1.3.0.1.2", NULL, 0, NULL, NULL }, + { "input.L3.voltage", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.3.2.1.3.0.1.3", NULL, 0, NULL, NULL }, + + /* FIXME: + * - input.current is mapped on input.L1.current for both single and 3phase !!! */ + { "input.current", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.3.3.1.4.0.1.1", NULL, 0, NULL, NULL }, + { "input.L1.current", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.3.3.1.4.0.1.1", NULL, 0, NULL, NULL }, + { "input.L2.current", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.3.3.1.4.0.1.2", NULL, 0, NULL, NULL }, + { "input.L3.current", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.3.3.1.4.0.1.3", NULL, 0, NULL, NULL }, + /* Sum of all phases realpower, valid for Shark 1ph/3ph only */ + { "input.realpower", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.5.1.4.0.1", NULL, SU_FLAG_NEGINVALID | SU_FLAG_UNIQUE | SU_FLAG_OK, NULL, NULL }, + /* Fallback 1: Sum of all phases realpower, valid for Marlin 3ph only */ + { "input.realpower", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.4.0.1.4", NULL, SU_FLAG_NEGINVALID | SU_FLAG_UNIQUE | SU_FLAG_OK, NULL, NULL }, + /* Fallback 2: Sum of the phase realpower, valid for Marlin 1ph only */ + { "input.realpower", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.4.0.1.2", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "input.L1.realpower", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.4.0.1.1", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "input.L2.realpower", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.4.0.1.2", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "input.L3.realpower", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.4.0.1.3", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + /* Sum of all phases apparent power, valid for 3phase only */ + { "input.power", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.4", NULL, SU_FLAG_NEGINVALID | SU_FLAG_UNIQUE | SU_FLAG_OK, NULL, NULL }, + /* Sum of the phase apparent power, valid for 1phase only (fallback for also publishing) */ + { "input.power", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.1", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "input.L1.power", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.1", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "input.L2.power", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.2", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "input.L3.power", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.3", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, /* Ambient page */ /* We use critical levels, for both temperature and humidity, @@ -300,13 +355,12 @@ static snmp_info_t eaton_marlin_mib[] = { SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL, NULL }, { "outlet.count", 0, 1, ".1.3.6.1.4.1.534.6.6.7.1.2.1.22.0", "0", SU_FLAG_STATIC | SU_FLAG_OK, NULL, NULL }, /* The below ones are the same as the input.* equivalent */ + /* FIXME: transition period, TO BE REMOVED, moved to input.* */ { "outlet.frequency", 0, 0.1, ".1.3.6.1.4.1.534.6.6.7.3.1.1.3.0.1", NULL, 0, NULL, NULL }, { "outlet.voltage", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.3.2.1.3.0.1.1", NULL, 0, NULL, NULL }, { "outlet.current", 0, 0.01, ".1.3.6.1.4.1.534.6.6.7.3.3.1.4.0.1.1", NULL, 0, NULL, NULL }, - /* There is also a .2 available (ie .1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.2) */ - { "outlet.realpower", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.4.0.1.2", NULL, 0, NULL, NULL }, - /* There is also a .2 available (ie .1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.2) */ - { "outlet.power", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.1", NULL, 0, NULL, NULL }, + { "outlet.realpower", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.4.0.1.4", NULL, 0, NULL, NULL }, + { "outlet.power", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.4", NULL, 0, NULL, NULL }, /* outlet template definition * Indexes start from 1, ie outlet.1 => .1 */ diff --git a/drivers/genericups.c b/drivers/genericups.c index bc8ddc4..9a005fa 100644 --- a/drivers/genericups.c +++ b/drivers/genericups.c @@ -39,19 +39,30 @@ upsdrv_info_t upsdrv_info = { static void parse_output_signals(const char *value, int *line) { + int old_line = *line; /* parse signals the serial port can output */ *line = 0; + upsdebugx(4, "%s: enter", __func__); + + /* Note: for future drivers, please use strtok() or similar tokenizing + * methods, such that it is easier to spot configuration mistakes. With + * this code, a misspelled control line may go unnoticed. I'd fix it + * The Right Way (tm), but these UPSes are ancient. + */ if (strstr(value, "DTR") && !strstr(value, "-DTR")) { + upsdebugx(3, "%s: override DTR", __func__); *line |= TIOCM_DTR; } if (strstr(value, "RTS") && !strstr(value, "-RTS")) { + upsdebugx(3, "%s: override RTS", __func__); *line |= TIOCM_RTS; } if (strstr(value, "ST")) { + upsdebugx(3, "%s: override ST", __func__); *line |= TIOCM_ST; } @@ -70,20 +81,32 @@ static void parse_output_signals(const char *value, int *line) if (strstr(value, "DSR")) { fatalx(EXIT_FAILURE, "Can't override output with DSR (not an output)"); } + + if(*line == old_line) { + upslogx(LOG_NOTICE, "%s: output overrides specified, but no effective difference - check for typos?", __func__); + } + + upsdebugx(4, "%s: exit", __func__); } static void parse_input_signals(const char *value, int *line, int *val) { /* parse signals the serial port can input */ + int old_line = *line, old_val = *val; *line = 0; *val = 0; + upsdebugx(4, "%s: enter", __func__); + if (strstr(value, "CTS")) { *line |= TIOCM_CTS; if (!strstr(value, "-CTS")) { + upsdebugx(3, "%s: override CTS (active low)", __func__); *val |= TIOCM_CTS; + } else { + upsdebugx(3, "%s: override CTS", __func__); } } @@ -91,7 +114,10 @@ static void parse_input_signals(const char *value, int *line, int *val) *line |= TIOCM_CD; if (!strstr(value, "-DCD")) { + upsdebugx(3, "%s: override DCD (active low)", __func__); *val |= TIOCM_CD; + } else { + upsdebugx(3, "%s: override DCD", __func__); } } @@ -99,7 +125,10 @@ static void parse_input_signals(const char *value, int *line, int *val) *line |= TIOCM_RNG; if (!strstr(value, "-RNG")) { + upsdebugx(3, "%s: override RNG (active low)", __func__); *val |= TIOCM_RNG; + } else { + upsdebugx(3, "%s: override RNG", __func__); } } @@ -107,7 +136,10 @@ static void parse_input_signals(const char *value, int *line, int *val) *line |= TIOCM_DSR; if (!strstr(value, "-DSR")) { + upsdebugx(3, "%s: override DSR (active low)", __func__); *val |= TIOCM_DSR; + } else { + upsdebugx(3, "%s: override DSR", __func__); } } @@ -122,6 +154,12 @@ static void parse_input_signals(const char *value, int *line, int *val) if (strstr(value, "ST")) { fatalx(EXIT_FAILURE, "Can't override input with ST (not an input)"); } + + if((*line == old_line) && (*val == old_val)) { + upslogx(LOG_NOTICE, "%s: input overrides specified, but no effective difference - check for typos?", __func__); + } + + upsdebugx(4, "%s: exit", __func__); } void upsdrv_initinfo(void) diff --git a/drivers/libhid.c b/drivers/libhid.c index d0ba7c5..25d4d00 100644 --- a/drivers/libhid.c +++ b/drivers/libhid.c @@ -59,6 +59,10 @@ static double exponent(double a, int8_t b); /* Tweak flag for APC Back-UPS */ int max_report_size = 0; +/* Tweaks for Powercom, at least */ +int interrupt_only = 0; +int unsigned interrupt_size = 0; + /* ---------------------------------------------------------------------- */ /* report buffering system */ @@ -148,7 +152,7 @@ static int refresh_report_buffer(reportbuf_t *rbuf, hid_dev_handle_t udev, HIDDa int id = pData->ReportID; int r; - if (rbuf->ts[id] + age > time(NULL)) { + if (interrupt_only || rbuf->ts[id] + age > time(NULL)) { /* buffered report is still good; nothing to do */ upsdebug_hex(3, "Report[buf]", rbuf->data[id], rbuf->len[id]); return 0; @@ -346,7 +350,7 @@ HIDData_t *HIDGetItemData(const char *hidpath, usage_tables_t *utab) } /* Get info on object (reportID, offset and size) */ - return FindObject_with_Path(pDesc, &Path, ITEM_FEATURE); + return FindObject_with_Path(pDesc, &Path, interrupt_only ? ITEM_INPUT:ITEM_FEATURE); } char *HIDGetDataItem(const HIDData_t *hiddata, usage_tables_t *utab) @@ -479,7 +483,7 @@ int HIDGetEvents(hid_dev_handle_t udev, HIDData_t **event, int eventsize) HIDData_t *pData; /* needs libusb-0.1.8 to work => use ifdef and autoconf */ - buflen = comm_driver->get_interrupt(udev, buf, sizeof(buf), 250); + buflen = comm_driver->get_interrupt(udev, buf, interrupt_size ? interrupt_size:sizeof(buf), 250); if (buflen <= 0) { return buflen; /* propagate "error" or "no event" code */ } diff --git a/drivers/libhid.h b/drivers/libhid.h index 0e513f9..0879c3e 100644 --- a/drivers/libhid.h +++ b/drivers/libhid.h @@ -89,6 +89,9 @@ typedef struct reportbuf_s { extern reportbuf_t *reportbuf; /* buffer for most recent reports */ +extern int interrupt_only; +extern unsigned int interrupt_size; + /* ---------------------------------------------------------------------- */ /* diff --git a/drivers/libusb.c b/drivers/libusb.c index fd8f5b9..8625ed6 100644 --- a/drivers/libusb.c +++ b/drivers/libusb.c @@ -49,6 +49,23 @@ upsdrv_info_t comm_upsdrv_info = { static void libusb_close(usb_dev_handle *udev); +/*! Add USB-related driver variables with addvar(). + * This removes some code duplication across the USB drivers. + */ +void nut_usb_addvars(void) +{ + /* allow -x vendor=X, vendorid=X, product=X, productid=X, serial=X */ + addvar(VAR_VALUE, "vendor", "Regular expression to match UPS Manufacturer string"); + addvar(VAR_VALUE, "product", "Regular expression to match UPS Product string"); + addvar(VAR_VALUE, "serial", "Regular expression to match UPS Serial number"); + + addvar(VAR_VALUE, "vendorid", "Regular expression to match UPS Manufacturer numerical ID (4 digits hexadecimal)"); + addvar(VAR_VALUE, "productid", "Regular expression to match UPS Product numerical ID (4 digits hexadecimal)"); + + addvar(VAR_VALUE, "bus", "Regular expression to match USB bus name"); + addvar(VAR_VALUE, "usb_set_altinterface", "Force redundant call to usb_set_altinterface() (value=bAlternateSetting; default=0)"); +} + /* From usbutils: workaround libusb API goofs: "byte" should never be sign extended; * using "char" is trouble. Likewise, sizes should never be negative. */ @@ -70,6 +87,45 @@ static inline int matches(USBDeviceMatcher_t *matcher, USBDevice_t *device) { return matcher->match_function(device, matcher->privdata); } +/*! If needed, set the USB alternate interface. + * + * In NUT 2.7.2 and earlier, the following call was made unconditionally: + * usb_set_altinterface(udev, 0); + * + * Although harmless on Linux and *BSD, this extra call prevents old Tripp Lite + * devices from working on Mac OS X (presumably the OS is already setting + * altinterface to 0). + */ +static int nut_usb_set_altinterface(usb_dev_handle *udev) +{ + int altinterface = 0, ret = 0; + char *alt_string, *endp = NULL; + + if(testvar("usb_set_altinterface")) { + alt_string = getval("usb_set_altinterface"); + if(alt_string) { + altinterface = (int)strtol(alt_string, &endp, 10); + if(endp && !(endp[0] == 0)) { + upslogx(LOG_WARNING, "%s: '%s' is not a valid number", __func__, alt_string); + } + if(altinterface < 0 || altinterface > 255) { + upslogx(LOG_WARNING, "%s: setting bAlternateInterface to %d will probably not work", __func__, altinterface); + } + } + /* set default interface */ + upsdebugx(2, "%s: calling usb_set_altinterface(udev, %d)", __func__, altinterface); + ret = usb_set_altinterface(udev, altinterface); + if(ret != 0) { + upslogx(LOG_WARNING, "%s: usb_set_altinterface(udev, %d) returned %d (%s)", + __func__, altinterface, ret, usb_strerror() ); + } + upslogx(LOG_NOTICE, "%s: usb_set_altinterface() should not be necessary - please email the nut-upsdev list with information about your UPS.", __func__); + } else { + upsdebugx(3, "%s: skipped usb_set_altinterface(udev, 0)", __func__); + } + return ret; +} + #define usb_control_msg typesafe_control_msg /* On success, fill in the curDevice structure and return the report @@ -220,8 +276,7 @@ static int libusb_open(usb_dev_handle **udevp, USBDevice_t *curDevice, USBDevice } #endif - /* set default interface */ - usb_set_altinterface(udev, 0); + nut_usb_set_altinterface(udev); if (!callback) { return 1; diff --git a/drivers/liebert-hid.c b/drivers/liebert-hid.c index cff6f1d..34f00bd 100644 --- a/drivers/liebert-hid.c +++ b/drivers/liebert-hid.c @@ -26,13 +26,18 @@ #include "liebert-hid.h" #include "usb-common.h" -#define LIEBERT_HID_VERSION "Liebert HID 0.3" +#define LIEBERT_HID_VERSION "Phoenixtec/Liebert HID 0.3" /* FIXME: experimental flag to be put in upsdrv_info */ /* Phoenixtec Power Co., Ltd */ #define LIEBERT_VENDORID 0x06da -/* USB IDs device table */ +/*! USB IDs device table. + * + * Note that this subdriver was named before the USB VendorID was determined to + * actually belong to Phoenixtec. The belkin-hid.c file covers the other + * Liebert units which share some of the same incorrect exponents as the + * Belkin HID firmware. */ static usb_device_id_t liebert_usb_device_table[] = { /* various models */ { USB_DEVICE(LIEBERT_VENDORID, 0xffff), NULL }, diff --git a/drivers/main.c b/drivers/main.c index 7c2fc55..f63d54a 100644 --- a/drivers/main.c +++ b/drivers/main.c @@ -31,6 +31,9 @@ /* for ser_open */ int do_lock_port = 1; + /* for dstate->sock_connect, default to asynchronous */ + int do_synchronous = 0; + /* for detecting -a values that don't match anything */ static int upsname_found = 0; @@ -250,7 +253,7 @@ void addvar(int vartype, const char *name, const char *desc) /* handle -x / ups.conf config details that are for this part of the code */ static int main_arg(char *var, char *val) { - /* flags for main: just 'nolock' for now */ + /* flags for main */ if (!strcmp(var, "nolock")) { do_lock_port = 0; @@ -281,6 +284,16 @@ static int main_arg(char *var, char *val) return 1; /* handled */ } + /* allow per-driver overrides of the global setting */ + if (!strcmp(var, "synchronous")) { + if (!strcmp(val, "yes")) + do_synchronous=1; + else + do_synchronous=0; + + return 1; /* handled */ + } + /* only for upsdrvctl - ignored here */ if (!strcmp(var, "sdorder")) return 1; /* handled */ @@ -309,6 +322,13 @@ static void do_global_args(const char *var, const char *val) user = xstrdup(val); } + if (!strcmp(var, "synchronous")) { + if (!strcmp(val, "yes")) + do_synchronous=1; + else + do_synchronous=0; + } + /* unrecognized */ } @@ -519,6 +539,7 @@ int main(int argc, char **argv) chroot_path = xstrdup(optarg); break; case 'u': + free(user); user = xstrdup(optarg); break; case 'V': @@ -660,6 +681,10 @@ int main(int argc, char **argv) /* The poll_interval may have been changed from the default */ dstate_setinfo("driver.parameter.pollinterval", "%d", poll_interval); + /* The synchronous option may have been changed from the default */ + dstate_setinfo("driver.parameter.synchronous", "%s", + (do_synchronous==1)?"yes":"no"); + /* remap the device.* info from ups.* for the transition period */ if (dstate_getinfo("ups.mfr") != NULL) dstate_setinfo("device.mfr", "%s", dstate_getinfo("ups.mfr")); diff --git a/drivers/mge-hid.c b/drivers/mge-hid.c index 93ccde6..dfc62c9 100644 --- a/drivers/mge-hid.c +++ b/drivers/mge-hid.c @@ -1,7 +1,8 @@ /* mge-hid.c - data to monitor Eaton / MGE HID (USB and serial) devices * - * Copyright (C) 2003 - 2012 - * Arnaud Quette + * Copyright (C) + * 2003 - 2015 Arnaud Quette + * 2015 Arnaud Quette * * Sponsored by MGE UPS SYSTEMS * @@ -36,7 +37,7 @@ #include "usbhid-ups.h" #include "mge-hid.h" -#define MGE_HID_VERSION "MGE HID 1.33" +#define MGE_HID_VERSION "MGE HID 1.38" /* (prev. MGE Office Protection Systems, prev. MGE UPS SYSTEMS) */ /* Eaton */ @@ -121,6 +122,223 @@ static int country_code = COUNTRY_UNKNOWN; static char mge_scratch_buf[20]; +/* ABM - Advanced Battery Monitoring + *********************************** + * Synthesis table + * HID data | Charger in ABM mode | Charger in Constant mode + * UPS.BatterySystem.Charger.ABMEnable | 1 | 0 + * UPS.PowerSummary.PresentStatus.ACPresent | On utility | On battery | On utility | On battery + * Charger ABM mode | Charging | Floating | Resting | Discharging | Disabled | Disabled + * UPS.BatterySystem.Charger.Mode | 1 | 3 | 4 | 2 | 6 | 6 + * UPS.PowerSummary.PresentStatus.Charging | 1 | 1 | 1 | 0 | 1 | 0 + * UPS.PowerSummary.PresentStatus.Discharging | 0 |  0 |  0 | 1 | 0 | 1 + * + * Notes (from David G. Miller) to understand ABM status: + * When supporting ABM, when a UPS powers up or returns from battery, or + * ends the ABM rest mode, it enters charge mode. + * Some UPSs run a different charger reference voltage during charge mode + * but all the newer models should not be doing that, but basically once + * the battery voltage reaches the charger reference level (should be 2.3 + * volts/cell), the charger is considered in float mode. Some UPSs will not + * annunciate float mode until the charger power starts falling from the maximum + * level indicating the battery is truly at the float voltage or in float mode. + * The %charge level is based on battery voltage and the charge mode timer + * (should be 48 hours) and some UPSs add in a value that’s related to charger + * power output. So you can have UPS that enters float mode with anywhere + * from 80% or greater battery capacity. + * float mode is not important from the software’s perspective, it’s there to + * help determine if the charger is advancing correctly. + * So in float mode, the charger is charging the battery, so by definition you + * can assert the CHRG flag in NUT when in “float” mode or “charge” mode. + * When in “rest” mode the charger is not delivering anything to the battery, + * but it will when the ABM cycle(28 days) ends, or a battery discharge occurs + * and utility returns. This is when the ABM status should be “resting”. + * If a battery failure is detected that disables the charger, it should be + * reporting “off” in the ABM charger status. + * Of course when delivering load power from the battery, the ABM status is + * discharging. + */ + +#define ABM_UNKNOWN -1 +#define ABM_DISABLED 0 +#define ABM_ENABLED 1 + +/* Internal flag to process battery status (CHRG/DISCHRG) and ABM */ +static int advanced_battery_monitoring = ABM_UNKNOWN; + +/* Used to store internally if ABM is enabled or not */ +static const char *eaton_abm_enabled_fun(double value) +{ + advanced_battery_monitoring = value; + + upsdebugx(2, "ABM is %s", (advanced_battery_monitoring==1)?"enabled":"disabled"); + + /* Return NULL, not to get the value published! */ + return NULL; +} + +static info_lkp_t eaton_abm_enabled_info[] = { + { 0, "dummy", eaton_abm_enabled_fun }, + { 0, NULL, NULL } +}; + +/* Note 1: This point will need more clarification! */ +# if 0 +/* Used to store internally if ABM is enabled or not (for legacy units) */ +static const char *eaton_abm_enabled_legacy_fun(double value) +{ + advanced_battery_monitoring = value; + + upsdebugx(2, "ABM is %s (legacy data)", (advanced_battery_monitoring==1)?"enabled":"disabled"); + + /* Return NULL, not to get the value published! */ + return NULL; +} + +static info_lkp_t eaton_abm_enabled_legacy_info[] = { + { 0, "dummy", eaton_abm_enabled_legacy_fun }, + { 0, NULL, NULL } +}; +#endif /* if 0 */ + +/* Used to process ABM flags, for battery.charger.status */ +static const char *eaton_abm_status_fun(double value) +{ + /* Don't process if ABM is disabled */ + if (advanced_battery_monitoring == ABM_DISABLED) { + /* Clear any previously published data, in case + * the user has switched off ABM */ + dstate_delinfo("battery.charger.status"); + return NULL; + } + + upsdebugx(2, "ABM numeric status: %i", (int)value); + + switch ((long)value) + { + case 1: + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "charging"); + break; + case 2: + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "discharging"); + break; + case 3: + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "floating"); + break; + case 4: + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "resting"); + break; + case 6: /* ABM Charger Disabled */ + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "off"); + break; + case 5: /* Undefined - ABM is not activated */ + default: + /* Return NULL, not to get the value published! */ + return NULL; + } + + upsdebugx(2, "ABM string status: %s", mge_scratch_buf); + + return mge_scratch_buf; +} + +static info_lkp_t eaton_abm_status_info[] = { + { 1, "dummy", eaton_abm_status_fun }, + { 0, NULL, NULL } +}; + +/* Used to process ABM flags, for ups.status (CHRG/DISCHRG/RB) */ +static const char *eaton_abm_chrg_dischrg_fun(double value) +{ + /* Don't process if ABM is disabled */ + if (advanced_battery_monitoring == ABM_DISABLED) + return NULL; + + switch ((long)value) + { + case 1: /* charging status */ + case 3: /* floating status */ + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "chrg"); + break; + case 2: + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "dischrg"); + break; + case 6: /* ABM Charger Disabled */ + case 4: /* resting, nothing to publish! (?) */ + case 5: /* Undefined - ABM is not activated */ + default: + /* Return NULL, not to get the value published! */ + return NULL; + } + + upsdebugx(2, "ABM CHRG/DISCHRG legacy string status (ups.status): %s", mge_scratch_buf); + + return mge_scratch_buf; +} + +static info_lkp_t eaton_abm_chrg_dischrg_info[] = { + { 1, "dummy", eaton_abm_chrg_dischrg_fun }, + { 0, NULL, NULL } +}; + +/* ABM also implies that standard CHRG/DISCHRG are processed according + * to weither ABM is enabled or not... + * If ABM is disabled, we publish these legacy status + * Otherwise, we don't publish on ups.status, but only battery.charger.status */ +/* FIXME: we may prefer to publish the CHRG/DISCHRG status + * on battery.charger.status?! */ +static const char *eaton_abm_check_dischrg_fun(double value) +{ + if (advanced_battery_monitoring == ABM_DISABLED) + { + if (value == 1) { + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "dischrg"); + } + else { + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "!dischrg"); + } + } + else { + /* Else, ABM is enabled, we should return NULL, + * not to get the value published! + * However, clear flags that would persist in case of prior + * publication in ABM-disabled mode */ + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "!dischrg"); + } + return mge_scratch_buf; +} + +static info_lkp_t eaton_discharging_info[] = { + { 1, "dummy", eaton_abm_check_dischrg_fun }, + { 0, NULL, NULL } +}; + +static const char *eaton_abm_check_chrg_fun(double value) +{ + if (advanced_battery_monitoring == ABM_DISABLED) + { + if (value == 1) { + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "chrg"); + } + else { + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "!chrg"); + } + } + else { + /* Else, ABM is enabled, we should return NULL, + * not to get the value published! + * However, clear flags that would persist in case of prior + * publication in ABM-disabled mode */ + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "!chrg"); + } + return mge_scratch_buf; +} + +static info_lkp_t eaton_charging_info[] = { + { 1, "dummy", eaton_abm_check_chrg_fun }, + { 0, NULL, NULL } +}; + /* The HID path 'UPS.PowerSummary.Time' reports Unix time (ie the number of * seconds since 1970-01-01 00:00:00. This has to be split between ups.date and * ups.time */ @@ -880,6 +1098,21 @@ static hid_info_t mge_hid2nut[] = { "battery.voltage.nominal", 0, 0, "UPS.PowerSummary.ConfigVoltage", NULL, "%s", HU_FLAG_STATIC, mge_battery_voltage_nominal }, { "battery.protection", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.BatterySystem.Battery.DeepDischargeProtection", NULL, "%s", HU_FLAG_SEMI_STATIC, yes_no_info }, { "battery.energysave", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.PowerConverter.Input.[3].EnergySaving", NULL, "%s", HU_FLAG_SEMI_STATIC, yes_no_info }, + { "battery.energysave.load", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.PowerConverter.Input.[3].ConfigPercentLoad", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, + /* Current implementation */ + { "battery.energysave.delay", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.PowerConverter.Input.[3].EnergySaving.ShutdownTimer", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, + /* Newer implementation */ + { "battery.energysave.delay", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.PowerConverter.Input.[3].ShutdownTimer", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, + { "battery.energysave.realpower", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.PowerConverter.Input.[3].ConfigActivePower", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, + /* ABM (Advanced Battery Monitoring) processing + * Must be processed before the BOOL status */ + /* Not published, just to store in internal var. advanced_battery_monitoring */ + { "battery.charger.status", 0, 0, "UPS.BatterySystem.Charger.ABMEnable", NULL, "%.0f", HU_FLAG_QUICK_POLL, eaton_abm_enabled_info }, + /* Same as the one above, but for legacy units */ + /* Refer to Note 1 (This point will need more clarification!) + { "battery.charger.status", 0, 0, "UPS.BatterySystem.Charger.PresentStatus.Used", NULL, "%.0f", HU_FLAG_QUICK_POLL, eaton_abm_enabled_legacy_info }, */ + /* This data is the actual ABM status information */ + { "battery.charger.status", 0, 0, "UPS.BatterySystem.Charger.Mode", NULL, "%.0f", HU_FLAG_QUICK_POLL, eaton_abm_status_info }, /* UPS page */ { "ups.efficiency", 0, 0, "UPS.PowerConverter.Output.Efficiency", NULL, "%.0f", 0, NULL }, @@ -922,8 +1155,11 @@ static hid_info_t mge_hid2nut[] = { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.ACPresent", NULL, NULL, HU_FLAG_QUICK_POLL, online_info }, { "BOOL", 0, 0, "UPS.PowerConverter.Input.[3].PresentStatus.Used", NULL, NULL, 0, mge_onbatt_info }, { "BOOL", 0, 0, "UPS.PowerConverter.Input.[1].PresentStatus.Used", NULL, NULL, 0, online_info }, - { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.Discharging", NULL, NULL, HU_FLAG_QUICK_POLL, discharging_info }, - { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.Charging", NULL, NULL, HU_FLAG_QUICK_POLL, charging_info }, + /* These 2 ones are used when ABM is disabled */ + { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.Discharging", NULL, NULL, HU_FLAG_QUICK_POLL, eaton_discharging_info }, + { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.Charging", NULL, NULL, HU_FLAG_QUICK_POLL, eaton_charging_info }, + /* And this one when ABM is enabled (same as battery.charger.status) */ + { "BOOL", 0, 0, "UPS.BatterySystem.Charger.Mode", NULL, "%.0f", HU_FLAG_QUICK_POLL, eaton_abm_chrg_dischrg_info }, /* FIXME: on Dell, the above requires an "AND" with "UPS.BatterySystem.Charger.Mode = 1" */ { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit", NULL, NULL, HU_FLAG_QUICK_POLL, lowbatt_info }, /* Output overload, Level 1 (FIXME: add the level?) */ @@ -940,11 +1176,6 @@ static hid_info_t mge_hid2nut[] = { "BOOL", 0, 0, "UPS.PowerConverter.Input.[1].PresentStatus.VoltageOutOfRange", NULL, NULL, 0, vrange_info }, { "BOOL", 0, 0, "UPS.PowerConverter.Input.[1].PresentStatus.FrequencyOutOfRange", NULL, NULL, 0, frange_info }, { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.Good", NULL, NULL, 0, off_info }, -#if 0 - /* TODO: UPS.BatterySystem.Charger.PresentStatus.Used is related to ABM */ - { "BOOL", 0, 0, "UPS.BatterySystem.Charger.PresentStatus.Used", NULL, NULL, 0, off_info }, - /* FIXME: on Dell, the above requires an "AND" with "UPS.BatterySystem.Charger.Mode = 4 (ABM Resting)" */ -#endif { "BOOL", 0, 0, "UPS.PowerConverter.Input.[2].PresentStatus.Used", NULL, NULL, 0, bypass_auto_info }, /* Automatic bypass */ { "BOOL", 0, 0, "UPS.PowerConverter.Input.[4].PresentStatus.Used", NULL, NULL, 0, bypass_manual_info }, /* Manual bypass */ { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.FanFailure", NULL, NULL, 0, fanfail_info }, diff --git a/drivers/netvision-mib.c b/drivers/netvision-mib.c index 3b31e32..31801f7 100644 --- a/drivers/netvision-mib.c +++ b/drivers/netvision-mib.c @@ -4,6 +4,7 @@ * Copyright (C) * 2004 Thanos Chatziathanassiou * 2012 Manuel Bouyer + * 2015 Arnaud Quette * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,7 +25,7 @@ #include "netvision-mib.h" -#define NETVISION_MIB_VERSION "0.3" +#define NETVISION_MIB_VERSION "0.4" #define NETVISION_SYSOID ".1.3.6.1.4.1.4555.1.1.1" @@ -46,6 +47,13 @@ static info_lkp_t netvision_batt_info[] = { { 0, "NULL" } }; +/* Battery status: upsAlarmOnBattery */ +static info_lkp_t netvision_onbatt_info[] = { + { 0, "OL" }, /* Online */ + { 1, "OB" }, /* On battery */ + { 0, "NULL" } +}; + #define NETVISION_OID_SECONDSONBATTERY ".1.3.6.1.4.1.4555.1.1.1.1.2.2.0" #define NETVISION_OID_BATT_RUNTIME_REMAINING ".1.3.6.1.4.1.4555.1.1.1.1.2.3.0" #define NETVISION_OID_BATT_CHARGE ".1.3.6.1.4.1.4555.1.1.1.1.2.4.0" @@ -119,6 +127,9 @@ static snmp_info_t netvision_mib[] = { SU_FLAG_OK | SU_STATUS_BATT, &netvision_batt_info[0] }, { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, NETVISION_OID_OUTPUT_SOURCE, "", SU_FLAG_OK | SU_STATUS_PWR, &netvision_output_info[0] }, + /* upsAlarmOnBattery */ + { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.4555.1.1.1.1.6.3.2.0", "", + SU_FLAG_OK | SU_STATUS_PWR, &netvision_onbatt_info[0] }, /* ups load */ { "ups.load", 0, 1, NETVISION_OID_OUT_LOAD_PCT_P1, 0, SU_INPUT_1, NULL }, diff --git a/drivers/nutdrv_qx.c b/drivers/nutdrv_qx.c index f27e89b..8b71a31 100644 --- a/drivers/nutdrv_qx.c +++ b/drivers/nutdrv_qx.c @@ -33,7 +33,7 @@ * */ -#define DRIVER_VERSION "0.06" +#define DRIVER_VERSION "0.17" #include "main.h" @@ -62,6 +62,7 @@ /* == Subdrivers == */ /* Include all known subdrivers */ +#include "nutdrv_qx_bestups.h" #include "nutdrv_qx_mecer.h" #include "nutdrv_qx_megatec.h" #include "nutdrv_qx_megatec-old.h" @@ -69,14 +70,17 @@ #include "nutdrv_qx_q1.h" #include "nutdrv_qx_voltronic.h" #include "nutdrv_qx_voltronic-qs.h" +#include "nutdrv_qx_voltronic-qs-hex.h" #include "nutdrv_qx_zinto.h" -/* Master list of avaiable subdrivers */ +/* Master list of available subdrivers */ static subdriver_t *subdriver_list[] = { &voltronic_subdriver, &voltronic_qs_subdriver, + &voltronic_qs_hex_subdriver, &mustek_subdriver, &megatec_old_subdriver, + &bestups_subdriver, &mecer_subdriver, &megatec_subdriver, &zinto_subdriver, @@ -439,9 +443,10 @@ static int cypress_command(const char *cmd, char *buf, size_t buflen) ret = usb_control_msg(udev, USB_ENDPOINT_OUT + USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x09, 0x200, 0, &tmp[i], 8, 5000); if (ret <= 0) { - upsdebugx(3, "send: %s", ret ? usb_strerror() : "timeout"); + upsdebugx(3, "send: %s (%d)", ret ? usb_strerror() : "timeout", ret); return ret; } + } upsdebugx(3, "send: %.*s", (int)strcspn(tmp, "\r"), tmp); @@ -449,7 +454,7 @@ static int cypress_command(const char *cmd, char *buf, size_t buflen) /* Read reply */ memset(buf, 0, buflen); - for (i = 0; (i <= buflen-8) && (strchr(buf, '\r') == NULL); i += ret) { + for (i = 0; (i <= buflen-8) && (memchr(buf, '\r', buflen) == NULL); i += ret) { /* Read data in 8-byte chunks */ /* ret = usb->get_interrupt(udev, (unsigned char *)&buf[i], 8, 1000); */ @@ -457,9 +462,13 @@ static int cypress_command(const char *cmd, char *buf, size_t buflen) /* Any errors here mean that we are unable to read a reply (which will happen after successfully writing a command to the UPS) */ if (ret <= 0) { - upsdebugx(3, "read: %s", ret ? usb_strerror() : "timeout"); + upsdebugx(3, "read: %s (%d)", ret ? usb_strerror() : "timeout", ret); return ret; } + + snprintf(tmp, sizeof(tmp), "read [% 3d]", (int)i); + upsdebug_hex(5, tmp, &buf[i], ret); + } upsdebugx(3, "read: %.*s", (int)strcspn(buf, "\r"), buf); @@ -490,11 +499,12 @@ static int phoenix_command(const char *cmd, char *buf, size_t buflen) } if (ret < 0) { - upsdebugx(3, "flush: %s", usb_strerror()); + upsdebugx(3, "flush: %s (%d)", usb_strerror(), ret); break; } upsdebug_hex(4, "dump", tmp, ret); + } /* Send command */ @@ -508,9 +518,10 @@ static int phoenix_command(const char *cmd, char *buf, size_t buflen) ret = usb_control_msg(udev, USB_ENDPOINT_OUT + USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x09, 0x200, 0, &tmp[i], 8, 1000); if (ret <= 0) { - upsdebugx(3, "send: %s", ret ? usb_strerror() : "timeout"); + upsdebugx(3, "send: %s (%d)", ret ? usb_strerror() : "timeout", ret); return ret; } + } upsdebugx(3, "send: %.*s", (int)strcspn(tmp, "\r"), tmp); @@ -518,7 +529,7 @@ static int phoenix_command(const char *cmd, char *buf, size_t buflen) /* Read reply */ memset(buf, 0, buflen); - for (i = 0; (i <= buflen-8) && (strchr(buf, '\r') == NULL); i += ret) { + for (i = 0; (i <= buflen-8) && (memchr(buf, '\r', buflen) == NULL); i += ret) { /* Read data in 8-byte chunks */ /* ret = usb->get_interrupt(udev, (unsigned char *)&buf[i], 8, 1000); */ @@ -526,9 +537,13 @@ static int phoenix_command(const char *cmd, char *buf, size_t buflen) /* Any errors here mean that we are unable to read a reply (which will happen after successfully writing a command to the UPS) */ if (ret <= 0) { - upsdebugx(3, "read: %s", ret ? usb_strerror() : "timeout"); + upsdebugx(3, "read: %s (%d)", ret ? usb_strerror() : "timeout", ret); return ret; } + + snprintf(tmp, sizeof(tmp), "read [% 3d]", (int)i); + upsdebug_hex(5, tmp, &buf[i], ret); + } upsdebugx(3, "read: %.*s", (int)strcspn(buf, "\r"), buf); @@ -539,8 +554,8 @@ static int phoenix_command(const char *cmd, char *buf, size_t buflen) static int ippon_command(const char *cmd, char *buf, size_t buflen) { char tmp[64]; - int ret, len; - size_t i; + int ret; + size_t i, len; /* Send command */ snprintf(tmp, sizeof(tmp), "%s", cmd); @@ -551,9 +566,10 @@ static int ippon_command(const char *cmd, char *buf, size_t buflen) ret = usb_control_msg(udev, USB_ENDPOINT_OUT + USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x09, 0x2, 0, &tmp[i], 8, 1000); if (ret <= 0) { - upsdebugx(3, "send: %s", (ret != -ETIMEDOUT) ? usb_strerror() : "Connection timed out"); + upsdebugx(3, "send: %s (%d)", (ret != -ETIMEDOUT) ? usb_strerror() : "Connection timed out", ret); return ret; } + } upsdebugx(3, "send: %.*s", (int)strcspn(tmp, "\r"), tmp); @@ -563,23 +579,36 @@ static int ippon_command(const char *cmd, char *buf, size_t buflen) /* Any errors here mean that we are unable to read a reply (which will happen after successfully writing a command to the UPS) */ if (ret <= 0) { - upsdebugx(3, "read: %s", (ret != -ETIMEDOUT) ? usb_strerror() : "Connection timed out"); + upsdebugx(3, "read: %s (%d)", (ret != -ETIMEDOUT) ? usb_strerror() : "Connection timed out", ret); return ret; } - /* - * As Ippon will always return 64 bytes in response, we have to - * calculate and return length of actual response data here. - * Empty response will look like 0x00 0x0D, otherwise it will be - * data string terminated by 0x0D. - */ - len = (int)strcspn(tmp, "\r"); - upsdebugx(3, "read: %.*s", len, tmp); - if (len > 0) { - len ++; + /* As Ippon will always return 64 bytes in response, we have to calculate and return length of actual response data here. + * Empty response will look like 0x00 0x0D, otherwise it will be data string terminated by 0x0D. */ + + for (i = 0, len = 0; i < (size_t)ret; i++) { + + if (tmp[i] != '\r') + continue; + + len = ++i; + break; + } - snprintf(buf, buflen, "%.*s", len, tmp); - return len; + + /* Just in case there wasn't any '\r', fallback to string length, if any */ + if (!len) + len = strlen(tmp); + + upsdebug_hex(5, "read", tmp, (int)len); + upsdebugx(3, "read: %.*s", (int)strcspn(tmp, "\r"), tmp); + + len = len < buflen ? len : buflen - 1; + + memset(buf, 0, buflen); + memcpy(buf, tmp, len); + + return (int)len; } /* Krauler communication subdriver */ @@ -623,13 +652,12 @@ static int krauler_command(const char *cmd, char *buf, size_t buflen) if (langid_fix != -1) { /* Apply langid_fix value */ ret = usb_get_string(udev, command[i].index, langid_fix, buf, buflen); - } - else { + } else { ret = usb_get_string_simple(udev, command[i].index, buf, buflen); } if (ret <= 0) { - upsdebugx(3, "read: %s", ret ? usb_strerror() : "timeout"); + upsdebugx(3, "read: %s (%d)", ret ? usb_strerror() : "timeout", ret); return ret; } @@ -673,7 +701,9 @@ static int krauler_command(const char *cmd, char *buf, size_t buflen) /* Replace the first byte of what we received with the correct one */ buf[0] = command[i].prefix; + upsdebug_hex(5, "read", buf, ret); upsdebugx(3, "read: %.*s", (int)strcspn(buf, "\r"), buf); + return ret; } @@ -687,6 +717,219 @@ static int krauler_command(const char *cmd, char *buf, size_t buflen) return snprintf(buf, buflen, "%s", cmd); } +/* Fabula communication subdriver */ +static int fabula_command(const char *cmd, char *buf, size_t buflen) +{ + const struct { + const char *str; /* Megatec command */ + const int index; /* Fabula string index for this command */ + } commands[] = { + { "Q1\r", 0x03, }, /* Status */ + { "F\r", 0x0d, }, /* Ratings */ + { "I\r", 0x0c, }, /* Vendor infos */ + { "Q\r", 0x07, }, /* Beeper toggle */ + { "C\r", 0x0a, }, /* Cancel shutdown/Load on [0x(0..F)A]*/ + { NULL } + }; + int i, ret, index = 0; + + upsdebugx(3, "send: %.*s", (int)strcspn(cmd, "\r"), cmd); + + for (i = 0; commands[i].str; i++) { + + if (strcmp(cmd, commands[i].str)) + continue; + + index = commands[i].index; + break; + + } + + if (!index) { + + int val2 = -1; + double val1 = -1; + + /* Shutdowns */ + if ( + sscanf(cmd, "S%lfR%d\r", &val1, &val2) == 2 || + sscanf(cmd, "S%lf\r", &val1) == 1 + ) { + + double delay; + + /* 0x(1+)0 -> shutdown.stayoff (SnR0000) + * 0x(1+)8 -> shutdown.return (Sn[Rm], m != 0) [delay before restart is always 10 seconds] + * +0x10 (16dec) = next megatec delay (min .5 = hex 0x1*; max 10 = hex 0xF*) -> n < 1 ? -> n += .1; n >= 1 ? -> n += 1 */ + + /* delay: [.5..10] (-> seconds: [30..600]) */ + delay = val1 < .5 ? .5 : val1 > 10 ? 10 : val1; + + if (delay < 1) + index = 16 + round((delay - .5) * 10) * 16; + else + index = 96 + (delay - 1) * 16; + + /* shutdown.return (Sn[Rm], m != 0) */ + if (val2) + index += 8; + + /* Unknown commands */ + } else { + + /* Echo the unknown command back */ + upsdebugx(3, "read: %.*s", (int)strcspn(cmd, "\r"), cmd); + return snprintf(buf, buflen, "%s", cmd); + + } + + } + + upsdebugx(4, "command index: 0x%02x", index); + + /* Send command/Read reply */ + ret = usb_get_string_simple(udev, index, buf, buflen); + + if (ret <= 0) { + upsdebugx(3, "read: %s (%d)", ret ? usb_strerror() : "timeout", ret); + return ret; + } + + upsdebug_hex(5, "read", buf, ret); + upsdebugx(3, "read: %.*s", (int)strcspn(buf, "\r"), buf); + + /* The UPS always replies "UPS No Ack" when a supported command is issued (either if it fails or if it succeeds).. */ + if (!strcasecmp(buf, "UPS No Ack")) + /* ..because of that, always return 0 (as if it was a timeout): queries will see it as a failure, instant commands ('megatec' protocol) as a success */ + return 0; + + return ret; +} + +/* Fuji communication subdriver */ +static int fuji_command(const char *cmd, char *buf, size_t buflen) +{ + unsigned char tmp[8]; + char command[SMALLBUF] = "", + read[SMALLBUF] = ""; + int ret, answer_len, val2; + double val1; + size_t i; + const struct { + const char *command; /* Megatec command */ + const int answer_len; /* Expected length of the answer to the ongoing query */ + } query[] = { + { "Q1", 47 }, + { "F", 22 }, + { "I", 39 }, + { NULL } + }; + + /* + * Queries (b1..b8) sent (as a 8-bytes interrupt) to the UPS adopt the following scheme: + * + * b1: 0x80 + * b2: 0x06 + * b3: + * b4: 0x03 + * b5..bn: + * bn+1..b7: [] + * b8: + * + * Where: + * Length (in Hex) of the command (without the trailing CR) + 1 + * Command/query (without the trailing CR) + * [] 0x00 padding to the 7th byte + * Expected length (in Hex) of the answer to the ongoing query (0 when no reply is expected, i.e. commands) + * + * Replies to queries (commands are followed by action without any reply) are sent from the UPS (in 8-byte chunks) with 0x00 padding after the trailing CR to full 8 bytes. + * + */ + + /* Send command */ + + /* Remove the CR */ + snprintf(command, sizeof(command), "%.*s", (int)strcspn(cmd, "\r"), cmd); + + /* Length of the command that will be sent to the UPS can be at most: 8 - 5 (0x80, 0x06, , 0x03, ) = 3. + * As a consequence also 'SnRm' commands (shutdown.{return,stayoff} and load.off) are not supported. + * So, map all the 'SnRm' shutdown.returns (m != 0) as the corresponding 'Sn' commands, meanwhile ignoring ups.delay.start and making the UPS turn on the load as soon as power is back. */ + if (sscanf(cmd, "S%lfR%d\r", &val1, &val2) == 2 && val2) { + upsdebugx(4, "%s: trimming '%s' to '%.*s'", __func__, command, 3, command); + command[3] = 0; + } + /* Too long command */ + if (strlen(command) > 3) { + /* Be 'megatec-y': echo the unsupported command back */ + upsdebugx(3, "%s: unsupported command %s", __func__, command); + return snprintf(buf, buflen, "%s", cmd); + } + + /* Expected length of the answer to the ongoing query (0 when no reply is expected, i.e. commands) */ + answer_len = 0; + for (i = 0; query[i].command; i++) { + + if (strcmp(command, query[i].command)) + continue; + + answer_len = query[i].answer_len; + break; + + } + + memset(tmp, 0, sizeof(tmp)); + + /* 0x80 */ + tmp[0] = 0x80; + /* 0x06 */ + tmp[1] = 0x06; + /* */ + tmp[2] = strlen(command) + 1; + /* 0x03 */ + tmp[3] = 0x03; + /* */ + memcpy(&tmp[4], command, strlen(command)); + /* */ + tmp[7] = answer_len; + + upsdebug_hex(4, "command", (char *)tmp, 8); + + /* Write data */ + ret = usb_interrupt_write(udev, USB_ENDPOINT_OUT | 2, (char *)tmp, 8, USB_TIMEOUT); + + if (ret <= 0) { + upsdebugx(3, "send: %s (%d)", ret ? usb_strerror() : "timeout", ret); + return ret; + } + + upsdebugx(3, "send: %s", command); + + /* Read reply */ + + memset(buf, 0, buflen); + + for (i = 0; (i <= buflen - 8) && (memchr(buf, '\r', buflen) == NULL); i += ret) { + + /* Read data in 8-byte chunks */ + ret = usb_interrupt_read(udev, USB_ENDPOINT_IN | 1, &buf[i], 8, 1000); + + /* Any errors here mean that we are unable to read a reply (which will happen after successfully writing a command to the UPS) */ + if (ret <= 0) { + upsdebugx(3, "read: %s (%d)", ret ? usb_strerror() : "timeout", ret); + return ret; + } + + snprintf(read, sizeof(read), "read [%3d]", (int)i); + upsdebug_hex(5, read, &buf[i], ret); + + } + + upsdebugx(3, "read: %.*s", (int)strcspn(buf, "\r"), buf); + + /* As Fuji units return the reply in 8-byte chunks always padded to the 8th byte with 0x00, we need to calculate and return the length of the actual response here. */ + return (int)strlen(buf); +} + static void *cypress_subdriver(USBDevice_t *device) { subdriver_command = &cypress_command; @@ -711,31 +954,87 @@ static void *phoenix_subdriver(USBDevice_t *device) return NULL; } -/* USB VendorID/ProductID match - note: rightmost comment is used for naming rules by tools/nut-usbinfo.pl */ -static usb_device_id_t qx_usb_id[] = { - { USB_DEVICE(0x05b8, 0x0000), &cypress_subdriver }, /* Agiler UPS */ - { USB_DEVICE(0x0001, 0x0000), &krauler_subdriver }, /* Krauler UP-M500VA */ - { USB_DEVICE(0xffff, 0x0000), &krauler_subdriver }, /* Ablerex 625L USB */ - { USB_DEVICE(0x0665, 0x5161), &cypress_subdriver }, /* Belkin F6C1200-UNV/Voltronic Power UPSes */ - { USB_DEVICE(0x06da, 0x0002), &cypress_subdriver }, /* Online Yunto YQ450 */ - { USB_DEVICE(0x06da, 0x0003), &ippon_subdriver }, /* Mustek Powermust */ - { USB_DEVICE(0x06da, 0x0004), &cypress_subdriver }, /* Phoenixtec Innova 3/1 T */ - { USB_DEVICE(0x06da, 0x0005), &cypress_subdriver }, /* Phoenixtec Innova RT */ - { USB_DEVICE(0x06da, 0x0201), &cypress_subdriver }, /* Phoenixtec Innova T */ - { USB_DEVICE(0x06da, 0x0601), &phoenix_subdriver }, /* Online Zinto A */ - { USB_DEVICE(0x0f03, 0x0001), &cypress_subdriver }, /* Unitek Alpha 1200Sx */ - { USB_DEVICE(0x14f0, 0x00c9), &phoenix_subdriver }, /* GE EP series */ +static void *fabula_subdriver(USBDevice_t *device) +{ + subdriver_command = &fabula_command; + return NULL; +} + +static void *fuji_subdriver(USBDevice_t *device) +{ + subdriver_command = &fuji_command; + return NULL; +} + +/* USB device match structure */ +typedef struct { + const int vendorID; /* USB device's VendorID */ + const int productID; /* USB device's ProductID */ + const char *vendor; /* USB device's iManufacturer string */ + const char *product; /* USB device's iProduct string */ + void *(*fun)(USBDevice_t *); /* Handler for specific processing */ +} qx_usb_device_id_t; + +/* USB VendorID/ProductID/iManufacturer/iProduct match - note: rightmost comment is used for naming rules by tools/nut-usbinfo.pl */ +static qx_usb_device_id_t qx_usb_id[] = { + { USB_DEVICE(0x05b8, 0x0000), NULL, NULL, &cypress_subdriver }, /* Agiler UPS */ + { USB_DEVICE(0xffff, 0x0000), NULL, NULL, &krauler_subdriver }, /* Ablerex 625L USB */ + { USB_DEVICE(0x0665, 0x5161), NULL, NULL, &cypress_subdriver }, /* Belkin F6C1200-UNV/Voltronic Power UPSes */ + { USB_DEVICE(0x06da, 0x0002), NULL, NULL, &cypress_subdriver }, /* Online Yunto YQ450 */ + { USB_DEVICE(0x06da, 0x0003), NULL, NULL, &ippon_subdriver }, /* Mustek Powermust */ + { USB_DEVICE(0x06da, 0x0004), NULL, NULL, &cypress_subdriver }, /* Phoenixtec Innova 3/1 T */ + { USB_DEVICE(0x06da, 0x0005), NULL, NULL, &cypress_subdriver }, /* Phoenixtec Innova RT */ + { USB_DEVICE(0x06da, 0x0201), NULL, NULL, &cypress_subdriver }, /* Phoenixtec Innova T */ + { USB_DEVICE(0x06da, 0x0601), NULL, NULL, &phoenix_subdriver }, /* Online Zinto A */ + { USB_DEVICE(0x0f03, 0x0001), NULL, NULL, &cypress_subdriver }, /* Unitek Alpha 1200Sx */ + { USB_DEVICE(0x14f0, 0x00c9), NULL, NULL, &phoenix_subdriver }, /* GE EP series */ + { USB_DEVICE(0x0001, 0x0000), "MEC", "MEC0003", &fabula_subdriver }, /* Fideltronik/MEC LUPUS 500 USB */ + { USB_DEVICE(0x0001, 0x0000), "ATCL FOR UPS", "ATCL FOR UPS", &fuji_subdriver }, /* Fuji UPSes */ + { USB_DEVICE(0x0001, 0x0000), NULL, NULL, &krauler_subdriver }, /* Krauler UP-M500VA */ /* End of list */ - { -1, -1, NULL } + { -1, -1, NULL, NULL, NULL } }; +static int qx_is_usb_device_supported(qx_usb_device_id_t *usb_device_id_list, USBDevice_t *device) +{ + int retval = NOT_SUPPORTED; + qx_usb_device_id_t *usbdev; + + for (usbdev = usb_device_id_list; usbdev->vendorID != -1; usbdev++) { + + if (usbdev->vendorID != device->VendorID) + continue; + + /* Flag as possibly supported if we see a known vendor */ + retval = POSSIBLY_SUPPORTED; + + if (usbdev->productID != device->ProductID) + continue; + + if (usbdev->vendor && (!device->Vendor || strcasecmp(usbdev->vendor, device->Vendor))) + continue; + + if (usbdev->product && (!device->Product || strcasecmp(usbdev->product, device->Product))) + continue; + + /* Call the specific handler, if it exists */ + if (usbdev->fun != NULL) + (*usbdev->fun)(device); + + return SUPPORTED; + + } + + return retval; +} + static int device_match_func(USBDevice_t *hd, void *privdata) { if (subdriver_command) { return 1; } - switch (is_usb_device_supported(qx_usb_id, hd)) + switch (qx_is_usb_device_supported(qx_usb_id, hd)) { case SUPPORTED: return 1; @@ -837,7 +1136,7 @@ int instcmd(const char *cmdname, const char *extradata) return STAT_INSTCMD_INVALID; } - /* If extradata is empty, use the default value from the blazer to NUT table */ + /* If extradata is empty, use the default value from the QX to NUT table */ extradata = extradata ? extradata : item->dfl; snprintf(value, sizeof(value), "%s", extradata ? extradata : ""); @@ -1264,14 +1563,8 @@ void upsdrv_makevartable(void) #ifdef QX_USB addvar(VAR_VALUE, "subdriver", "Serial-over-USB subdriver selection"); - addvar(VAR_VALUE, "vendorid", "Regular expression to match UPS Manufacturer numerical ID (4 digits hexadecimal)"); - addvar(VAR_VALUE, "productid", "Regular expression to match UPS Product numerical ID (4 digits hexadecimal)"); - - addvar(VAR_VALUE, "vendor", "Regular expression to match UPS Manufacturer string"); - addvar(VAR_VALUE, "product", "Regular expression to match UPS Product string"); - addvar(VAR_VALUE, "serial", "Regular expression to match UPS Serial number"); - - addvar(VAR_VALUE, "bus", "Regular expression to match USB bus name"); + /* allow -x vendor=X, vendorid=X, product=X, productid=X, serial=X */ + nut_usb_addvars(); addvar(VAR_VALUE, "langid_fix", "Apply the language ID workaround to the krauler subdriver (0x409 or 0x4095)"); #endif /* QX_USB */ @@ -1545,6 +1838,8 @@ void upsdrv_initups(void) { "phoenix", &phoenix_command }, { "ippon", &ippon_command }, { "krauler", &krauler_command }, + { "fabula", &fabula_command }, + { "fuji", &fuji_command }, { NULL } }; @@ -1794,7 +2089,7 @@ static int qx_command(const char *cmd, char *buf, size_t buflen) ret = ser_send(upsfd, "%s", cmd); if (ret <= 0) { - upsdebugx(3, "send: %s", ret ? strerror(errno) : "timeout"); + upsdebugx(3, "send: %s (%d)", ret ? strerror(errno) : "timeout", ret); return ret; } @@ -1803,10 +2098,11 @@ static int qx_command(const char *cmd, char *buf, size_t buflen) ret = ser_get_buf(upsfd, buf, buflen, SER_WAIT_SEC, 0); if (ret <= 0) { - upsdebugx(3, "read: %s", ret ? strerror(errno) : "timeout"); + upsdebugx(3, "read: %s (%d)", ret ? strerror(errno) : "timeout", ret); return ret; } + upsdebug_hex(5, "read", buf, ret); upsdebugx(3, "read: '%.*s'", (int)strcspn(buf, "\r"), buf); #ifdef QX_USB @@ -1833,6 +2129,22 @@ static int qx_command(const char *cmd, char *buf, size_t buflen) } upsdebugx(3, "read: '%.*s'", (int)strcspn(testing[i].answer, "\r"), testing[i].answer); + + /* If requested to do so and this is the case, try to preserve inner '\0's (treat answer as a sequence of bytes) */ + if (testing[i].answer_len > 0 && strlen(testing[i].answer) < (size_t)testing[i].answer_len) { + + size_t len; + + len = buflen <= (size_t)testing[i].answer_len ? buflen - 1 : (size_t)testing[i].answer_len; + len = len <= sizeof(testing[i].answer) ? len : sizeof(testing[i].answer); + + memcpy(buf, testing[i].answer, len); + upsdebug_hex(4, "read", buf, (int)len); + + return len; + + } + return snprintf(buf, buflen, "%s", testing[i].answer); } @@ -2038,6 +2350,10 @@ static bool_t qx_ups_walk(walkmode_t mode) batt.chrg.act = -1; } + /* Clear data from previous_item */ + memset(previous_item.command, 0, sizeof(previous_item.command)); + memset(previous_item.answer, 0, sizeof(previous_item.answer)); + /* 3 modes: QX_WALKMODE_INIT, QX_WALKMODE_QUICK_UPDATE and QX_WALKMODE_FULL_UPDATE */ /* Device data walk */ @@ -2133,15 +2449,22 @@ static bool_t qx_ups_walk(walkmode_t mode) retcode = qx_process_answer(item, strlen(item->answer)); /* ..otherwise: execute command to get answer from the UPS */ - } else + } else { + retcode = qx_process(item, NULL); + } + /* Record item as previous_item */ snprintf(previous_item.command, sizeof(previous_item.command), "%s", item->command); snprintf(previous_item.answer, sizeof(previous_item.answer), "%s", item->answer); if (retcode) { + /* Clear data from the item */ + memset(item->answer, 0, sizeof(item->answer)); + memset(item->value, 0, sizeof(item->value)); + if (item->qxflags & QX_FLAG_QUICK_POLL) return FALSE; @@ -2149,10 +2472,6 @@ static bool_t qx_ups_walk(walkmode_t mode) /* Skip this item from now on */ item->qxflags |= QX_FLAG_SKIP; - /* Clear data from the item */ - snprintf(item->answer, sizeof(item->answer), "%s", ""); - snprintf(item->value, sizeof(item->value), "%s", ""); - /* Don't know what happened, try again later... */ continue; @@ -2162,13 +2481,19 @@ static bool_t qx_ups_walk(walkmode_t mode) retcode = ups_infoval_set(item); /* Clear data from the item */ - snprintf(item->answer, sizeof(item->answer), "%s", ""); - snprintf(item->value, sizeof(item->value), "%s", ""); + memset(item->answer, 0, sizeof(item->answer)); + memset(item->value, 0, sizeof(item->value)); /* Uh-oh! Some error! */ - if (retcode == -1) + if (retcode == -1) { + + if (item->qxflags & QX_FLAG_QUICK_POLL) + return FALSE; + continue; + } + /* Set var flags/range/enum (not for ups.{alarm.status}, hence the retcode check) */ if (retcode && mode == QX_WALKMODE_INIT) { qx_set_var(item); @@ -2176,10 +2501,6 @@ static bool_t qx_ups_walk(walkmode_t mode) } - /* Clear data from previous_item */ - snprintf(previous_item.command, sizeof(previous_item.command), "%s", ""); - snprintf(previous_item.answer, sizeof(previous_item.answer), "%s", ""); - /* Update battery guesstimation */ if (mode == QX_WALKMODE_FULL_UPDATE && (batt.runt.act == -1 || batt.chrg.act == -1)) { @@ -2345,14 +2666,26 @@ int qx_process(item_t *item, const char *command) /* Send the command */ int len = qx_command(command ? command : item->command, buf, sizeof(buf)); - snprintf(item->answer, sizeof(item->answer), "%s", buf); + memset(item->answer, 0, sizeof(item->answer)); + memcpy(item->answer, buf, sizeof(item->answer) <= sizeof(buf) ? sizeof(item->answer) - 1 : sizeof(buf)); + + /* Preprocess the answer */ + if (item->preprocess_answer != NULL) { + len = item->preprocess_answer(item, len); + if (len == -1) { + upsdebugx(4, "%s: failed to preprocess answer [%s]", __func__, item->info_type); + return -1; + } + } /* Process the answer to get the value */ return qx_process_answer(item, len); } -/* Process the value we got back (set status bits and set the value of other parameters). */ -/* Return -1 on failure, 0 for a status update and 1 in all other cases */ +/* Process the value we got back (set status bits and set the value of other parameters) and execute: + * - item-specific preprocessing, if any, otherwise + * - the standard preprocessing (including trimming if QX_FLAG_TRIM is set). + * Return -1 on failure, 0 for a status update and 1 in all other cases */ int ups_infoval_set(item_t *item) { char value[SMALLBUF] = ""; @@ -2385,35 +2718,8 @@ int ups_infoval_set(item_t *item) snprintf(value, sizeof(value), "%s", item->value); /* Cover most of the cases: either left/right filled with hashes, spaces or a mix of both */ - if (item->qxflags & QX_FLAG_TRIM) { - - char buf[SMALLBUF]; - - snprintf(buf, sizeof(buf), "%s", ltrim(value, ' ')); - snprintf(value, sizeof(value), "%s", buf); - - snprintf(buf, sizeof(buf), "%s", rtrim(value, ' ')); - snprintf(value, sizeof(value), "%s", buf); - - snprintf(buf, sizeof(buf), "%s", ltrim(value, '#')); - snprintf(value, sizeof(value), "%s", buf); - - snprintf(buf, sizeof(buf), "%s", rtrim(value, '#')); - snprintf(value, sizeof(value), "%s", buf); - - snprintf(buf, sizeof(buf), "%s", ltrim(value, ' ')); - snprintf(value, sizeof(value), "%s", buf); - - snprintf(buf, sizeof(buf), "%s", rtrim(value, ' ')); - snprintf(value, sizeof(value), "%s", buf); - - snprintf(buf, sizeof(buf), "%s", ltrim(value, '#')); - snprintf(value, sizeof(value), "%s", buf); - - snprintf(buf, sizeof(buf), "%s", rtrim(value, '#')); - snprintf(value, sizeof(value), "%s", buf); - - } + if (item->qxflags & QX_FLAG_TRIM) + rtrim_m(ltrim_m(value, "# "), "# "); if (strcasecmp(item->dfl, "%s")) { diff --git a/drivers/nutdrv_qx.h b/drivers/nutdrv_qx.h index b904689..7672c76 100644 --- a/drivers/nutdrv_qx.h +++ b/drivers/nutdrv_qx.h @@ -71,7 +71,8 @@ typedef struct item_t { * If QX_FLAG_SETVAR is set the value given by the user will be checked against these infos. */ const char *command; /* Command sent to the UPS to get answer/to execute an instant command/to set a variable */ - char answer[SMALLBUF]; /* Answer from the UPS, filled at runtime */ + char answer[SMALLBUF]; /* Answer from the UPS, filled at runtime. + * If you expect a nonvalid C string (e.g.: inner '\0's) or need to perform actions before the answer is used (and treated as a null-terminated string), you should set a preprocess_answer() function */ const int answer_len; /* Expected min length of the answer. Set it to 0 if there’s no minimum length to look after. */ const char leading; /* Expected leading character of the answer (optional) */ @@ -87,6 +88,10 @@ typedef struct item_t { unsigned long qxflags; /* Driver's own flags */ + int (*preprocess_answer)(struct item_t *item, const int len); /* Function to preprocess the answer we got from the UPS before we do anything else (e.g. for CRC, decoding, ...) + * This function is given the currently processed item (item) with the answer we got from the UPS unmolested and already stored in item->answer and the length of that answer (len). + * Return -1 in case of errors, else the length of the newly allocated item->answer (from now on, treated as a null-terminated string). */ + int (*preprocess)(struct item_t *item, char *value, size_t valuelen); /* Function to preprocess the data from/to the UPS * This function is given the currently processed item (item), a char array (value) and its size_t (valuelen). * Return -1 in case of errors, else 0. @@ -111,11 +116,17 @@ typedef struct item_t { #define MAXTRIES 3 /* Max number of retries */ +#ifdef TESTING /* Testing struct */ typedef struct { - const char *cmd; /* Command to match */ - const char *answer; /* Answer for that command */ + const char *cmd; /* Command to match */ + const char answer[SMALLBUF]; /* Answer for that command. + * Note: if 'answer' contains inner '\0's, in order to preserve them, 'answer_len' as well as an item_t->preprocess_answer() function must be set */ + const int answer_len; /* Answer length: + * - if set to -1 -> auto calculate answer length (treat 'answer' as a null-terminated string) + * - otherwise -> use the provided length (if reasonable) and preserve inner '\0's (treat 'answer' as a sequence of bytes till the item_t->preprocess_answer() function gets called) */ } testing_t; +#endif /* TESTING */ /* Subdriver interface */ typedef struct { @@ -148,7 +159,8 @@ int setvar(const char *varname, const char *val); item_t *find_nut_info(const char *varname, const unsigned long flag, const unsigned long noflag); /* Send 'command' or, if it is NULL, send the command stored in the item to the UPS and process the reply. Return -1 on errors, 0 on success. */ int qx_process(item_t *item, const char *command); - /* Process the value we got back from the UPS (set status bits and set the value of other parameters), calling its preprocess function, if any. Return -1 on failure, 0 for a status update and 1 in all other cases. */ + /* Process the value we got back from the UPS (set status bits and set the value of other parameters), calling its preprocess function, if any, otherwise executing the standard preprocessing (including trimming if QX_FLAG_TRIM is set). + * Return -1 on failure, 0 for a status update and 1 in all other cases. */ int ups_infoval_set(item_t *item); /* Return the currently processed status so that it can be checked with one of the status_bit_t passed to the STATUS() macro. */ int qx_status(void); diff --git a/drivers/nutdrv_qx_bestups.c b/drivers/nutdrv_qx_bestups.c new file mode 100644 index 0000000..1e15b27 --- /dev/null +++ b/drivers/nutdrv_qx_bestups.c @@ -0,0 +1,705 @@ +/* nutdrv_qx_bestups.c - Subdriver for Best Power/Sola Australia UPSes + * + * Copyright (C) + * 2014 Daniele Pezzini + * Based on: + * bestups.c - Copyright (C) + * 1999 Russell Kroll + * Jason White + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include "main.h" +#include "nutdrv_qx.h" +#include "nutdrv_qx_blazer-common.h" + +#include "nutdrv_qx_bestups.h" + +#define BESTUPS_VERSION "BestUPS 0.04" + +/* Support functions */ +static int bestups_claim(void); +static void bestups_initups(void); +static void bestups_makevartable(void); + +/* Answer preprocess functions */ +static int bestups_preprocess_id_answer(item_t *item, const int len); + +/* Preprocess functions */ +static int bestups_process_setvar(item_t *item, char *value, size_t valuelen); +static int bestups_process_bbb_status_bit(item_t *item, char *value, size_t valuelen); +static int bestups_manufacturer(item_t *item, char *value, size_t valuelen); +static int bestups_model(item_t *item, char *value, size_t valuelen); +static int bestups_batt_runtime(item_t *item, char *value, size_t valuelen); +static int bestups_batt_packs(item_t *item, char *value, size_t valuelen); +static int bestups_get_pins_shutdown_mode(item_t *item, char *value, size_t valuelen); +static int bestups_voltage_settings(item_t *item, char *value, size_t valuelen); + +/* ups.conf settings */ +static int pins_shutdown_mode; + +/* General settings */ +static int inverted_bbb_bit = 0; + + +/* == Ranges/enums == */ + +/* Range for ups.delay.start */ +info_rw_t bestups_r_ondelay[] = { + { "60", 0 }, + { "599940", 0 }, + { "", 0 } +}; + +/* Range for ups.delay.shutdown */ +static info_rw_t bestups_r_offdelay[] = { + { "12", 0 }, + { "5940", 0 }, + { "", 0 } +}; + +/* Range for number of battery packs */ +static info_rw_t bestups_r_batt_packs[] = { + { "0", 0 }, + { "5", 0 }, + { "", 0 } +}; + +/* Range for pin shutdown mode */ +static info_rw_t bestups_r_pins_shutdown_mode[] = { + { "0", 0 }, + { "6", 0 }, + { "", 0 } +}; + + +/* == qx2nut lookup table == */ +static item_t bestups_qx2nut[] = { + + /* Query UPS for status + * > [Q1\r] + * < [(226.0 195.0 226.0 014 49.0 27.5 30.0 00001000\r] + * 01234567890123456789012345678901234567890123456 + * 0 1 2 3 4 + */ + + { "input.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL, NULL }, + { "input.voltage.fault", 0, NULL, "Q1\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL, NULL }, + { "output.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL, NULL }, + { "ups.load", 0, NULL, "Q1\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL, NULL }, + { "input.frequency", 0, NULL, "Q1\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL, NULL }, + { "battery.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL, NULL }, + { "ups.temperature", 0, NULL, "Q1\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL, NULL }, + /* Status bits */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Battery Low */ + { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 41, 41, NULL, 0, NULL, blazer_process_status_bits }, /* UPS Failed */ + { "ups.type", 0, NULL, "Q1\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, NULL, blazer_process_status_bits }, /* UPS Type */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Test in Progress */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Shutdown Active */ +/* { "ups.beeper.status", 0, NULL, "Q1\r", "", 47, '(', "", 45, 45, "%s", 0, NULL, blazer_process_status_bits }, *//* Beeper status: not supported; always 0 */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, NULL, bestups_process_bbb_status_bit }, /* Bypass/Boost or Buck Active - keep this one at the end as it needs the processed data from the previous items */ + + /* Query UPS for ratings and model infos + * > [ID\r] + * < [FOR,750,120,120,20.0,27.6\r] case #1: length = 26 + * < [FOR,1500,120,120,20.0,27.6\r] case #2: length = 27 + * < [FOR,3000,120,120,20.0,100.6\r] case #3: length = 28 + * < [FOR, 750,120,120,20.0, 27.6\r] after being preprocessed: length = 28 + * 0123456789012345678901234567 + * 0 1 2 + */ + + { "device.mfr", 0, NULL, "ID\r", "", 28, 0, "", 0, 2, "%s", QX_FLAG_STATIC, bestups_preprocess_id_answer, bestups_manufacturer }, + { "device.model", 0, NULL, "ID\r", "", 28, 0, "", 0, 2, "%s", QX_FLAG_STATIC, bestups_preprocess_id_answer, bestups_model }, + { "ups.power.nominal", 0, NULL, "ID\r", "", 28, 0, "", 4, 7, "%.0f", QX_FLAG_STATIC, bestups_preprocess_id_answer, NULL }, + { "input.voltage.nominal", 0, NULL, "ID\r", "", 28, 0, "", 9, 11, "%.0f", QX_FLAG_STATIC, bestups_preprocess_id_answer, NULL }, + { "output.voltage.nominal", 0, NULL, "ID\r", "", 28, 0, "", 13, 15, "%.0f", QX_FLAG_STATIC, bestups_preprocess_id_answer, NULL }, + { "battery.voltage.low", 0, NULL, "ID\r", "", 28, 0, "", 17, 20, "%.1f", QX_FLAG_SEMI_STATIC, bestups_preprocess_id_answer, NULL }, + { "battery.voltage.high", 0, NULL, "ID\r", "", 28, 0, "", 22, 26, "%.1f", QX_FLAG_SEMI_STATIC, bestups_preprocess_id_answer, NULL }, + + /* Query UPS for battery runtime (not available on the Patriot Pro/Sola 320 model series) + * > [RT\r] + * < [025\r] + * 0123 + * 0 + */ + + { "battery.runtime", 0, NULL, "RT\r", "", 4, 0, "", 0, 2, "%.0f", QX_FLAG_SKIP, NULL, bestups_batt_runtime }, + + /* Query UPS for number of battery packs (available only on the Axxium/Sola 620 model series) + * > [BP?\r] + * < [02\r] + * 012 + * 0 + */ + + { "battery.packs", ST_FLAG_RW, bestups_r_batt_packs, "BP?\r", "", 3, 0, "", 0, 1, "%d", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, bestups_batt_packs }, + + /* Set number of battery packs to n (integer, 0-5) (available only on the Axxium/Sola 620 model series) + * > [BPn\r] + * < [] + */ + + { "battery.packs", 0, bestups_r_batt_packs, "BP%.0f\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, bestups_process_setvar }, + + /* Query UPS for shutdown mode functionality of Pin 1 and Pin 7 on the UPS DB9 communication port (Per Best Power’s EPS-0059) + * > [SS?\r] + * < [0\r] + * 01 + * 0 + */ + + { "pins_shutdown_mode", ST_FLAG_RW, bestups_r_pins_shutdown_mode, "SS?\r", "", 2, 0, "", 0, 0, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT, NULL, bestups_get_pins_shutdown_mode }, + + /* Set shutdown mode functionality of Pin 1 and Pin 7 on the UPS DB9 communication port (Per Best Power’s EPS-0059) to n (integer, 0-6) + * > [SSn\r] + * < [] + */ + + { "pins_shutdown_mode", 0, bestups_r_pins_shutdown_mode, "SS%.0f\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, bestups_process_setvar }, + + /* Query UPS for voltage settings + * > [M\r] + * < [0\r] + * 01 + * 0 + */ + + { "input.transfer.low", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%d", 0, NULL, bestups_voltage_settings }, + { "input.transfer.boost.low", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%d", 0, NULL, bestups_voltage_settings }, + { "input.transfer.boost.high", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%d", 0, NULL, bestups_voltage_settings }, + { "input.voltage.nominal", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%d", 0, NULL, bestups_voltage_settings }, + { "output.voltage.nominal", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%d", 0, NULL, bestups_voltage_settings }, + { "input.transfer.trim.low", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%d", 0, NULL, bestups_voltage_settings }, + { "input.transfer.trim.high", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%d", 0, NULL, bestups_voltage_settings }, + { "input.transfer.high", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%d", 0, NULL, bestups_voltage_settings }, + + /* Instant commands */ + { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stayoff", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + + /* Server-side settable vars */ + { "ups.delay.start", ST_FLAG_RW, bestups_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, bestups_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + + /* End of structure. */ + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL, NULL } +}; + + +/* == Testing table == */ +#ifdef TESTING +static testing_t bestups_testing[] = { + { "Q1\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00100000\r", -1 }, + { "ID\r", "FOR,750,120,120,20.0,27.6\r", -1 }, + { "RT\r", "015\r", -1 }, + { "BP?\r", "02\r", -1 }, + { "BP1\r", "", -1 }, + { "SS?\r", "0\r", -1 }, + { "SS2\r", "", -1 }, + { "M\r", "0\r", -1 }, + { "S03\r", "", -1 }, + { "C\r", "", -1 }, + { "S02R0005\r", "", -1 }, + { "S.5R0001\r", "", -1 }, + { "T04\r", "", -1 }, + { "TL\r", "", -1 }, + { "T\r", "", -1 }, + { "CT\r", "", -1 }, + { NULL } +}; +#endif /* TESTING */ + + +/* == Support functions == */ + +/* This function allows the subdriver to "claim" a device: return 1 if the device is supported by this subdriver, else 0. */ +static int bestups_claim(void) +{ + /* We need at least Q1 and ID to run this subdriver */ + + item_t *item = find_nut_info("input.voltage", 0, 0); + + /* Don't know what happened */ + if (!item) + return 0; + + /* No reply/Unable to get value */ + if (qx_process(item, NULL)) + return 0; + + /* Unable to process value */ + if (ups_infoval_set(item) != 1) + return 0; + + /* UPS Model */ + item = find_nut_info("device.model", 0, 0); + + /* Don't know what happened */ + if (!item) { + dstate_delinfo("input.voltage"); + return 0; + } + + /* No reply/Unable to get value */ + if (qx_process(item, NULL)) { + dstate_delinfo("input.voltage"); + return 0; + } + + /* Unable to process value */ + if (ups_infoval_set(item) != 1) { + dstate_delinfo("input.voltage"); + return 0; + } + + return 1; +} + +/* Subdriver-specific initups */ +static void bestups_initups(void) +{ + blazer_initups_light(bestups_qx2nut); +} + +/* Subdriver-specific flags/vars */ +static void bestups_makevartable(void) +{ + addvar(VAR_VALUE, "pins_shutdown_mode", "Set shutdown mode functionality of Pin 1 and Pin 7 on the UPS DB9 communication port (Per Best Power’s EPS-0059) to n (integer, 0-6)"); + + blazer_makevartable_light(); +} + + +/* == Answer preprocess functions == */ + +/* Preprocess the answer we got back from the UPS when queried with 'ID\r': make data begin always at the same indexes */ +static int bestups_preprocess_id_answer(item_t *item, const int len) +{ + int i; + char refined[SMALLBUF] = "", + rawval[SMALLBUF] = "", + *token, + *saveptr = NULL; + + if (len <= 0) + return len; + + if (len < 25 || len > 27) { + upsdebugx(4, "%s: wrong length [%s: %d]", __func__, item->info_type, len); + return -1; + } + + /* e.g.: + * 1. item->answer = "FOR,750,120,120,20.0,27.6\r"; len = 26 + * 2. item->answer = "FOR,1500,120,120,20.0,27.6\r"; len = 27 + * 3. item->answer = "FOR,3000,120,120,20.0,100.6\r"; len = 28 */ + upsdebugx(4, "read: '%.*s'", (int)strcspn(item->answer, "\r"), item->answer); + + snprintf(rawval, sizeof(rawval), "%s", item->answer); + + for (i = 1, token = strtok_r(rawval, ",", &saveptr); token != NULL; i++, token = strtok_r(NULL, ",", &saveptr)) { + + switch (i) + { + case 1: + snprintf(refined, sizeof(refined), "%s", token); + continue; + case 2: /* Output power */ + snprintfcat(refined, sizeof(refined), ",%4s", token); + continue; + case 6: /* Battery voltage at full charge (+ trailing CR) */ + snprintfcat(refined, sizeof(refined), ",%6s", token); + continue; + default: + snprintfcat(refined, sizeof(refined), ",%s", token); + } + + } + + if (i != 7 || strlen(refined) != 28) { + upsdebugx(2, "noncompliant reply: '%.*s'", (int)strcspn(refined, "\r"), refined); + return -1; + } + + upsdebugx(4, "read: '%.*s'", (int)strcspn(refined, "\r"), refined); + + /* e.g.: item->answer = "FOR, 750,120,120,20.0, 27.6\r"; len = 28 */ + return snprintf(item->answer, sizeof(item->answer), "%s", refined); +} + + +/* == Preprocess functions == */ + +/* *SETVAR(/NONUT)* Preprocess setvars */ +static int bestups_process_setvar(item_t *item, char *value, size_t valuelen) +{ + if (!strlen(value)) { + upsdebugx(2, "%s: value not given for %s", __func__, item->info_type); + return -1; + } + + double val = strtod(value, NULL); + + if (!strcasecmp(item->info_type, "pins_shutdown_mode")) { + + if (val == pins_shutdown_mode) { + upslogx(LOG_INFO, "%s is already set to %.0f", item->info_type, val); + return -1; + } + + } + + snprintf(value, valuelen, item->command, val); + + return 0; +} + +/* Bypass/Boost or Buck status */ +static int bestups_process_bbb_status_bit(item_t *item, char *value, size_t valuelen) +{ + /* Bypass/Boost/Buck bit is not reliable when a battery test, shutdown or on battery condition occurs: always ignore it in these cases */ + if (!(qx_status() & STATUS(OL)) || (qx_status() & (STATUS(CAL) | STATUS(FSD)))) { + + if (item->value[0] == '1') + item->value[0] = '0'; + + return blazer_process_status_bits(item, value, valuelen); + + } + + /* UPSes with inverted bypass/boost/buck bit */ + if (inverted_bbb_bit) { + + if (item->value[0] == '1') + item->value[0] = '0'; + + else if (item->value[0] == '0') + item->value[0] = '1'; + + } + + return blazer_process_status_bits(item, value, valuelen); +} + +/* Identify UPS manufacturer */ +static int bestups_manufacturer(item_t *item, char *value, size_t valuelen) +{ + /* Best Power devices */ + if ( + !strcmp(item->value, "AX1") || + !strcmp(item->value, "FOR") || + !strcmp(item->value, "FTC") || + !strcmp(item->value, "PR2") || + !strcmp(item->value, "PRO") + ) { + snprintf(value, valuelen, item->dfl, "Best Power"); + return 0; + } + + /* Sola Australia devices */ + if ( + !strcmp(item->value, "325") || + !strcmp(item->value, "520") || + !strcmp(item->value, "620") + ) { + snprintf(value, valuelen, item->dfl, "Sola Australia"); + return 0; + } + + /* Unknown devices */ + snprintf(value, valuelen, item->dfl, "Unknown"); + return 0; +} + +/* Identify UPS model and unskip qx2nut table's items accordingly */ +static int bestups_model(item_t *item, char *value, size_t valuelen) +{ + item_t *unskip; + + /* Best Power devices */ + + if (!strcmp(item->value, "AX1")) { + + snprintf(value, valuelen, item->dfl, "Axxium Rackmount"); + + } else if (!strcmp(item->value, "FOR")) { + + snprintf(value, valuelen, item->dfl, "Fortress"); + + } else if (!strcmp(item->value, "FTC")) { + + snprintf(value, valuelen, item->dfl, "Fortress Telecom"); + + } else if (!strcmp(item->value, "PR2")) { + + snprintf(value, valuelen, item->dfl, "Patriot Pro II"); + inverted_bbb_bit = 1; + + } else if (!strcmp(item->value, "PRO")) { + + snprintf(value, valuelen, item->dfl, "Patriot Pro"); + inverted_bbb_bit = 1; + + /* Sola Australia devices */ + } else if ( + !strcmp(item->value, "320") || + !strcmp(item->value, "325") || + !strcmp(item->value, "520") || + !strcmp(item->value, "525") || + !strcmp(item->value, "620") + ) { + + snprintf(value, valuelen, "Sola %s", item->value); + + /* Unknown devices */ + } else { + + snprintf(value, valuelen, item->dfl, "Unknown (%s)", item->value); + upslogx(LOG_INFO, "Unknown model detected - please report this ID: '%s'", item->value); + + } + + /* Unskip qx2nut table's items according to the UPS model */ + + /* battery.runtime var is not available on the Patriot Pro/Sola 320 model series: leave it skipped in these cases, otherwise unskip it */ + if (strcmp(item->value, "PRO") && strcmp(item->value, "320")) { + + unskip = find_nut_info("battery.runtime", 0, 0); + + /* Don't know what happened */ + if (!unskip) + return -1; + + unskip->qxflags &= ~QX_FLAG_SKIP; + + } + + /* battery.packs var is available only on the Axxium/Sola 620 model series: unskip it in these cases */ + if (!strcmp(item->value, "AX1") || !strcmp(item->value, "620")) { + + unskip = find_nut_info("battery.packs", 0, QX_FLAG_SETVAR); + + /* Don't know what happened */ + if (!unskip) + return -1; + + unskip->qxflags &= ~QX_FLAG_SKIP; + + } + + return 0; +} + +/* Battery runtime */ +static int bestups_batt_runtime(item_t *item, char *value, size_t valuelen) +{ + double runtime; + + if (strspn(item->value, "0123456789 .") != strlen(item->value)) { + upsdebugx(2, "%s: non numerical value [%s: %s]", __func__, item->info_type, item->value); + return -1; + } + + /* Battery runtime is reported by the UPS in minutes, NUT expects seconds */ + runtime = strtod(item->value, NULL) * 60; + + snprintf(value, valuelen, item->dfl, runtime); + + return 0; +} + +/* Battery packs */ +static int bestups_batt_packs(item_t *item, char *value, size_t valuelen) +{ + item_t *unskip; + + if (strspn(item->value, "0123456789 ") != strlen(item->value)) { + upsdebugx(2, "%s: non numerical value [%s: %s]", __func__, item->info_type, item->value); + return -1; + } + + snprintf(value, valuelen, item->dfl, strtol(item->value, NULL, 10)); + + /* Unskip battery.packs setvar */ + unskip = find_nut_info("battery.packs", QX_FLAG_SETVAR, 0); + + /* Don't know what happened */ + if (!unskip) + return -1; + + unskip->qxflags &= ~QX_FLAG_SKIP; + + return 0; +} + +/* *NONUT* Get shutdown mode functionality of Pin 1 and Pin 7 on the UPS DB9 communication port (Per Best Power’s EPS-0059) as set in the UPS */ +static int bestups_get_pins_shutdown_mode(item_t *item, char *value, size_t valuelen) +{ + item_t *unskip; + + if (strspn(item->value, "0123456789") != strlen(item->value)) { + upsdebugx(2, "%s: non numerical value [%s: %s]", __func__, item->info_type, item->value); + return -1; + } + + pins_shutdown_mode = strtol(item->value, NULL, 10); + + snprintf(value, valuelen, item->dfl, pins_shutdown_mode); + + /* We were not asked by the user to change the value */ + if ((item->qxflags & QX_FLAG_NONUT) && !getval(item->info_type)) + return 0; + + /* Unskip setvar */ + unskip = find_nut_info(item->info_type, QX_FLAG_SETVAR, 0); + + /* Don't know what happened */ + if (!unskip) + return -1; + + unskip->qxflags &= ~QX_FLAG_SKIP; + + return 0; +} + +/* Voltage settings */ +static int bestups_voltage_settings(item_t *item, char *value, size_t valuelen) +{ + int index, val; + const char *nominal_voltage; + const struct { + const int low; /* Low voltage -> input.transfer.low / input.transfer.boost.low */ + const int boost; /* Boost voltage -> input.transfer.boost.high */ + const int nominal; /* Nominal voltage -> input.voltage.nominal / output.voltage.nominal */ + const int buck; /* Buck voltage -> input.transfer.trim.low */ + const int high; /* High voltage -> input.transfer.high / input.transfer.trim.high */ + } voltage_settings[] = { + /* U models voltage limits, for: + * - Fortress (750U, 1050U, 1425U, 1800U and 2250U) + * - Fortress Rackmount (750, 1050, 1425, 1800, and 2250 VA) + * - Patriot Pro II (400U, 750U, and 1000U) */ + /* M low boost nominal buck high */ + /* 0 */ { 96, 109, 120, 130, 146 }, /* LEDs lit: 2,3,4 (Default) */ + /* 1 */ { 96, 109, 120, 138, 156 }, /* LEDs lit: 1,3,4 */ + /* 2 */ { 90, 104, 120, 130, 146 }, /* LEDs lit: 2,3,5 */ + /* 3 */ { 90, 104, 120, 138, 156 }, /* LEDs lit: 1,3,5 */ + /* 4 */ { 90, 104, 110, 120, 130 }, /* LEDs lit: 3,4,5 */ + /* 5 */ { 90, 104, 110, 130, 146 }, /* LEDs lit: 2,4,5 */ + /* 6 */ { 90, 96, 110, 120, 130 }, /* LEDs lit: 3,4,6 */ + /* 7 */ { 90, 96, 110, 130, 146 }, /* LEDs lit: 2,4,6 */ + /* 8 */ { 96, 109, 128, 146, 156 }, /* LEDs lit: 1,2,4 */ + /* 9 */ { 90, 104, 128, 146, 156 }, /* LEDs lit: 1,2,5 */ + + /* E models voltage limits, for: + * - Fortress (750E, 1050E, 1425E, and 2250E) + * - Fortress Rackmount (750, 1050, 1425, and 2250 VA) + * - Patriot Pro II (400E, 750E, and 1000E) */ + /* M low boost nominal buck high */ + /* 0 */ { 200, 222, 240, 250, 284 }, /* LEDs lit: 2,3,4 */ + /* 1 */ { 200, 222, 240, 264, 290 }, /* LEDs lit: 1,3,4 */ + /* 2 */ { 188, 210, 240, 250, 284 }, /* LEDs lit: 2,3,5 */ + /* 3 */ { 188, 210, 240, 264, 290 }, /* LEDs lit: 1,3,5 */ + /* 4 */ { 188, 210, 230, 244, 270 }, /* LEDs lit: 3,4,5 (Default) */ + /* 5 */ { 188, 210, 230, 250, 284 }, /* LEDs lit: 2,4,5 */ + /* 6 */ { 180, 200, 230, 244, 270 }, /* LEDs lit: 3,4,6 */ + /* 7 */ { 180, 200, 230, 250, 284 }, /* LEDs lit: 2,4,6 */ + /* 8 */ { 165, 188, 208, 222, 244 }, /* LEDs lit: 4,5,6 */ + /* 9 */ { 165, 188, 208, 244, 270 } /* LEDs lit: 3,5,6 */ + }; + + if (strspn(item->value, "0123456789") != strlen(item->value)) { + upsdebugx(2, "%s: non numerical value [%s: %s]", __func__, item->info_type, item->value); + return -1; + } + + index = strtol(item->value, NULL, 10); + + if (index < 0 || index > 9) { + upsdebugx(2, "%s: value '%d' out of range [0..9]", __func__, index); + return -1; + } + + nominal_voltage = dstate_getinfo("input.voltage.nominal"); + + if (!nominal_voltage) + nominal_voltage = dstate_getinfo("output.voltage.nominal"); + + if (!nominal_voltage) { + upsdebugx(2, "%s: unable to get nominal voltage", __func__); + return -1; + } + + /* E models */ + if (strtol(nominal_voltage, NULL, 10) > 160) + index += 10; + + if (!strcasecmp(item->info_type, "input.transfer.low") || !strcasecmp(item->info_type, "input.transfer.boost.low")) { + + val = voltage_settings[index].low; + + } else if (!strcasecmp(item->info_type, "input.transfer.boost.high")) { + + val = voltage_settings[index].boost; + + } else if (!strcasecmp(item->info_type, "input.voltage.nominal") || !strcasecmp(item->info_type, "output.voltage.nominal")) { + + val = voltage_settings[index].nominal; + + } else if (!strcasecmp(item->info_type, "input.transfer.trim.low")) { + + val = voltage_settings[index].buck; + + } else if (!strcasecmp(item->info_type, "input.transfer.trim.high") || !strcasecmp(item->info_type, "input.transfer.high")) { + + val = voltage_settings[index].high; + + } else { + + /* Don't know what happened */ + return -1; + + } + + snprintf(value, valuelen, item->dfl, val); + + return 0; +} + + +/* == Subdriver interface == */ +subdriver_t bestups_subdriver = { + BESTUPS_VERSION, + bestups_claim, + bestups_qx2nut, + bestups_initups, + NULL, + bestups_makevartable, + NULL, + NULL, +#ifdef TESTING + bestups_testing, +#endif /* TESTING */ +}; diff --git a/drivers/nutdrv_qx_bestups.h b/drivers/nutdrv_qx_bestups.h new file mode 100644 index 0000000..4f1e560 --- /dev/null +++ b/drivers/nutdrv_qx_bestups.h @@ -0,0 +1,29 @@ +/* nutdrv_qx_bestups.h - Subdriver for Best Power/Sola Australia UPSes + * + * Copyright (C) + * 2014 Daniele Pezzini + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef NUTDRV_QX_BESTUPS_H +#define NUTDRV_QX_BESTUPS_H + +#include "nutdrv_qx.h" + +extern subdriver_t bestups_subdriver; + +#endif /* NUTDRV_QX_BESTUPS_H */ diff --git a/drivers/nutdrv_qx_blazer-common.c b/drivers/nutdrv_qx_blazer-common.c index 1221778..04fb7ae 100644 --- a/drivers/nutdrv_qx_blazer-common.c +++ b/drivers/nutdrv_qx_blazer-common.c @@ -42,8 +42,8 @@ info_rw_t blazer_r_offdelay[] = { /* == Support functions == */ /* This function allows the subdriver to "claim" a device: return 1 if the device is supported by this subdriver, else 0. */ -int blazer_claim(void) { - +int blazer_claim(void) +{ /* To tell whether the UPS is supported or not, we'll check both status (Q1/QS/D) and vendor (I/FW?) - provided that we were not told not to do it with the ups.conf flag 'novendor'. */ item_t *item = find_nut_info("input.voltage", 0, 0); @@ -85,13 +85,12 @@ int blazer_claim(void) { } return 1; - } /* This function allows the subdriver to "claim" a device: return 1 if the device is supported by this subdriver, else 0. * NOTE: this 'light' version only checks for status (Q1/QS/D/..) */ -int blazer_claim_light(void) { - +int blazer_claim_light(void) +{ /* To tell whether the UPS is supported or not, we'll check just status (Q1/QS/D/..). */ item_t *item = find_nut_info("input.voltage", 0, 0); @@ -109,7 +108,6 @@ int blazer_claim_light(void) { return 0; return 1; - } /* Subdriver-specific flags/vars */ @@ -117,18 +115,28 @@ void blazer_makevartable(void) { addvar(VAR_FLAG, "norating", "Skip reading rating information from UPS"); addvar(VAR_FLAG, "novendor", "Skip reading vendor information from UPS"); + + blazer_makevartable_light(); +} + +/* Subdriver-specific flags/vars + * NOTE: this 'light' version only handles vars/flags related to UPS status query (Q1/QS/D/...) */ +void blazer_makevartable_light(void) +{ + addvar(VAR_FLAG, "ignoresab", "Ignore 'Shutdown Active' bit in UPS status"); } /* Subdriver-specific initups */ void blazer_initups(item_t *qx2nut) { - int nr, nv; + int nr, nv, isb; item_t *item; nr = testvar("norating"); nv = testvar("novendor"); + isb = testvar("ignoresab"); - if (!nr && !nv) + if (!nr && !nv && !isb) return; for (item = qx2nut; item->info_type != NULL; item++) { @@ -148,6 +156,33 @@ void blazer_initups(item_t *qx2nut) item->qxflags |= QX_FLAG_SKIP; } + /* ignoresab */ + if (isb && !strcasecmp(item->info_type, "ups.status") && item->from == 44 && item->to == 44) { + upsdebugx(2, "%s: skipping %s ('Shutdown Active' bit)", __func__, item->info_type); + item->qxflags |= QX_FLAG_SKIP; + } + + } +} + +/* Subdriver-specific initups + * NOTE: this 'light' version only checks for status (Q1/QS/D/..) related items */ +void blazer_initups_light(item_t *qx2nut) +{ + item_t *item; + + if (!testvar("ignoresab")) + return; + + for (item = qx2nut; item->info_type != NULL; item++) { + + if (strcasecmp(item->info_type, "ups.status") || item->from != 44 || item->to != 44) + continue; + + upsdebugx(2, "%s: skipping %s ('Shutdown Active' bit)", __func__, item->info_type); + item->qxflags |= QX_FLAG_SKIP; + break; + } } @@ -350,14 +385,10 @@ int blazer_process_status_bits(item_t *item, char *value, size_t valuelen) case 44: /* Shutdown Active */ - if (item->value[0] == '1') { - if (!strcasecmp(item->info_type, "ups.status")) - val = "FSD"; - else /* ups.alarm */ - val = "Shutdown imminent!"; - } else if (!strcasecmp(item->info_type, "ups.status")) { + if (item->value[0] == '1') + val = "FSD"; + else val = "!FSD"; - } break; case 45: /* Beeper status - ups.beeper.status */ diff --git a/drivers/nutdrv_qx_blazer-common.h b/drivers/nutdrv_qx_blazer-common.h index aee3864..1cab5be 100644 --- a/drivers/nutdrv_qx_blazer-common.h +++ b/drivers/nutdrv_qx_blazer-common.h @@ -26,7 +26,9 @@ /* Support functions */ void blazer_makevartable(void); +void blazer_makevartable_light(void); void blazer_initups(item_t *qx2nut); +void blazer_initups_light(item_t *qx2nut); int blazer_claim(void); int blazer_claim_light(void); diff --git a/drivers/nutdrv_qx_mecer.c b/drivers/nutdrv_qx_mecer.c index 5160343..7386754 100644 --- a/drivers/nutdrv_qx_mecer.c +++ b/drivers/nutdrv_qx_mecer.c @@ -25,7 +25,7 @@ #include "nutdrv_qx_mecer.h" -#define MECER_VERSION "Mecer 0.02" +#define MECER_VERSION "Mecer 0.05" /* Support functions */ static int mecer_claim(void); @@ -46,7 +46,7 @@ static item_t mecer_qx2nut[] = { * 0 */ - { "ups.firmware.aux", 0, NULL, "QPI\r", "", 6, '(', "", 1, 4, "%s", QX_FLAG_STATIC, voltronic_p98_protocol }, + { "ups.firmware.aux", 0, NULL, "QPI\r", "", 6, '(', "", 1, 4, "%s", QX_FLAG_STATIC, NULL, voltronic_p98_protocol }, /* * > [Q1\r] @@ -55,23 +55,22 @@ static item_t mecer_qx2nut[] = { * 0 1 2 3 4 */ - { "input.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL }, - { "input.voltage.fault", 0, NULL, "Q1\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL }, - { "output.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL }, - { "ups.load", 0, NULL, "Q1\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL }, - { "input.frequency", 0, NULL, "Q1\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL }, - { "battery.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL }, - { "ups.temperature", 0, NULL, "Q1\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL }, + { "input.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL, NULL }, + { "input.voltage.fault", 0, NULL, "Q1\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL, NULL }, + { "output.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL, NULL }, + { "ups.load", 0, NULL, "Q1\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL, NULL }, + { "input.frequency", 0, NULL, "Q1\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL, NULL }, + { "battery.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL, NULL }, + { "ups.temperature", 0, NULL, "Q1\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL, NULL }, /* Status bits */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Battery Low */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ - { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 41, 41, NULL, 0, blazer_process_status_bits }, /* UPS Failed */ - { "ups.type", 0, NULL, "Q1\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, blazer_process_status_bits }, /* UPS Type */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Test in Progress */ - { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, 0, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.beeper.status", 0, NULL, "Q1\r", "", 47, '(', "", 45, 45, "%s", 0, blazer_process_status_bits }, /* Beeper status */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Battery Low */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 41, 41, NULL, 0, NULL, blazer_process_status_bits }, /* UPS Failed */ + { "ups.type", 0, NULL, "Q1\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, NULL, blazer_process_status_bits }, /* UPS Type */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Test in Progress */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Shutdown Active */ + { "ups.beeper.status", 0, NULL, "Q1\r", "", 47, '(', "", 45, 45, "%s", 0, NULL, blazer_process_status_bits }, /* Beeper status */ /* * > [F\r] @@ -80,10 +79,10 @@ static item_t mecer_qx2nut[] = { * 0 1 2 */ - { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL }, - { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL }, - { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL }, - { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL }, + { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL, NULL }, + { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL, NULL }, /* * > [I\r] @@ -92,49 +91,49 @@ static item_t mecer_qx2nut[] = { * 0 1 2 3 */ - { "device.mfr", 0, NULL, "I\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "device.model", 0, NULL, "I\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "ups.firmware", 0, NULL, "I\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, + { "device.mfr", 0, NULL, "I\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "device.model", 0, NULL, "I\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "ups.firmware", 0, NULL, "I\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, /* Instant commands * The UPS will reply '(ACK\r' in case of success, '(NAK\r' if the command is rejected or invalid */ - { "beeper.toggle", 0, NULL, "Q\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "load.off", 0, NULL, "S00R0000\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "load.on", 0, NULL, "C\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "shutdown.return", 0, NULL, "S%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stop", 0, NULL, "C\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start", 0, NULL, "T%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, mecer_process_test_battery }, - { "test.battery.start.deep", 0, NULL, "TL\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start.quick", 0, NULL, "T\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.stop", 0, NULL, "CT\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, + { "beeper.toggle", 0, NULL, "Q\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.off", 0, NULL, "S00R0000\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.on", 0, NULL, "C\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "shutdown.return", 0, NULL, "S%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stop", 0, NULL, "C\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start", 0, NULL, "T%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, mecer_process_test_battery }, + { "test.battery.start.deep", 0, NULL, "TL\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.stop", 0, NULL, "CT\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, /* Server-side settable vars */ - { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, - { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, + { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, /* End of structure. */ - { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL } + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL, NULL } }; /* == Testing table == */ #ifdef TESTING static testing_t mecer_testing[] = { - { "Q1\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r" }, - { "QPI\r", "(PI98\r" }, - { "F\r", "#230.0 000 024.0 50.0\r" }, - { "I\r", "#NOT_A_LIVE_UPS TESTING TESTING \r" }, - { "Q\r", "(ACK\r" }, - { "S03\r", "(NAK\r" }, - { "C\r", "(NAK\r" }, - { "S02R0005\r", "(ACK\r" }, - { "S.5R0000\r", "(ACK\r" }, - { "T04\r", "(NAK\r" }, - { "TL\r", "(ACK\r" }, - { "T\r", "(NAK\r" }, - { "CT\r", "(ACK\r" }, + { "Q1\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r", -1 }, + { "QPI\r", "(PI98\r", -1 }, + { "F\r", "#230.0 000 024.0 50.0\r", -1 }, + { "I\r", "#NOT_A_LIVE_UPS TESTING TESTING \r", -1 }, + { "Q\r", "(ACK\r", -1 }, + { "S03\r", "(NAK\r", -1 }, + { "C\r", "(NAK\r", -1 }, + { "S02R0005\r", "(ACK\r", -1 }, + { "S.5R0000\r", "(ACK\r", -1 }, + { "T04\r", "(NAK\r", -1 }, + { "TL\r", "(ACK\r", -1 }, + { "T\r", "(NAK\r", -1 }, + { "CT\r", "(ACK\r", -1 }, { NULL } }; #endif /* TESTING */ @@ -145,7 +144,6 @@ static testing_t mecer_testing[] = { /* This function allows the subdriver to "claim" a device: return 1 if the device is supported by this subdriver, else 0. */ static int mecer_claim(void) { - /* Apart from status (Q1), try to identify protocol (QPI, for Voltronic Power P98 units) or whether the UPS uses '(ACK\r'/'(NAK\r' replies */ item_t *item = find_nut_info("input.voltage", 0, 0); @@ -198,15 +196,12 @@ static int mecer_claim(void) } return 1; - } /* Subdriver-specific initups */ static void mecer_initups(void) { - blazer_initups(mecer_qx2nut); - } diff --git a/drivers/nutdrv_qx_megatec-old.c b/drivers/nutdrv_qx_megatec-old.c index 73173de..ce39926 100644 --- a/drivers/nutdrv_qx_megatec-old.c +++ b/drivers/nutdrv_qx_megatec-old.c @@ -25,7 +25,7 @@ #include "nutdrv_qx_megatec-old.h" -#define MEGATEC_OLD_VERSION "Megatec/old 0.02" +#define MEGATEC_OLD_VERSION "Megatec/old 0.05" /* qx2nut lookup table */ static item_t megatec_old_qx2nut[] = { @@ -37,23 +37,22 @@ static item_t megatec_old_qx2nut[] = { * 0 1 2 3 4 */ - { "input.voltage", 0, NULL, "D\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL }, - { "input.voltage.fault", 0, NULL, "D\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL }, - { "output.voltage", 0, NULL, "D\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL }, - { "ups.load", 0, NULL, "D\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL }, - { "input.frequency", 0, NULL, "D\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL }, - { "battery.voltage", 0, NULL, "D\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL }, - { "ups.temperature", 0, NULL, "D\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL }, + { "input.voltage", 0, NULL, "D\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL, NULL }, + { "input.voltage.fault", 0, NULL, "D\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL, NULL }, + { "output.voltage", 0, NULL, "D\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL, NULL }, + { "ups.load", 0, NULL, "D\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL, NULL }, + { "input.frequency", 0, NULL, "D\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL, NULL }, + { "battery.voltage", 0, NULL, "D\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL, NULL }, + { "ups.temperature", 0, NULL, "D\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL, NULL }, /* Status bits */ - { "ups.status", 0, NULL, "D\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ - { "ups.status", 0, NULL, "D\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Battery Low */ - { "ups.status", 0, NULL, "D\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ - { "ups.alarm", 0, NULL, "D\r", "", 47, '(', "", 41, 41, NULL, 0, blazer_process_status_bits }, /* UPS Failed */ - { "ups.type", 0, NULL, "D\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, blazer_process_status_bits }, /* UPS Type */ - { "ups.status", 0, NULL, "D\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Test in Progress */ - { "ups.alarm", 0, NULL, "D\r", "", 47, '(', "", 44, 44, NULL, 0, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.status", 0, NULL, "D\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.beeper.status", 0, NULL, "D\r", "", 47, '(', "", 45, 45, "%s", 0, blazer_process_status_bits }, /* Beeper status */ + { "ups.status", 0, NULL, "D\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "D\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Battery Low */ + { "ups.status", 0, NULL, "D\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "D\r", "", 47, '(', "", 41, 41, NULL, 0, NULL, blazer_process_status_bits }, /* UPS Failed */ + { "ups.type", 0, NULL, "D\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, NULL, blazer_process_status_bits }, /* UPS Type */ + { "ups.status", 0, NULL, "D\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Test in Progress */ + { "ups.status", 0, NULL, "D\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Shutdown Active */ + { "ups.beeper.status", 0, NULL, "D\r", "", 47, '(', "", 45, 45, "%s", 0, NULL, blazer_process_status_bits }, /* Beeper status */ /* * > [F\r] @@ -62,10 +61,10 @@ static item_t megatec_old_qx2nut[] = { * 0 1 2 */ - { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL }, - { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL }, - { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL }, - { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL }, + { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL, NULL }, + { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL, NULL }, /* * > [I\r] @@ -74,45 +73,45 @@ static item_t megatec_old_qx2nut[] = { * 0 1 2 3 */ - { "device.mfr", 0, NULL, "I\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "device.model", 0, NULL, "I\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "ups.firmware", 0, NULL, "I\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, + { "device.mfr", 0, NULL, "I\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "device.model", 0, NULL, "I\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "ups.firmware", 0, NULL, "I\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, /* Instant commands */ - { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, + { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, /* Server-side settable vars */ - { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, - { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, + { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, /* End of structure. */ - { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL } + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL, NULL } }; /* Testing table */ #ifdef TESTING static testing_t megatec_old_testing[] = { - { "D\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r" }, - { "F\r", "#230.0 000 024.0 50.0\r" }, - { "I\r", "#NOT_A_LIVE_UPS TESTING TESTING \r" }, - { "Q\r", "" }, - { "S03\r", "" }, - { "C\r", "" }, - { "S02R0005\r", "" }, - { "S.5R0000\r", "" }, - { "T04\r", "" }, - { "TL\r", "" }, - { "T\r", "" }, - { "CT\r", "" }, + { "D\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r", -1 }, + { "F\r", "#230.0 000 024.0 50.0\r", -1 }, + { "I\r", "#NOT_A_LIVE_UPS TESTING TESTING \r", -1 }, + { "Q\r", "", -1 }, + { "S03\r", "", -1 }, + { "C\r", "", -1 }, + { "S02R0005\r", "", -1 }, + { "S.5R0000\r", "", -1 }, + { "T04\r", "", -1 }, + { "TL\r", "", -1 }, + { "T\r", "", -1 }, + { "CT\r", "", -1 }, { NULL } }; #endif /* TESTING */ @@ -120,9 +119,7 @@ static testing_t megatec_old_testing[] = { /* Subdriver-specific initups */ static void megatec_old_initups(void) { - blazer_initups(megatec_old_qx2nut); - } /* Subdriver interface */ diff --git a/drivers/nutdrv_qx_megatec.c b/drivers/nutdrv_qx_megatec.c index c43a24e..f0f02f1 100644 --- a/drivers/nutdrv_qx_megatec.c +++ b/drivers/nutdrv_qx_megatec.c @@ -25,7 +25,7 @@ #include "nutdrv_qx_megatec.h" -#define MEGATEC_VERSION "Megatec 0.01" +#define MEGATEC_VERSION "Megatec 0.04" /* qx2nut lookup table */ static item_t megatec_qx2nut[] = { @@ -37,23 +37,22 @@ static item_t megatec_qx2nut[] = { * 0 1 2 3 4 */ - { "input.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL }, - { "input.voltage.fault", 0, NULL, "Q1\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL }, - { "output.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL }, - { "ups.load", 0, NULL, "Q1\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL }, - { "input.frequency", 0, NULL, "Q1\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL }, - { "battery.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL }, - { "ups.temperature", 0, NULL, "Q1\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL }, + { "input.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL, NULL }, + { "input.voltage.fault", 0, NULL, "Q1\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL, NULL }, + { "output.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL, NULL }, + { "ups.load", 0, NULL, "Q1\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL, NULL }, + { "input.frequency", 0, NULL, "Q1\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL, NULL }, + { "battery.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL, NULL }, + { "ups.temperature", 0, NULL, "Q1\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL, NULL }, /* Status bits */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Battery Low */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ - { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 41, 41, NULL, 0, blazer_process_status_bits }, /* UPS Failed */ - { "ups.type", 0, NULL, "Q1\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, blazer_process_status_bits }, /* UPS Type */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Test in Progress */ - { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, 0, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.beeper.status", 0, NULL, "Q1\r", "", 47, '(', "", 45, 45, "%s", 0, blazer_process_status_bits }, /* Beeper status */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Battery Low */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 41, 41, NULL, 0, NULL, blazer_process_status_bits }, /* UPS Failed */ + { "ups.type", 0, NULL, "Q1\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, NULL, blazer_process_status_bits }, /* UPS Type */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Test in Progress */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Shutdown Active */ + { "ups.beeper.status", 0, NULL, "Q1\r", "", 47, '(', "", 45, 45, "%s", 0, NULL, blazer_process_status_bits }, /* Beeper status */ /* * > [F\r] @@ -62,10 +61,10 @@ static item_t megatec_qx2nut[] = { * 0 1 2 */ - { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL }, - { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL }, - { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL }, - { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL }, + { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL, NULL }, + { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL, NULL }, /* * > [I\r] @@ -74,45 +73,45 @@ static item_t megatec_qx2nut[] = { * 0 1 2 3 */ - { "device.mfr", 0, NULL, "I\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "device.model", 0, NULL, "I\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "ups.firmware", 0, NULL, "I\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, + { "device.mfr", 0, NULL, "I\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "device.model", 0, NULL, "I\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "ups.firmware", 0, NULL, "I\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, /* Instant commands */ - { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, + { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, /* Server-side settable vars */ - { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, - { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, + { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, /* End of structure. */ - { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL } + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL, NULL } }; /* Testing table */ #ifdef TESTING static testing_t megatec_testing[] = { - { "Q1\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r" }, - { "F\r", "#230.0 000 024.0 50.0\r" }, - { "I\r", "#NOT_A_LIVE_UPS TESTING TESTING \r" }, - { "Q\r", "" }, - { "S03\r", "" }, - { "C\r", "" }, - { "S02R0005\r", "" }, - { "S.5R0000\r", "" }, - { "T04\r", "" }, - { "TL\r", "" }, - { "T\r", "" }, - { "CT\r", "" }, + { "Q1\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r", -1 }, + { "F\r", "#230.0 000 024.0 50.0\r", -1 }, + { "I\r", "#NOT_A_LIVE_UPS TESTING TESTING \r", -1 }, + { "Q\r", "", -1 }, + { "S03\r", "", -1 }, + { "C\r", "", -1 }, + { "S02R0005\r", "", -1 }, + { "S.5R0000\r", "", -1 }, + { "T04\r", "", -1 }, + { "TL\r", "", -1 }, + { "T\r", "", -1 }, + { "CT\r", "", -1 }, { NULL } }; #endif /* TESTING */ @@ -120,9 +119,7 @@ static testing_t megatec_testing[] = { /* Subdriver-specific initups */ static void megatec_initups(void) { - blazer_initups(megatec_qx2nut); - } /* Subdriver interface */ diff --git a/drivers/nutdrv_qx_mustek.c b/drivers/nutdrv_qx_mustek.c index 3bdee1a..17b8eb6 100644 --- a/drivers/nutdrv_qx_mustek.c +++ b/drivers/nutdrv_qx_mustek.c @@ -25,7 +25,7 @@ #include "nutdrv_qx_mustek.h" -#define MUSTEK_VERSION "Mustek 0.02" +#define MUSTEK_VERSION "Mustek 0.05" /* qx2nut lookup table */ static item_t mustek_qx2nut[] = { @@ -37,23 +37,22 @@ static item_t mustek_qx2nut[] = { * 0 1 2 3 4 */ - { "input.voltage", 0, NULL, "QS\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL }, - { "input.voltage.fault", 0, NULL, "QS\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL }, - { "output.voltage", 0, NULL, "QS\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL }, - { "ups.load", 0, NULL, "QS\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL }, - { "input.frequency", 0, NULL, "QS\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL }, - { "battery.voltage", 0, NULL, "QS\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL }, - { "ups.temperature", 0, NULL, "QS\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL }, + { "input.voltage", 0, NULL, "QS\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL, NULL }, + { "input.voltage.fault", 0, NULL, "QS\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL, NULL }, + { "output.voltage", 0, NULL, "QS\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL, NULL }, + { "ups.load", 0, NULL, "QS\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL, NULL }, + { "input.frequency", 0, NULL, "QS\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL, NULL }, + { "battery.voltage", 0, NULL, "QS\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL, NULL }, + { "ups.temperature", 0, NULL, "QS\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL, NULL }, /* Status bits */ - { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ - { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Battery Low */ - { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ - { "ups.alarm", 0, NULL, "QS\r", "", 47, '(', "", 41, 41, NULL, 0, blazer_process_status_bits }, /* UPS Failed */ - { "ups.type", 0, NULL, "QS\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, blazer_process_status_bits }, /* UPS Type */ - { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Test in Progress */ - { "ups.alarm", 0, NULL, "QS\r", "", 47, '(', "", 44, 44, NULL, 0, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.beeper.status", 0, NULL, "QS\r", "", 47, '(', "", 45, 45, "%s", 0, blazer_process_status_bits }, /* Beeper status */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Battery Low */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "QS\r", "", 47, '(', "", 41, 41, NULL, 0, NULL, blazer_process_status_bits }, /* UPS Failed */ + { "ups.type", 0, NULL, "QS\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, NULL, blazer_process_status_bits }, /* UPS Type */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Test in Progress */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Shutdown Active */ + { "ups.beeper.status", 0, NULL, "QS\r", "", 47, '(', "", 45, 45, "%s", 0, NULL, blazer_process_status_bits }, /* Beeper status */ /* * > [F\r] @@ -62,10 +61,10 @@ static item_t mustek_qx2nut[] = { * 0 1 2 */ - { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL }, - { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL }, - { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL }, - { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL }, + { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL, NULL }, + { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL, NULL }, /* * > [I\r] @@ -74,45 +73,45 @@ static item_t mustek_qx2nut[] = { * 0 1 2 3 */ - { "device.mfr", 0, NULL, "I\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "device.model", 0, NULL, "I\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "ups.firmware", 0, NULL, "I\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, + { "device.mfr", 0, NULL, "I\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "device.model", 0, NULL, "I\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "ups.firmware", 0, NULL, "I\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, /* Instant commands */ - { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, + { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, /* Server-side settable vars */ - { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, - { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, + { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, /* End of structure. */ - { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL } + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL, NULL } }; /* Testing table */ #ifdef TESTING static testing_t mustek_testing[] = { - { "QS\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r" }, - { "F\r", "#230.0 000 024.0 50.0\r" }, - { "I\r", "#NOT_A_LIVE_UPS TESTING TESTING \r" }, - { "Q\r", "" }, - { "S03\r", "" }, - { "C\r", "" }, - { "S02R0005\r", "" }, - { "S.5R0000\r", "" }, - { "T04\r", "" }, - { "TL\r", "" }, - { "T\r", "" }, - { "CT\r", "" }, + { "QS\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r", -1 }, + { "F\r", "#230.0 000 024.0 50.0\r", -1 }, + { "I\r", "#NOT_A_LIVE_UPS TESTING TESTING \r", -1 }, + { "Q\r", "", -1 }, + { "S03\r", "", -1 }, + { "C\r", "", -1 }, + { "S02R0005\r", "", -1 }, + { "S.5R0000\r", "", -1 }, + { "T04\r", "", -1 }, + { "TL\r", "", -1 }, + { "T\r", "", -1 }, + { "CT\r", "", -1 }, { NULL } }; #endif /* TESTING */ @@ -120,9 +119,7 @@ static testing_t mustek_testing[] = { /* Subdriver-specific initups */ static void mustek_initups(void) { - blazer_initups(mustek_qx2nut); - } /* Subdriver interface */ diff --git a/drivers/nutdrv_qx_q1.c b/drivers/nutdrv_qx_q1.c index b201497..be37018 100644 --- a/drivers/nutdrv_qx_q1.c +++ b/drivers/nutdrv_qx_q1.c @@ -35,7 +35,7 @@ #include "nutdrv_qx_q1.h" -#define Q1_VERSION "Q1 0.02" +#define Q1_VERSION "Q1 0.05" /* qx2nut lookup table */ static item_t q1_qx2nut[] = { @@ -47,69 +47,74 @@ static item_t q1_qx2nut[] = { * 0 1 2 3 4 */ - { "input.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL }, - { "input.voltage.fault", 0, NULL, "Q1\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL }, - { "output.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL }, - { "ups.load", 0, NULL, "Q1\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL }, - { "input.frequency", 0, NULL, "Q1\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL }, - { "battery.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL }, - { "ups.temperature", 0, NULL, "Q1\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL }, + { "input.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL, NULL }, + { "input.voltage.fault", 0, NULL, "Q1\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL, NULL }, + { "output.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL, NULL }, + { "ups.load", 0, NULL, "Q1\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL, NULL }, + { "input.frequency", 0, NULL, "Q1\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL, NULL }, + { "battery.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL, NULL }, + { "ups.temperature", 0, NULL, "Q1\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL, NULL }, /* Status bits */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Battery Low */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ - { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 41, 41, NULL, 0, blazer_process_status_bits }, /* UPS Failed */ - { "ups.type", 0, NULL, "Q1\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, blazer_process_status_bits }, /* UPS Type */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Test in Progress */ - { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, 0, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.beeper.status", 0, NULL, "Q1\r", "", 47, '(', "", 45, 45, "%s", 0, blazer_process_status_bits }, /* Beeper status */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Battery Low */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 41, 41, NULL, 0, NULL, blazer_process_status_bits }, /* UPS Failed */ + { "ups.type", 0, NULL, "Q1\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, NULL, blazer_process_status_bits }, /* UPS Type */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Test in Progress */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Shutdown Active */ + { "ups.beeper.status", 0, NULL, "Q1\r", "", 47, '(', "", 45, 45, "%s", 0, NULL, blazer_process_status_bits }, /* Beeper status */ /* Instant commands */ - { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, + { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, /* Server-side settable vars */ - { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, - { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, + { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, /* End of structure. */ - { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL } + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL, NULL } }; /* Testing table */ #ifdef TESTING static testing_t q1_testing[] = { - { "Q1\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r" }, - { "Q\r", "" }, - { "S03\r", "" }, - { "C\r", "" }, - { "S02R0005\r", "" }, - { "S.5R0000\r", "" }, - { "T04\r", "" }, - { "TL\r", "" }, - { "T\r", "" }, - { "CT\r", "" }, + { "Q1\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r", -1 }, + { "Q\r", "", -1 }, + { "S03\r", "", -1 }, + { "C\r", "", -1 }, + { "S02R0005\r", "", -1 }, + { "S.5R0000\r", "", -1 }, + { "T04\r", "", -1 }, + { "TL\r", "", -1 }, + { "T\r", "", -1 }, + { "CT\r", "", -1 }, { NULL } }; #endif /* TESTING */ +/* Subdriver-specific initups */ +static void q1_initups(void) +{ + blazer_initups_light(q1_qx2nut); +} + /* Subdriver interface */ subdriver_t q1_subdriver = { Q1_VERSION, blazer_claim_light, q1_qx2nut, + q1_initups, NULL, - NULL, - NULL, + blazer_makevartable_light, "ACK", NULL, #ifdef TESTING diff --git a/drivers/nutdrv_qx_voltronic-qs-hex.c b/drivers/nutdrv_qx_voltronic-qs-hex.c new file mode 100644 index 0000000..551182b --- /dev/null +++ b/drivers/nutdrv_qx_voltronic-qs-hex.c @@ -0,0 +1,415 @@ +/* nutdrv_qx_voltronic-qs-hex.c - Subdriver for Voltronic Power UPSes with QS-Hex protocol + * + * Copyright (C) + * 2014 Daniele Pezzini + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include "main.h" +#include "nutdrv_qx.h" +#include "nutdrv_qx_blazer-common.h" + +#include "nutdrv_qx_voltronic-qs-hex.h" + +#define VOLTRONIC_QS_HEX_VERSION "Voltronic-QS-Hex 0.03" + +/* Support functions */ +static int voltronic_qs_hex_claim(void); +static void voltronic_qs_hex_initups(void); + +/* Answer preprocess functions */ +static int voltronic_qs_hex_preprocess_qs_answer(item_t *item, const int len); +static int voltronic_qs_hex_status_char_to_binary(const unsigned char value); + +/* Preprocess functions */ +static int voltronic_qs_hex_protocol(item_t *item, char *value, size_t valuelen); +static int voltronic_qs_hex_input_output_voltage(item_t *item, char *value, size_t valuelen); +static int voltronic_qs_hex_input_output_voltage(item_t *item, char *value, size_t valuelen); +static int voltronic_qs_hex_load(item_t *item, char *value, size_t valuelen); +static int voltronic_qs_hex_frequency(item_t *item, char *value, size_t valuelen); +static int voltronic_qs_hex_battery_voltage(item_t *item, char *value, size_t valuelen); + + +/* == Ranges == */ + +/* Range for ups.delay.start */ +static info_rw_t voltronic_qs_hex_r_ondelay[] = { + { "60", 0 }, + { "599940", 0 }, + { "", 0 } +}; + +/* Range for ups.delay.shutdown */ +static info_rw_t voltronic_qs_hex_r_offdelay[] = { + { "12", 0 }, + { "540", 0 }, + { "", 0 } +}; + + +/* == qx2nut lookup table == */ +static item_t voltronic_qs_hex_qx2nut[] = { + + /* Query UPS for protocol + * > [M\r] + * < [P\r] + * 01 + * 0 + */ + + { "ups.firmware.aux", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "PMV-%s", QX_FLAG_STATIC, NULL, voltronic_qs_hex_protocol }, + + /* Query UPS for status + * > [QS\r] + * < [#6C01 35 6C01 35 03 519A 1312D0 E6 1E 00001001\r] (after being preprocessed) + * 01234567890123456789012345678901234567890123456 + * 0 1 2 3 4 + */ + + { "input.voltage", 0, NULL, "QS\r", "", 47, '#', "", 1, 7, "%.1f", 0, voltronic_qs_hex_preprocess_qs_answer, voltronic_qs_hex_input_output_voltage }, + { "output.voltage", 0, NULL, "QS\r", "", 47, '#', "", 9, 15, "%.1f", 0, voltronic_qs_hex_preprocess_qs_answer, voltronic_qs_hex_input_output_voltage }, + { "ups.load", 0, NULL, "QS\r", "", 47, '#', "", 17, 18, "%d", 0, voltronic_qs_hex_preprocess_qs_answer, voltronic_qs_hex_load }, + { "output.frequency", 0, NULL, "QS\r", "", 47, '#', "", 20, 30, "%.1f", 0, voltronic_qs_hex_preprocess_qs_answer, voltronic_qs_hex_frequency }, + { "battery.voltage", 0, NULL, "QS\r", "", 47, '#', "", 32, 36, "%.2f", 0, voltronic_qs_hex_preprocess_qs_answer, voltronic_qs_hex_battery_voltage }, + /* Status bits */ + { "ups.status", 0, NULL, "QS\r", "", 47, '#', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, voltronic_qs_hex_preprocess_qs_answer, blazer_process_status_bits }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "QS\r", "", 47, '#', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, voltronic_qs_hex_preprocess_qs_answer, blazer_process_status_bits }, /* Battery Low */ + { "ups.status", 0, NULL, "QS\r", "", 47, '#', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, voltronic_qs_hex_preprocess_qs_answer, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "QS\r", "", 47, '#', "", 41, 41, NULL, 0, voltronic_qs_hex_preprocess_qs_answer, blazer_process_status_bits }, /* UPS Failed */ + { "ups.type", 0, NULL, "QS\r", "", 47, '#', "", 42, 42, "%s", QX_FLAG_STATIC, voltronic_qs_hex_preprocess_qs_answer, blazer_process_status_bits }, /* UPS Type */ + { "ups.status", 0, NULL, "QS\r", "", 47, '#', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, voltronic_qs_hex_preprocess_qs_answer, blazer_process_status_bits }, /* Test in Progress */ + { "ups.status", 0, NULL, "QS\r", "", 47, '#', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, voltronic_qs_hex_preprocess_qs_answer, blazer_process_status_bits }, /* Shutdown Active */ + { "ups.beeper.status", 0, NULL, "QS\r", "", 47, '#', "", 45, 45, "%s", 0, voltronic_qs_hex_preprocess_qs_answer, blazer_process_status_bits }, /* Beeper status */ + + /* Instant commands */ + { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, + + /* Server-side settable vars */ + { "ups.delay.start", ST_FLAG_RW, voltronic_qs_hex_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, voltronic_qs_hex_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + + /* End of structure. */ + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL, NULL } +}; + + +/* == Testing table == */ +#ifdef TESTING +static testing_t voltronic_qs_hex_testing[] = { + { "QS\r", "#\x6C\x01 \x35 \x6C\x01 \x35 \x03 \x51\x9A \x28\x02\x12\xD0 \xE6 \x1E \x09\r", 27 }, + { "M\r", "P\r", -1 }, + { "Q\r", "", -1 }, + { "S03\r", "", -1 }, + { "C\r", "", -1 }, + { "S02R0005\r", "", -1 }, + { "S.5R0000\r", "N\r", -1 }, + { "T04\r", "", -1 }, + { "TL\r", "", -1 }, + { "T\r", "", -1 }, + { "CT\r", "", -1 }, + { NULL } +}; +#endif /* TESTING */ + + +/* == Support functions == */ + +/* This function allows the subdriver to "claim" a device: return 1 if the device is supported by this subdriver, else 0. */ +static int voltronic_qs_hex_claim(void) +{ + /* We need at least M and QS to run this subdriver */ + + /* UPS Protocol */ + item_t *item = find_nut_info("ups.firmware.aux", 0, 0); + + /* Don't know what happened */ + if (!item) + return 0; + + /* No reply/Unable to get value */ + if (qx_process(item, NULL)) + return 0; + + /* Unable to process value/Protocol not supported */ + if (ups_infoval_set(item) != 1) + return 0; + + item = find_nut_info("input.voltage", 0, 0); + + /* Don't know what happened */ + if (!item) { + dstate_delinfo("ups.firmware.aux"); + return 0; + } + + /* No reply/Unable to get value */ + if (qx_process(item, NULL)) { + dstate_delinfo("ups.firmware.aux"); + return 0; + } + + /* Unable to process value */ + if (ups_infoval_set(item) != 1) { + dstate_delinfo("ups.firmware.aux"); + return 0; + } + + return 1; +} + +/* Subdriver-specific initups */ +static void voltronic_qs_hex_initups(void) +{ + blazer_initups_light(voltronic_qs_hex_qx2nut); +} + + +/* == Answer preprocess functions == */ + +/* Preprocess the answer we got back from the UPS when queried with 'QS\r' */ +static int voltronic_qs_hex_preprocess_qs_answer(item_t *item, const int len) +{ + int i, token; + char refined[SMALLBUF] = ""; + + if (len <= 0) + return len; + + if (item->answer[0] != '#') { + upsdebugx(4, "%s: wrong leading character [%s: 0x%0x]", __func__, item->info_type, item->answer[0]); + return -1; + } + + snprintf(refined, sizeof(refined), "%s", "#"); + + /* e.g.: item->answer = "#\x6C\x01 \x35 \x6C\x01 \x35 \x03 \x51\x9A \x28\x02\x12\xD0 \xE6 \x1E \x09\r" */ + upsdebug_hex(4, "read", item->answer, len); + + for (i = 1, token = 1; i < len; i++) { + + /* New token */ + if (item->answer[i] == 0x20) { + snprintfcat(refined, sizeof(refined), "%s", " "); + token++; + continue; + } + + /* 'Unescape' raw data */ + if (item->answer[i] == 0x28 && i < len) { + + switch (item->answer[i + 1]) + { + case 0x00: /* Escaped because: CR */ + snprintfcat(refined, sizeof(refined), "%02x", 0x0D); + break; + case 0x01: /* Escaped because: XON */ + snprintfcat(refined, sizeof(refined), "%02x", 0x11); + break; + case 0x02: /* Escaped because: XOFF */ + snprintfcat(refined, sizeof(refined), "%02x", 0x13); + break; + case 0x03: /* Escaped because: LF */ + snprintfcat(refined, sizeof(refined), "%02x", 0x0A); + break; + case 0x04: /* Escaped because: space */ + snprintfcat(refined, sizeof(refined), "%02x", 0x20); + break; + default: + if (token != 10) + snprintfcat(refined, sizeof(refined), "%02x", ((unsigned char *)item->answer)[i]); + else + snprintfcat(refined, sizeof(refined), "%08d", voltronic_qs_hex_status_char_to_binary(((unsigned char *)item->answer)[i])); + continue; + } + + i++; + continue; + + } + + /* Trailing CR */ + if (item->answer[i] == 0x0D) + break; + + if (token != 10) + snprintfcat(refined, sizeof(refined), "%02x", ((unsigned char *)item->answer)[i]); + else + snprintfcat(refined, sizeof(refined), "%08d", voltronic_qs_hex_status_char_to_binary(((unsigned char *)item->answer)[i])); + + } + + if (token != 10 || strlen(refined) != 46) { + upsdebugx(2, "noncompliant reply: %s", refined); + return -1; + } + + upsdebugx(4, "read: %s", refined); + + /* e.g.: item->answer = "#6C01 35 6C01 35 03 519A 1312D0 E6 1E 00001001" */ + return snprintf(item->answer, sizeof(item->answer), "%s\r", refined); +} + +/* Transform the QS 'status' char into its binary form (as an int) */ +static int voltronic_qs_hex_status_char_to_binary(const unsigned char value) +{ + unsigned char remainder = value; + int ret = 0, + power = 1; + + while (remainder) { + + if (remainder & 1) + ret += power; + + power *= 10; + remainder >>= 1; + + } + + return ret; +} + + +/* == Preprocess functions == */ + +/* Protocol used by the UPS */ +static int voltronic_qs_hex_protocol(item_t *item, char *value, size_t valuelen) +{ + item_t *unskip; + + if (strcasecmp(item->value, "P") && strcasecmp(item->value, "T") && strcasecmp(item->value, "V")) { + upsdebugx(2, "%s: invalid protocol [%s]", __func__, item->value); + return -1; + } + + snprintf(value, valuelen, item->dfl, item->value); + + /* 'P' UPSes don't support 'T\r' command (battery test) -> leave test.battery.start.quick skipped */ + if (!strcasecmp(item->value, "P")) + return 0; + + /* Unskip test.battery.start.quick */ + unskip = find_nut_info("test.battery.start.quick", QX_FLAG_CMD, 0); + + /* Don't know what happened */ + if (!unskip) + return -1; + + unskip->qxflags &= ~QX_FLAG_SKIP; + + return 0; +} + +/* Input/Output voltage */ +int voltronic_qs_hex_input_output_voltage(item_t *item, char *value, size_t valuelen) +{ + int val; + double ret; + char *str_end, buf[SMALLBUF] = ""; + + if (strspn(item->value, "0123456789ABCDEFabcdef ") != strlen(item->value)) { + upsdebugx(2, "%s: non numerical value [%s: %s]", __func__, item->info_type, item->value); + return -1; + } + + val = strtol(item->value, &str_end, 16) * strtol(str_end, NULL, 16) / 51; + snprintf(buf, sizeof(buf), "%06x", val); + + ret = strtol(buf + 4, NULL, 16) / 256.0; + buf[4] = '\0'; + ret += strtol(buf, NULL, 16); + + snprintf(value, valuelen, item->dfl, ret); + + return 0; +} + +/* Device load */ +int voltronic_qs_hex_load(item_t *item, char *value, size_t valuelen) +{ + if (strspn(item->value, "0123456789ABCDEFabcdef") != strlen(item->value)) { + upsdebugx(2, "%s: non numerical value [%s: %s]", __func__, item->info_type, item->value); + return -1; + } + + snprintf(value, valuelen, item->dfl, strtol(item->value, NULL, 16)); + + return 0; +} + +/* Output frequency */ +int voltronic_qs_hex_frequency(item_t *item, char *value, size_t valuelen) +{ + double val1, val2, ret; + char *str_end; + + if (strspn(item->value, "0123456789ABCDEFabcdef ") != strlen(item->value)) { + upsdebugx(2, "%s: non numerical value [%s: %s]", __func__, item->info_type, item->value); + return -1; + } + + val1 = strtol(item->value, &str_end, 16); + val2 = strtol(str_end, NULL, 16); + + ret = val2 / val1; + ret = ret > 99.9 ? 99.9 : ret; + + snprintf(value, valuelen, item->dfl, ret); + + return 0; +} + +/* Battery voltage */ +int voltronic_qs_hex_battery_voltage(item_t *item, char *value, size_t valuelen) +{ + int val1, val2; + char *str_end; + + if (strspn(item->value, "0123456789ABCDEFabcdef ") != strlen(item->value)) { + upsdebugx(2, "%s: non numerical value [%s: %s]", __func__, item->info_type, item->value); + return -1; + } + + val1 = strtol(item->value, &str_end, 16); + val2 = strtol(str_end, NULL, 16); + + snprintf(value, valuelen, item->dfl, (val1 * val2) / 510.0); + + return 0; +} + + +/* == Subdriver interface == */ +subdriver_t voltronic_qs_hex_subdriver = { + VOLTRONIC_QS_HEX_VERSION, + voltronic_qs_hex_claim, + voltronic_qs_hex_qx2nut, + voltronic_qs_hex_initups, + NULL, + blazer_makevartable_light, + NULL, + "N\r", +#ifdef TESTING + voltronic_qs_hex_testing, +#endif /* TESTING */ +}; diff --git a/drivers/nutdrv_qx_voltronic-qs-hex.h b/drivers/nutdrv_qx_voltronic-qs-hex.h new file mode 100644 index 0000000..e4735df --- /dev/null +++ b/drivers/nutdrv_qx_voltronic-qs-hex.h @@ -0,0 +1,29 @@ +/* nutdrv_qx_voltronic-qs-hex.h - Subdriver for Voltronic Power UPSes with QS-Hex protocol + * + * Copyright (C) + * 2014 Daniele Pezzini + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef NUTDRV_QX_VOLTRONIC_QS_HEX_H +#define NUTDRV_QX_VOLTRONIC_QS_HEX_H + +#include "nutdrv_qx.h" + +extern subdriver_t voltronic_qs_hex_subdriver; + +#endif /* NUTDRV_QX_VOLTRONIC_QS_HEX_H */ diff --git a/drivers/nutdrv_qx_voltronic-qs.c b/drivers/nutdrv_qx_voltronic-qs.c index 9b86999..fca3ed8 100644 --- a/drivers/nutdrv_qx_voltronic-qs.c +++ b/drivers/nutdrv_qx_voltronic-qs.c @@ -25,10 +25,11 @@ #include "nutdrv_qx_voltronic-qs.h" -#define VOLTRONIC_QS_VERSION "Voltronic-QS 0.01" +#define VOLTRONIC_QS_VERSION "Voltronic-QS 0.04" /* Support functions */ static int voltronic_qs_claim(void); +static void voltronic_qs_initups(void); /* Preprocess functions */ static int voltronic_qs_protocol(item_t *item, char *value, size_t valuelen); @@ -61,7 +62,7 @@ static item_t voltronic_qs_qx2nut[] = { * 0 */ - { "ups.firmware.aux", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%s", QX_FLAG_STATIC, voltronic_qs_protocol }, + { "ups.firmware.aux", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%s", QX_FLAG_STATIC, NULL, voltronic_qs_protocol }, /* Query UPS for status * > [QS\r] @@ -70,23 +71,22 @@ static item_t voltronic_qs_qx2nut[] = { * 0 1 2 3 4 */ - { "input.voltage", 0, NULL, "QS\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL }, - { "input.voltage.fault", 0, NULL, "QS\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL }, - { "output.voltage", 0, NULL, "QS\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL }, - { "ups.load", 0, NULL, "QS\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL }, - { "input.frequency", 0, NULL, "QS\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL }, - { "battery.voltage", 0, NULL, "QS\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL }, - { "ups.temperature", 0, NULL, "QS\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL }, + { "input.voltage", 0, NULL, "QS\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL, NULL }, + { "input.voltage.fault", 0, NULL, "QS\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL, NULL }, + { "output.voltage", 0, NULL, "QS\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL, NULL }, + { "ups.load", 0, NULL, "QS\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL, NULL }, + { "input.frequency", 0, NULL, "QS\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL, NULL }, + { "battery.voltage", 0, NULL, "QS\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL, NULL }, + { "ups.temperature", 0, NULL, "QS\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL, NULL }, /* Status bits */ - { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ - { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Battery Low */ - { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ - { "ups.alarm", 0, NULL, "QS\r", "", 47, '(', "", 41, 41, NULL, 0, blazer_process_status_bits }, /* UPS Failed */ - { "ups.type", 0, NULL, "QS\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, blazer_process_status_bits }, /* UPS Type */ - { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Test in Progress */ - { "ups.alarm", 0, NULL, "QS\r", "", 47, '(', "", 44, 44, NULL, 0, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.beeper.status", 0, NULL, "QS\r", "", 47, '(', "", 45, 45, "%s", 0, blazer_process_status_bits }, /* Beeper status */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Battery Low */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "QS\r", "", 47, '(', "", 41, 41, NULL, 0, NULL, blazer_process_status_bits }, /* UPS Failed */ + { "ups.type", 0, NULL, "QS\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, NULL, blazer_process_status_bits }, /* UPS Type */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Test in Progress */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Shutdown Active */ + { "ups.beeper.status", 0, NULL, "QS\r", "", 47, '(', "", 45, 45, "%s", 0, NULL, blazer_process_status_bits }, /* Beeper status */ /* Query UPS for ratings * > [F\r] @@ -95,40 +95,40 @@ static item_t voltronic_qs_qx2nut[] = { * 0 1 2 */ - { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL }, - { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL }, - { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL }, - { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL }, + { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL, NULL }, + { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL, NULL }, /* Instant commands */ - { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "load.on", 0, NULL, "C\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL }, + { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.on", 0, NULL, "C\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, /* Server-side settable vars */ - { "ups.delay.start", ST_FLAG_RW, voltronic_qs_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, - { "ups.delay.shutdown", ST_FLAG_RW, voltronic_qs_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, + { "ups.delay.start", ST_FLAG_RW, voltronic_qs_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, voltronic_qs_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, /* End of structure. */ - { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL } + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL, NULL } }; /* == Testing table == */ #ifdef TESTING static testing_t voltronic_qs_testing[] = { - { "QS\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r" }, - { "F\r", "#230.0 000 024.0 50.0\r" }, - { "M\r", "V\r" }, - { "Q\r", "" }, - { "C\r", "" }, - { "S02R0005\r", "" }, - { "S.5R0000\r", "" }, - { "T\r", "" }, + { "QS\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r", -1 }, + { "F\r", "#230.0 000 024.0 50.0\r", -1 }, + { "M\r", "V\r", -1 }, + { "Q\r", "", -1 }, + { "C\r", "", -1 }, + { "S02R0005\r", "", -1 }, + { "S.5R0000\r", "", -1 }, + { "T\r", "", -1 }, { NULL } }; #endif /* TESTING */ @@ -139,7 +139,6 @@ static testing_t voltronic_qs_testing[] = { /* This function allows the subdriver to "claim" a device: return 1 if the device is supported by this subdriver, else 0. */ static int voltronic_qs_claim(void) { - /* We need at least M and QS to run this subdriver */ /* UPS Protocol */ @@ -178,7 +177,12 @@ static int voltronic_qs_claim(void) } return 1; +} +/* Subdriver-specific initups */ +static void voltronic_qs_initups(void) +{ + blazer_initups_light(voltronic_qs_qx2nut); } @@ -203,9 +207,9 @@ subdriver_t voltronic_qs_subdriver = { VOLTRONIC_QS_VERSION, voltronic_qs_claim, voltronic_qs_qx2nut, + voltronic_qs_initups, NULL, - NULL, - NULL, + blazer_makevartable_light, "ACK", "(NAK\r", #ifdef TESTING diff --git a/drivers/nutdrv_qx_voltronic.c b/drivers/nutdrv_qx_voltronic.c index c6e44cf..adfb6b1 100644 --- a/drivers/nutdrv_qx_voltronic.c +++ b/drivers/nutdrv_qx_voltronic.c @@ -24,7 +24,7 @@ #include "nutdrv_qx_voltronic.h" -#define VOLTRONIC_VERSION "Voltronic 0.01" +#define VOLTRONIC_VERSION "Voltronic 0.03" /* Support functions */ static int voltronic_claim(void); @@ -195,16 +195,16 @@ static info_rw_t voltronic_r_batt_numb[] = { /* Range for Bypass Mode maximum voltage */ static info_rw_t voltronic_r_bypass_volt_max[] = { { "60", voltronic_bypass_volt_max }, /* P09 */ - { "115", voltronic_bypass_volt_max }, /* P02/P03/P10/P14/P99 ivn<200 */ + { "115", voltronic_bypass_volt_max }, /* P02/P03/P10/P13/P14/P99 ivn<200 */ { "120", voltronic_bypass_volt_max }, /* P01 ivn<200 */ { "132", voltronic_bypass_volt_max }, /* P99 ivn<200 */ - { "138", voltronic_bypass_volt_max }, /* P02/P03/P10/P14 ivn<200 */ + { "138", voltronic_bypass_volt_max }, /* P02/P03/P10/P13/P14 ivn<200 */ { "140", voltronic_bypass_volt_max }, /* P01 ivn<200, P09 */ { "230", voltronic_bypass_volt_max }, /* P01 ivn>=200 */ - { "231", voltronic_bypass_volt_max }, /* P02/P03/P10/P14/P99 ivn>=200 */ + { "231", voltronic_bypass_volt_max }, /* P02/P03/P10/P13/P14/P99 ivn>=200 */ { "261", voltronic_bypass_volt_max }, /* P99 ivn>=200 */ { "264", voltronic_bypass_volt_max }, /* P01 ivn>=200 */ - { "276", voltronic_bypass_volt_max }, /* P02/P03/P10/P14 ivn>=200 */ + { "276", voltronic_bypass_volt_max }, /* P02/P03/P10/P13/P14 ivn>=200 */ { "", 0 } }; @@ -232,12 +232,12 @@ static int voltronic_bypass_volt_max(char *value, size_t len) break; - case 115: /* P02/P03/P10/P14/P99 ivn<200 */ + case 115: /* P02/P03/P10/P13/P14/P99 ivn<200 */ if (ivn >= 200) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -262,12 +262,12 @@ static int voltronic_bypass_volt_max(char *value, size_t len) break; - case 138: /* P02/P03/P10/P14 ivn<200 */ + case 138: /* P02/P03/P10/P13/P14 ivn<200 */ if (ivn >= 200) return -1; - if (protocol == 2 || protocol == 2 || protocol == 10 || protocol == 14) + if (protocol == 2 || protocol == 2 || protocol == 10 || protocol == 13 || protocol == 14) return 0; break; @@ -295,12 +295,12 @@ static int voltronic_bypass_volt_max(char *value, size_t len) break; - case 231: /* P02/P03/P10/P14/P99 ivn>=200 */ + case 231: /* P02/P03/P10/P13/P14/P99 ivn>=200 */ if (ivn < 200) return -1; - if (protocol == 2 || protocol == 2 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 2 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -325,12 +325,12 @@ static int voltronic_bypass_volt_max(char *value, size_t len) break; - case 276: /* P02/P03/P10/P14 ivn>=200 */ + case 276: /* P02/P03/P10/P13/P14 ivn>=200 */ if (ivn < 200) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14) return 0; break; @@ -348,16 +348,16 @@ static int voltronic_bypass_volt_max(char *value, size_t len) /* Range for Bypass Mode minimum voltage */ static info_rw_t voltronic_r_bypass_volt_min[] = { { "50", voltronic_bypass_volt_min }, /* P99 ivn<200 */ - { "55", voltronic_bypass_volt_min }, /* P02/P03/P10/P14 ivn<200 */ + { "55", voltronic_bypass_volt_min }, /* P02/P03/P10/P13/P14 ivn<200 */ { "60", voltronic_bypass_volt_min }, /* P09 */ { "85", voltronic_bypass_volt_min }, /* P01/P99 ivn<200 */ - { "104", voltronic_bypass_volt_min }, /* P02/P03/P10/P14 ivn<200 */ - { "110", voltronic_bypass_volt_min }, /* P02/P03/P10/P14 ivn>=200 */ + { "104", voltronic_bypass_volt_min }, /* P02/P03/P10/P13/P14 ivn<200 */ + { "110", voltronic_bypass_volt_min }, /* P02/P03/P10/P13/P14 ivn>=200 */ { "115", voltronic_bypass_volt_min }, /* P01 ivn<200 */ { "140", voltronic_bypass_volt_min }, /* P09 */ { "149", voltronic_bypass_volt_min }, /* P99 ivn>=200 */ { "170", voltronic_bypass_volt_min }, /* P01 ivn>=200 */ - { "209", voltronic_bypass_volt_min }, /* P02/P03/P10/P14/P99 ivn>=200 */ + { "209", voltronic_bypass_volt_min }, /* P02/P03/P10/P13/P14/P99 ivn>=200 */ { "220", voltronic_bypass_volt_min }, /* P01 ivn>=200 */ { "", 0 } }; @@ -389,12 +389,12 @@ static int voltronic_bypass_volt_min(char *value, size_t len) break; - case 55: /* P02/P03/P10/P14 ivn<200 */ + case 55: /* P02/P03/P10/P13/P14 ivn<200 */ if (ivn >= 200) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 10 || protocol == 14) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 10 || protocol == 13 || protocol == 14) return 0; break; @@ -417,22 +417,22 @@ static int voltronic_bypass_volt_min(char *value, size_t len) break; - case 104: /* P02/P03/P10/P14 ivn<200 */ + case 104: /* P02/P03/P10/P13/P14 ivn<200 */ if (ivn >= 200) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14) return 0; break; - case 110: /* P02/P03/P10/P14 ivn>=200 */ + case 110: /* P02/P03/P10/P13/P14 ivn>=200 */ if (ivn < 200) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14) return 0; break; @@ -467,12 +467,12 @@ static int voltronic_bypass_volt_min(char *value, size_t len) break; - case 209: /* P02/P03/P10/P14/P99 ivn>=200 */ + case 209: /* P02/P03/P10/P13/P14/P99 ivn>=200 */ if (ivn < 200) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -499,11 +499,11 @@ static int voltronic_bypass_volt_min(char *value, size_t len) /* Range for Bypass Mode maximum frequency */ static info_rw_t voltronic_r_bypass_freq_max[] = { - { "51.0", voltronic_bypass_freq_max }, /* P01/P09/P02/P03/P10/P14/P99 ofn==50.0 */ - { "54.0", voltronic_bypass_freq_max }, /* P02/P03/P10/P14/P99 ofn==50.0 */ + { "51.0", voltronic_bypass_freq_max }, /* P01/P09/P02/P03/P10/P13/P14/P99 ofn==50.0 */ + { "54.0", voltronic_bypass_freq_max }, /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ { "60.0", voltronic_bypass_freq_max }, /* P01/P09 ofn==50.0 */ - { "61.0", voltronic_bypass_freq_max }, /* P01/P09/P02/P03/P10/P14/P99 ofn==60.0 */ - { "64.0", voltronic_bypass_freq_max }, /* P02/P03/P10/P14/P99 ofn==60.0 */ + { "61.0", voltronic_bypass_freq_max }, /* P01/P09/P02/P03/P10/P13/P14/P99 ofn==60.0 */ + { "64.0", voltronic_bypass_freq_max }, /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ { "70.0", voltronic_bypass_freq_max }, /* P01/P09 ofn==60.0 */ { "", 0 } }; @@ -525,22 +525,22 @@ static int voltronic_bypass_freq_max(char *value, size_t len) switch (val) { - case 51: /* P01/P09/P02/P03/P10/P14/P99 ofn==50.0 */ + case 51: /* P01/P09/P02/P03/P10/P13/P14/P99 ofn==50.0 */ if (ofn != 50.0) return -1; - if (protocol == 1 || protocol == 2 || protocol == 3 || protocol == 9 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 1 || protocol == 2 || protocol == 3 || protocol == 9 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; - case 54: /* P02/P03/P10/P14/P99 ofn==50.0 */ + case 54: /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ if (ofn != 50.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -555,22 +555,22 @@ static int voltronic_bypass_freq_max(char *value, size_t len) break; - case 61: /* P01/P09/P02/P03/P10/P14/P99 ofn==60.0 */ + case 61: /* P01/P09/P02/P03/P10/P13/P14/P99 ofn==60.0 */ if (ofn != 60.0) return -1; - if (protocol == 1 || protocol == 2 || protocol == 3 || protocol == 9 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 1 || protocol == 2 || protocol == 3 || protocol == 9 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; - case 64: /* P02/P03/P10/P14/P99 ofn==60.0 */ + case 64: /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ if (ofn != 60.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -598,11 +598,11 @@ static int voltronic_bypass_freq_max(char *value, size_t len) /* Range for Bypass Mode minimum frequency */ static info_rw_t voltronic_r_bypass_freq_min[] = { { "40.0", voltronic_bypass_freq_min }, /* P01/P09 ofn==50.0 */ - { "46.0", voltronic_bypass_freq_min }, /* P02/P03/P10/P14/P99 ofn==50.0 */ - { "49.0", voltronic_bypass_freq_min }, /* P01/P09/P02/P03/P10/P14/P99 ofn==50.0 */ + { "46.0", voltronic_bypass_freq_min }, /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ + { "49.0", voltronic_bypass_freq_min }, /* P01/P09/P02/P03/P10/P13/P14/P99 ofn==50.0 */ { "50.0", voltronic_bypass_freq_min }, /* P01/P09 ofn==60.0 */ - { "56.0", voltronic_bypass_freq_min }, /* P02/P03/P10/P14/P99 ofn==60.0 */ - { "59.0", voltronic_bypass_freq_min }, /* P01/P09/P02/P03/P10/P14/P99 ofn==60.0 */ + { "56.0", voltronic_bypass_freq_min }, /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ + { "59.0", voltronic_bypass_freq_min }, /* P01/P09/P02/P03/P10/P13/P14/P99 ofn==60.0 */ { "", 0 } }; @@ -633,22 +633,22 @@ static int voltronic_bypass_freq_min(char *value, size_t len) break; - case 46: /* P02/P03/P10/P14/P99 ofn==50.0 */ + case 46: /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ if (ofn != 50.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; - case 49: /* P01/P09/P02/P03/P10/P14/P99 ofn==50.0 */ + case 49: /* P01/P09/P02/P03/P10/P13/P14/P99 ofn==50.0 */ if (ofn != 50.0) return -1; - if (protocol == 1 || protocol == 2 || protocol == 3 || protocol == 9 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 1 || protocol == 2 || protocol == 3 || protocol == 9 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -663,22 +663,22 @@ static int voltronic_bypass_freq_min(char *value, size_t len) break; - case 56: /* P02/P03/P10/P14/P99 ofn==60.0 */ + case 56: /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ if (ofn != 60.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; - case 59: /* P01/P09/P02/P03/P10/P14/P99 ofn==60.0 */ + case 59: /* P01/P09/P02/P03/P10/P13/P14/P99 ofn==60.0 */ if (ofn != 60.0) return -1; - if (protocol == 1 || protocol == 2 || protocol == 3 || protocol == 9 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 1 || protocol == 2 || protocol == 3 || protocol == 9 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -710,13 +710,13 @@ static info_rw_t voltronic_r_eco_volt_min[] = { /* Range for ECO Mode minimum frequency */ static info_rw_t voltronic_r_eco_freq_min[] = { { "40.0", voltronic_eco_freq_min }, /* P01/P09 ofn==50.0 */ - { "46.0", voltronic_eco_freq_min }, /* P02/P03/P10/P14/P99 ofn==50.0 */ + { "46.0", voltronic_eco_freq_min }, /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ { "47.0", voltronic_eco_freq_min }, /* P01/P09 ofn==50.0 */ - { "48.0", voltronic_eco_freq_min }, /* P02/P03/P10/P14/P99 ofn==50.0 */ + { "48.0", voltronic_eco_freq_min }, /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ { "50.0", voltronic_eco_freq_min }, /* P01/P09 ofn==60.0 */ - { "56.0", voltronic_eco_freq_min }, /* P02/P03/P10/P14/P99 ofn==60.0 */ + { "56.0", voltronic_eco_freq_min }, /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ { "57.0", voltronic_eco_freq_min }, /* P01/P09 ofn==60.0 */ - { "58.0", voltronic_eco_freq_min }, /* P02/P03/P10/P14/P99 ofn==60.0 */ + { "58.0", voltronic_eco_freq_min }, /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ { "", 0 } }; @@ -747,12 +747,12 @@ static int voltronic_eco_freq_min(char *value, size_t len) break; - case 46: /* P02/P03/P10/P14/P99 ofn==50.0 */ + case 46: /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ if (ofn != 50.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -767,12 +767,12 @@ static int voltronic_eco_freq_min(char *value, size_t len) break; - case 48: /* P02/P03/P10/P14/P99 ofn==50.0 */ + case 48: /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ if (ofn != 50.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -787,12 +787,12 @@ static int voltronic_eco_freq_min(char *value, size_t len) break; - case 56: /* P02/P03/P10/P14/P99 ofn==60.0 */ + case 56: /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ if (ofn != 60.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -807,12 +807,12 @@ static int voltronic_eco_freq_min(char *value, size_t len) break; - case 58: /* P02/P03/P10/P14/P99 ofn==60.0 */ + case 58: /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ if (ofn != 60.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -829,13 +829,13 @@ static int voltronic_eco_freq_min(char *value, size_t len) /* Range for ECO Mode maximum frequency */ static info_rw_t voltronic_r_eco_freq_max[] = { - { "52.0", voltronic_eco_freq_max }, /* P02/P03/P10/P14/P99 ofn==50.0 */ + { "52.0", voltronic_eco_freq_max }, /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ { "53.0", voltronic_eco_freq_max }, /* P01/P09 ofn==50.0 */ - { "54.0", voltronic_eco_freq_max }, /* P02/P03/P10/P14/P99 ofn==50.0 */ + { "54.0", voltronic_eco_freq_max }, /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ { "60.0", voltronic_eco_freq_max }, /* P01/P09 ofn==50.0 */ - { "62.0", voltronic_eco_freq_max }, /* P02/P03/P10/P14/P99 ofn==60.0 */ + { "62.0", voltronic_eco_freq_max }, /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ { "63.0", voltronic_eco_freq_max }, /* P01/P09 ofn==60.0 */ - { "64.0", voltronic_eco_freq_max }, /* P02/P03/P10/P14/P99 ofn==60.0 */ + { "64.0", voltronic_eco_freq_max }, /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ { "70.0", voltronic_eco_freq_max }, /* P01/P09 ofn==60.0 */ { "", 0 } }; @@ -857,12 +857,12 @@ static int voltronic_eco_freq_max(char *value, size_t len) switch (val) { - case 52: /* P02/P03/P10/P14/P99 ofn==50.0 */ + case 52: /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ if (ofn != 50.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -877,12 +877,12 @@ static int voltronic_eco_freq_max(char *value, size_t len) break; - case 54: /* P02/P03/P10/P14/P99 ofn==50.0 */ + case 54: /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ if (ofn != 50.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -897,12 +897,12 @@ static int voltronic_eco_freq_max(char *value, size_t len) break; - case 62: /* P02/P03/P10/P14/P99 ofn==60.0 */ + case 62: /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ if (ofn != 60.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -917,12 +917,12 @@ static int voltronic_eco_freq_max(char *value, size_t len) break; - case 64: /* P02/P03/P10/P14/P99 ofn==60.0 */ + case 64: /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ if (ofn != 60.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -972,7 +972,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "ups.firmware.aux", 0, NULL, "QPI\r", "", 6, '(', "", 1, 4, "%s", QX_FLAG_STATIC, voltronic_protocol }, + { "ups.firmware.aux", 0, NULL, "QPI\r", "", 6, '(', "", 1, 4, "%s", QX_FLAG_STATIC, NULL, voltronic_protocol }, /* Query UPS for ratings * > [QRI\r] @@ -981,10 +981,10 @@ static item_t voltronic_qx2nut[] = { * 0 1 2 */ - { "output.voltage.nominal", 0, NULL, "QRI\r", "", 22, '(', "", 1, 5, "%.1f", QX_FLAG_STATIC, NULL }, - { "output.current.nominal", 0, NULL, "QRI\r", "", 22, '(', "", 7, 9, "%.0f", QX_FLAG_STATIC, NULL }, - { "battery.voltage.nominal", 0, NULL, "QRI\r", "", 22, '(', "", 11, 15, "%.1f", QX_FLAG_SEMI_STATIC, NULL }, /* as *per battery pack*: the value will change when the number of batteries is changed (battery_number through BATNn) */ - { "output.frequency.nominal", 0, NULL, "QRI\r", "", 22, '(', "", 17, 20, "%.1f", QX_FLAG_STATIC, NULL }, + { "output.voltage.nominal", 0, NULL, "QRI\r", "", 22, '(', "", 1, 5, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "output.current.nominal", 0, NULL, "QRI\r", "", 22, '(', "", 7, 9, "%.0f", QX_FLAG_STATIC, NULL, NULL }, + { "battery.voltage.nominal", 0, NULL, "QRI\r", "", 22, '(', "", 11, 15, "%.1f", QX_FLAG_SEMI_STATIC, NULL, NULL }, /* as *per battery pack*: the value will change when the number of batteries is changed (battery_number through BATNn) */ + { "output.frequency.nominal", 0, NULL, "QRI\r", "", 22, '(', "", 17, 20, "%.1f", QX_FLAG_STATIC, NULL, NULL }, /* Query UPS for ratings * > [QMD\r] @@ -993,15 +993,15 @@ static item_t voltronic_qx2nut[] = { * 0 1 2 3 4 */ - { "device.model", 0, NULL, "QMD\r", "", 48, '(', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "ups.power.nominal", 0, NULL, "QMD\r", "", 48, '(', "", 17, 23, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "output.powerfactor", 0, NULL, "QMD\r", "", 48, '(', "", 25, 26, "%.1f", QX_FLAG_STATIC, voltronic_output_powerfactor }, - { "input.phases", 0, NULL, "QMD\r", "", 48, '(', "", 28, 28, "%.0f", QX_FLAG_STATIC, NULL }, - { "output.phases", 0, NULL, "QMD\r", "", 48, '(', "", 30, 30, "%.0f", QX_FLAG_STATIC, NULL }, - { "input.voltage.nominal", 0, NULL, "QMD\r", "", 48, '(', "", 32, 34, "%.1f", QX_FLAG_STATIC, NULL }, - { "output.voltage.nominal", 0, NULL, "QMD\r", "", 48, '(', "", 36, 38, "%.1f", QX_FLAG_STATIC, NULL }, /* redundant with value from QRI */ -/* { "battery_number", ST_FLAG_RW, voltronic_r_batt_numb, "QMD\r", "", 48, '(', "", 40, 41, "%d", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT, voltronic_batt_numb }, *//* redundant with value from QBV */ -/* { "battery.voltage.nominal", 0, NULL, "QMD\r", "", 48, '(', "", 43, 46, "%.1f", QX_FLAG_STATIC, NULL }, *//* as *per battery* vs *per pack* reported by QRI */ + { "device.model", 0, NULL, "QMD\r", "", 48, '(', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "ups.power.nominal", 0, NULL, "QMD\r", "", 48, '(', "", 17, 23, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "output.powerfactor", 0, NULL, "QMD\r", "", 48, '(', "", 25, 26, "%.1f", QX_FLAG_STATIC, NULL, voltronic_output_powerfactor }, + { "input.phases", 0, NULL, "QMD\r", "", 48, '(', "", 28, 28, "%.0f", QX_FLAG_STATIC, NULL, NULL }, + { "output.phases", 0, NULL, "QMD\r", "", 48, '(', "", 30, 30, "%.0f", QX_FLAG_STATIC, NULL, NULL }, + { "input.voltage.nominal", 0, NULL, "QMD\r", "", 48, '(', "", 32, 34, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "output.voltage.nominal", 0, NULL, "QMD\r", "", 48, '(', "", 36, 38, "%.1f", QX_FLAG_STATIC, NULL, NULL }, /* redundant with value from QRI */ +/* { "battery_number", ST_FLAG_RW, voltronic_r_batt_numb, "QMD\r", "", 48, '(', "", 40, 41, "%d", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT, NULL, voltronic_batt_numb }, *//* redundant with value from QBV */ +/* { "battery.voltage.nominal", 0, NULL, "QMD\r", "", 48, '(', "", 43, 46, "%.1f", QX_FLAG_STATIC, NULL, NULL }, *//* as *per battery* vs *per pack* reported by QRI */ /* Query UPS for ratings * > [F\r] @@ -1010,10 +1010,10 @@ static item_t voltronic_qx2nut[] = { * 0 1 2 */ - { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.1f", QX_FLAG_STATIC, NULL }, - { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL }, - { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL }, - { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.1f", QX_FLAG_STATIC, NULL }, + { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.1f", QX_FLAG_STATIC, NULL, NULL }, /* Query UPS for manufacturer * > [QMF\r] @@ -1022,7 +1022,7 @@ static item_t voltronic_qx2nut[] = { * 0 1 */ - { "device.mfr", 0, NULL, "QMF\r", "", 2, '(', "", 1, 0, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, + { "device.mfr", 0, NULL, "QMF\r", "", 2, '(', "", 1, 0, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, /* Query UPS for firmware version * > [QVFW\r] @@ -1031,7 +1031,7 @@ static item_t voltronic_qx2nut[] = { * 0 1 */ - { "ups.firmware", 0, NULL, "QVFW\r", "", 16, '(', "", 7, 14, "%s", QX_FLAG_STATIC, NULL }, + { "ups.firmware", 0, NULL, "QVFW\r", "", 16, '(', "", 7, 14, "%s", QX_FLAG_STATIC, NULL, NULL }, /* Query UPS for serial number * > [QID\r] @@ -1040,7 +1040,7 @@ static item_t voltronic_qx2nut[] = { * 0 1 */ - { "device.serial", 0, NULL, "QID\r", "", 2, '(', "", 1, 0, "%s", QX_FLAG_STATIC, voltronic_serial_numb }, + { "device.serial", 0, NULL, "QID\r", "", 2, '(', "", 1, 0, "%s", QX_FLAG_STATIC, NULL, voltronic_serial_numb }, /* Query UPS for vendor infos * > [I\r] @@ -1049,9 +1049,9 @@ static item_t voltronic_qx2nut[] = { * 0 1 2 3 */ - { "device.mfr", 0, NULL, "I\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "device.model", 0, NULL, "I\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "ups.firmware", 0, NULL, "I\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, + { "device.mfr", 0, NULL, "I\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "device.model", 0, NULL, "I\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "ups.firmware", 0, NULL, "I\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, /* Query UPS for status * > [QGS\r] @@ -1060,29 +1060,29 @@ static item_t voltronic_qx2nut[] = { * 0 1 2 3 4 5 6 7 */ - { "input.voltage", 0, NULL, "QGS\r", "", 76, '(', "", 1, 5, "%.1f", 0, NULL }, - { "input.frequency", 0, NULL, "QGS\r", "", 76, '(', "", 7, 10, "%.1f", 0, NULL }, - { "output.voltage", 0, NULL, "QGS\r", "", 76, '(', "", 12, 16, "%.1f", 0, NULL }, - { "output.frequency", 0, NULL, "QGS\r", "", 76, '(', "", 18, 21, "%.1f", 0, NULL }, - { "output.current", 0, NULL, "QGS\r", "", 76, '(', "", 23, 27, "%.1f", 0, NULL }, - { "ups.load", 0, NULL, "QGS\r", "", 76, '(', "", 29, 31, "%.0f", 0, NULL }, -/* { "unknown.1", 0, NULL, "QGS\r", "", 76, '(', "", 33, 37, "%.1f", 0, NULL }, *//* Unknown */ -/* { "unknown.2", 0, NULL, "QGS\r", "", 76, '(', "", 39, 43, "%.1f", 0, NULL }, *//* Unknown */ - { "battery.voltage", 0, NULL, "QGS\r", "", 76, '(', "", 45, 49, "%.2f", 0, NULL }, -/* { "unknown.3", 0, NULL, "QGS\r", "", 76, '(', "", 51, 55, "%.1f", 0, NULL }, *//* Unknown */ - { "ups.temperature", 0, NULL, "QGS\r", "", 76, '(', "", 57, 61, "%.1f", 0, NULL }, - { "ups.type", 0, NULL, "QGS\r", "", 76, '(', "", 63, 64, "%s", QX_FLAG_SEMI_STATIC, voltronic_status }, - { "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 65, 65, "%s", QX_FLAG_QUICK_POLL, voltronic_status }, /* Utility Fail (Immediate) */ - { "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 66, 66, "%s", QX_FLAG_QUICK_POLL, voltronic_status }, /* Battery Low */ - { "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 67, 67, "%s", QX_FLAG_QUICK_POLL, voltronic_status }, /* Bypass/Boost or Buck Active */ - { "ups.alarm", 0, NULL, "QGS\r", "", 76, '(', "", 67, 67, "%s", 0, voltronic_status }, /* Bypass/Boost or Buck Active */ - { "ups.alarm", 0, NULL, "QGS\r", "", 76, '(', "", 68, 68, "%s", 0, voltronic_status }, /* UPS Fault */ -/* { "unknown.4", 0, NULL, "QGS\r", "", 76, '(', "", 69, 69, "%s", 0, voltronic_status }, *//* Unknown */ - { "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 70, 70, "%s", QX_FLAG_QUICK_POLL, voltronic_status }, /* Test in Progress */ - { "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 71, 71, "%s", QX_FLAG_QUICK_POLL, voltronic_status }, /* Shutdown Active */ - { "ups.beeper.status", 0, NULL, "QGS\r", "", 76, '(', "", 72, 72, "%s", 0, voltronic_status }, /* Beeper status - ups.beeper.status */ -/* { "unknown.5", 0, NULL, "QGS\r", "", 76, '(', "", 73, 73, "%s", 0, voltronic_status }, *//* Unknown */ -/* { "unknown.6", 0, NULL, "QGS\r", "", 76, '(', "", 74, 74, "%s", 0, voltronic_status }, *//* Unknown */ + { "input.voltage", 0, NULL, "QGS\r", "", 76, '(', "", 1, 5, "%.1f", 0, NULL, NULL }, + { "input.frequency", 0, NULL, "QGS\r", "", 76, '(', "", 7, 10, "%.1f", 0, NULL, NULL }, + { "output.voltage", 0, NULL, "QGS\r", "", 76, '(', "", 12, 16, "%.1f", 0, NULL, NULL }, + { "output.frequency", 0, NULL, "QGS\r", "", 76, '(', "", 18, 21, "%.1f", 0, NULL, NULL }, + { "output.current", 0, NULL, "QGS\r", "", 76, '(', "", 23, 27, "%.1f", 0, NULL, NULL }, + { "ups.load", 0, NULL, "QGS\r", "", 76, '(', "", 29, 31, "%.0f", 0, NULL, NULL }, +/* { "unknown.1", 0, NULL, "QGS\r", "", 76, '(', "", 33, 37, "%.1f", 0, NULL, NULL }, *//* Unknown */ +/* { "unknown.2", 0, NULL, "QGS\r", "", 76, '(', "", 39, 43, "%.1f", 0, NULL, NULL }, *//* Unknown */ + { "battery.voltage", 0, NULL, "QGS\r", "", 76, '(', "", 45, 49, "%.2f", 0, NULL, NULL }, +/* { "unknown.3", 0, NULL, "QGS\r", "", 76, '(', "", 51, 55, "%.1f", 0, NULL, NULL }, *//* Unknown */ + { "ups.temperature", 0, NULL, "QGS\r", "", 76, '(', "", 57, 61, "%.1f", 0, NULL, NULL }, + { "ups.type", 0, NULL, "QGS\r", "", 76, '(', "", 63, 64, "%s", QX_FLAG_SEMI_STATIC, NULL, voltronic_status }, + { "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 65, 65, "%s", QX_FLAG_QUICK_POLL, NULL, voltronic_status }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 66, 66, "%s", QX_FLAG_QUICK_POLL, NULL, voltronic_status }, /* Battery Low */ + { "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 67, 67, "%s", QX_FLAG_QUICK_POLL, NULL, voltronic_status }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "QGS\r", "", 76, '(', "", 67, 67, "%s", 0, NULL, voltronic_status }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "QGS\r", "", 76, '(', "", 68, 68, "%s", 0, NULL, voltronic_status }, /* UPS Fault */ +/* { "unknown.4", 0, NULL, "QGS\r", "", 76, '(', "", 69, 69, "%s", 0, NULL, voltronic_status }, *//* Unknown */ + { "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 70, 70, "%s", QX_FLAG_QUICK_POLL, NULL, voltronic_status }, /* Test in Progress */ + { "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 71, 71, "%s", QX_FLAG_QUICK_POLL, NULL, voltronic_status }, /* Shutdown Active */ + { "ups.beeper.status", 0, NULL, "QGS\r", "", 76, '(', "", 72, 72, "%s", 0, NULL, voltronic_status }, /* Beeper status - ups.beeper.status */ +/* { "unknown.5", 0, NULL, "QGS\r", "", 76, '(', "", 73, 73, "%s", 0, NULL, voltronic_status }, *//* Unknown */ +/* { "unknown.6", 0, NULL, "QGS\r", "", 76, '(', "", 74, 74, "%s", 0, NULL, voltronic_status }, *//* Unknown */ /* Query UPS for actual working mode * > [QMOD\r] @@ -1091,8 +1091,8 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "ups.alarm", 0, NULL, "QMOD\r", "", 3, '(', "", 1, 1, "%s", 0, voltronic_mode }, - { "ups.status", 0, NULL, "QMOD\r", "", 3, '(', "", 1, 1, "%s", 0, voltronic_mode }, + { "ups.alarm", 0, NULL, "QMOD\r", "", 3, '(', "", 1, 1, "%s", 0, NULL, voltronic_mode }, + { "ups.status", 0, NULL, "QMOD\r", "", 3, '(', "", 1, 1, "%s", 0, NULL, voltronic_mode }, /* Query UPS for faults and their type. Unskipped when a fault is found in 12bit flag of QGS, otherwise you'll get a fake reply. * > [QFS\r] @@ -1104,7 +1104,7 @@ static item_t voltronic_qx2nut[] = { * 0 1 2 3 4 5 6 */ - { "ups.alarm", 0, NULL, "QFS\r", "", 4, '(', "", 1, 2, "%s", QX_FLAG_SKIP, voltronic_fault }, + { "ups.alarm", 0, NULL, "QFS\r", "", 4, '(', "", 1, 2, "%s", QX_FLAG_SKIP, NULL, voltronic_fault }, /* Query UPS for warnings and their type * > [QWS\r] @@ -1113,7 +1113,7 @@ static item_t voltronic_qx2nut[] = { * 0 1 2 3 4 5 6 */ - { "ups.alarm", 0, NULL, "QWS\r", "", 66, '(', "", 1, 64, "%s", 0, voltronic_warning }, + { "ups.alarm", 0, NULL, "QWS\r", "", 66, '(', "", 1, 64, "%s", 0, NULL, voltronic_warning }, /* Query UPS for actual infos about battery * > [QBV\r] @@ -1122,11 +1122,11 @@ static item_t voltronic_qx2nut[] = { * 0 1 2 */ - { "battery.voltage", 0, NULL, "QBV\r", "", 21, '(', "", 1, 5, "%.2f", 0, NULL }, - { "battery_number", ST_FLAG_RW, voltronic_r_batt_numb, "QBV\r", "", 21, '(', "", 7, 9, "%d", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT, voltronic_batt_numb }, /* Number of batteries that make a pack */ - { "battery.packs", ST_FLAG_RW, voltronic_r_batt_packs, "QBV\r", "", 21, '(', "", 10, 11, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE, NULL }, /* Number of battery packs in parallel */ - { "battery.charge", 0, NULL, "QBV\r", "", 21, '(', "", 13, 15, "%.0f", 0, NULL }, - { "battery.runtime", 0, NULL, "QBV\r", "", 21, '(', "", 17, 19, "%.0f", 0, voltronic_batt_runtime }, + { "battery.voltage", 0, NULL, "QBV\r", "", 21, '(', "", 1, 5, "%.2f", 0, NULL, NULL }, + { "battery_number", ST_FLAG_RW, voltronic_r_batt_numb, "QBV\r", "", 21, '(', "", 7, 9, "%d", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT, NULL, voltronic_batt_numb }, /* Number of batteries that make a pack */ + { "battery.packs", ST_FLAG_RW, voltronic_r_batt_packs, "QBV\r", "", 21, '(', "", 10, 11, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE, NULL, NULL }, /* Number of battery packs in parallel */ + { "battery.charge", 0, NULL, "QBV\r", "", 21, '(', "", 13, 15, "%.0f", 0, NULL, NULL }, + { "battery.runtime", 0, NULL, "QBV\r", "", 21, '(', "", 17, 19, "%.0f", 0, NULL, voltronic_batt_runtime }, /* Query UPS for last seen min/max load level * > [QLDL\r] @@ -1135,8 +1135,8 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "output.power.minimum.percent", 0, NULL, "QLDL\r", "", 9, '(', "", 1, 3, "%.0f", 0, NULL }, - { "output.power.maximum.percent", 0, NULL, "QLDL\r", "", 9, '(', "", 5, 7, "%.0f", 0, NULL }, + { "output.power.minimum.percent", 0, NULL, "QLDL\r", "", 9, '(', "", 1, 3, "%.0f", 0, NULL, NULL }, + { "output.power.maximum.percent", 0, NULL, "QLDL\r", "", 9, '(', "", 5, 7, "%.0f", 0, NULL, NULL }, /* Query UPS for multi-phase voltages/frequencies * > [Q3**\r] @@ -1169,50 +1169,50 @@ static item_t voltronic_qx2nut[] = { */ /* From Q3PV */ - { "input.L1-N.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 1, 5, "%.1f", QX_FLAG_SKIP, NULL }, - { "input.L2-N.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 7, 11, "%.1f", QX_FLAG_SKIP, NULL }, - { "input.L3-N.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 13, 17, "%.1f", QX_FLAG_SKIP, NULL }, - { "input.L1-L2.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 19, 23, "%.1f", QX_FLAG_SKIP, NULL }, - { "input.L2-L3.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 25, 29, "%.1f", QX_FLAG_SKIP, NULL }, - { "input.L1-L3.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 31, 35, "%.1f", QX_FLAG_SKIP, NULL }, -/* { "input.L1-L3.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 25, 29, "%.1f", QX_FLAG_SKIP, NULL }, *//* P09 *//* Commented out because P09 should be two-phase input/output UPSes */ -/* { "input.L2-L3.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 31, 35, "%.1f", QX_FLAG_SKIP, NULL }, *//* P09 *//* Commented out because P09 should be two-phase input/output UPSes */ + { "input.L1-N.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 1, 5, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "input.L2-N.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 7, 11, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "input.L3-N.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 13, 17, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "input.L1-L2.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 19, 23, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "input.L2-L3.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 25, 29, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "input.L1-L3.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 31, 35, "%.1f", QX_FLAG_SKIP, NULL, NULL }, +/* { "input.L1-L3.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 25, 29, "%.1f", QX_FLAG_SKIP, NULL, NULL }, *//* P09 *//* Commented out because P09 should be two-phase input/output UPSes */ +/* { "input.L2-L3.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 31, 35, "%.1f", QX_FLAG_SKIP, NULL, NULL }, *//* P09 *//* Commented out because P09 should be two-phase input/output UPSes */ /* From Q3PC */ - { "input.L1.current", 0, NULL, "Q3PC\r", "", 13, '(', "", 1, 3, "%.0f", QX_FLAG_SKIP, NULL }, - { "input.L2.current", 0, NULL, "Q3PC\r", "", 13, '(', "", 5, 7, "%.0f", QX_FLAG_SKIP, NULL }, - { "input.L3.current", 0, NULL, "Q3PC\r", "", 13, '(', "", 9, 11, "%.0f", QX_FLAG_SKIP, NULL }, + { "input.L1.current", 0, NULL, "Q3PC\r", "", 13, '(', "", 1, 3, "%.0f", QX_FLAG_SKIP, NULL, NULL }, + { "input.L2.current", 0, NULL, "Q3PC\r", "", 13, '(', "", 5, 7, "%.0f", QX_FLAG_SKIP, NULL, NULL }, + { "input.L3.current", 0, NULL, "Q3PC\r", "", 13, '(', "", 9, 11, "%.0f", QX_FLAG_SKIP, NULL, NULL }, /* From Q3OV */ - { "output.L1-N.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 1, 5, "%.1f", QX_FLAG_SKIP, NULL }, - { "output.L2-N.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 7, 11, "%.1f", QX_FLAG_SKIP, NULL }, - { "output.L3-N.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 13, 17, "%.1f", QX_FLAG_SKIP, NULL }, - { "output.L1-L2.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 19, 23, "%.1f", QX_FLAG_SKIP, NULL }, - { "output.L2-L3.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 25, 29, "%.1f", QX_FLAG_SKIP, NULL }, - { "output.L1-L3.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 31, 35, "%.1f", QX_FLAG_SKIP, NULL }, -/* { "output.L1-L3.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 25, 29, "%.1f", QX_FLAG_SKIP, NULL }, *//* P09 *//* Commented out because P09 should be two-phase input/output UPSes */ -/* { "output.L2-L3.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 31, 35, "%.1f", QX_FLAG_SKIP, NULL }, *//* P09 *//* Commented out because P09 should be two-phase input/output UPSes */ + { "output.L1-N.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 1, 5, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "output.L2-N.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 7, 11, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "output.L3-N.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 13, 17, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "output.L1-L2.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 19, 23, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "output.L2-L3.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 25, 29, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "output.L1-L3.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 31, 35, "%.1f", QX_FLAG_SKIP, NULL, NULL }, +/* { "output.L1-L3.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 25, 29, "%.1f", QX_FLAG_SKIP, NULL, NULL }, *//* P09 *//* Commented out because P09 should be two-phase input/output UPSes */ +/* { "output.L2-L3.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 31, 35, "%.1f", QX_FLAG_SKIP, NULL, NULL }, *//* P09 *//* Commented out because P09 should be two-phase input/output UPSes */ /* From Q3OC */ - { "output.L1.current", 0, NULL, "Q3OC\r", "", 13, '(', "", 1, 3, "%.0f", QX_FLAG_SKIP, NULL }, - { "output.L2.current", 0, NULL, "Q3OC\r", "", 13, '(', "", 5, 7, "%.0f", QX_FLAG_SKIP, NULL }, - { "output.L3.current", 0, NULL, "Q3OC\r", "", 13, '(', "", 9, 11, "%.0f", QX_FLAG_SKIP, NULL }, + { "output.L1.current", 0, NULL, "Q3OC\r", "", 13, '(', "", 1, 3, "%.0f", QX_FLAG_SKIP, NULL, NULL }, + { "output.L2.current", 0, NULL, "Q3OC\r", "", 13, '(', "", 5, 7, "%.0f", QX_FLAG_SKIP, NULL, NULL }, + { "output.L3.current", 0, NULL, "Q3OC\r", "", 13, '(', "", 9, 11, "%.0f", QX_FLAG_SKIP, NULL, NULL }, /* From Q3LD */ - { "output.L1.power.percent", 0, NULL, "Q3LD\r", "", 13, '(', "", 1, 3, "%.0f", QX_FLAG_SKIP, NULL }, - { "output.L2.power.percent", 0, NULL, "Q3LD\r", "", 13, '(', "", 5, 7, "%.0f", QX_FLAG_SKIP, NULL }, - { "output.L3.power.percent", 0, NULL, "Q3LD\r", "", 13, '(', "", 9, 11, "%.0f", QX_FLAG_SKIP, NULL }, + { "output.L1.power.percent", 0, NULL, "Q3LD\r", "", 13, '(', "", 1, 3, "%.0f", QX_FLAG_SKIP, NULL, NULL }, + { "output.L2.power.percent", 0, NULL, "Q3LD\r", "", 13, '(', "", 5, 7, "%.0f", QX_FLAG_SKIP, NULL, NULL }, + { "output.L3.power.percent", 0, NULL, "Q3LD\r", "", 13, '(', "", 9, 11, "%.0f", QX_FLAG_SKIP, NULL, NULL }, /* From Q3YV */ - { "output.bypass.L1-N.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 1, 5, "%.1f", QX_FLAG_SKIP, NULL }, - { "output.bypass.L2-N.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 7, 11, "%.1f", QX_FLAG_SKIP, NULL }, - { "output.bypass.L3-N.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 13, 17, "%.1f", QX_FLAG_SKIP, NULL }, - { "output.bypass.L1-N.voltage", 0, NULL, "Q3YV\r", "", 19, '(', "", 1, 5, "%.1f", QX_FLAG_SKIP, NULL }, /* P09 */ - { "output.bypass.L2-N.voltage", 0, NULL, "Q3YV\r", "", 19, '(', "", 7, 11, "%.1f", QX_FLAG_SKIP, NULL }, /* P09 */ -/* { "output.bypass.L3-N.voltage", 0, NULL, "Q3YV\r", "", 19, '(', "", 13, 17, "%.1f", QX_FLAG_SKIP, NULL }, *//* P09 *//* Commented out because P09 should be two-phase input/output UPSes */ - { "output.bypass.L1-L2.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 19, 23, "%.1f", QX_FLAG_SKIP, NULL }, - { "output.bypass.L2-L3.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 25, 29, "%.1f", QX_FLAG_SKIP, NULL }, - { "output.bypass.L1-L3.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 31, 35, "%.1f", QX_FLAG_SKIP, NULL }, + { "output.bypass.L1-N.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 1, 5, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "output.bypass.L2-N.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 7, 11, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "output.bypass.L3-N.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 13, 17, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "output.bypass.L1-N.voltage", 0, NULL, "Q3YV\r", "", 19, '(', "", 1, 5, "%.1f", QX_FLAG_SKIP, NULL, NULL }, /* P09 */ + { "output.bypass.L2-N.voltage", 0, NULL, "Q3YV\r", "", 19, '(', "", 7, 11, "%.1f", QX_FLAG_SKIP, NULL, NULL }, /* P09 */ +/* { "output.bypass.L3-N.voltage", 0, NULL, "Q3YV\r", "", 19, '(', "", 13, 17, "%.1f", QX_FLAG_SKIP, NULL, NULL }, *//* P09 *//* Commented out because P09 should be two-phase input/output UPSes */ + { "output.bypass.L1-L2.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 19, 23, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "output.bypass.L2-L3.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 25, 29, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "output.bypass.L1-L3.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 31, 35, "%.1f", QX_FLAG_SKIP, NULL, NULL }, /* Query UPS for capability - total options available: 23; only those whom the UPS is capable of are reported as Enabled or Disabled * > [QFLAG\r] @@ -1221,24 +1221,24 @@ static item_t voltronic_qx2nut[] = { * 0 1 * min length = ( + E + D + \r = 4 */ - { "ups.start.auto", ST_FLAG_RW, voltronic_e_cap, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, voltronic_capability }, - { "battery.protection", ST_FLAG_RW, voltronic_e_cap, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, voltronic_capability }, - { "battery.energysave", ST_FLAG_RW, voltronic_e_cap, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, voltronic_capability }, - { "ups.start.battery", ST_FLAG_RW, voltronic_e_cap, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, voltronic_capability }, - { "outlet.0.switchable", ST_FLAG_RW, voltronic_e_cap, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, voltronic_capability }, + { "ups.start.auto", ST_FLAG_RW, voltronic_e_cap, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, NULL, voltronic_capability }, + { "battery.protection", ST_FLAG_RW, voltronic_e_cap, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, NULL, voltronic_capability }, + { "battery.energysave", ST_FLAG_RW, voltronic_e_cap, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, NULL, voltronic_capability }, + { "ups.start.battery", ST_FLAG_RW, voltronic_e_cap, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, NULL, voltronic_capability }, + { "outlet.0.switchable", ST_FLAG_RW, voltronic_e_cap, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, NULL, voltronic_capability }, /* Not available in NUT */ - { "bypass_alarm", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "battery_alarm", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "bypass_when_off", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "alarm_control", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "converter_mode", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "eco_mode", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "battery_open_status_check", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "bypass_forbidding", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "site_fault_detection", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "advanced_eco_mode", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "constant_phase_angle", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "limited_runtime_on_battery", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, + { "bypass_alarm", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "battery_alarm", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "bypass_when_off", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "alarm_control", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "converter_mode", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "eco_mode", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "battery_open_status_check", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "bypass_forbidding", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "site_fault_detection", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "advanced_eco_mode", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "constant_phase_angle", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "limited_runtime_on_battery", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, /* Enable or Disable or Reset to safe default values capability options * > [PEX\r] > [PDX\r] > [PF\r] @@ -1247,25 +1247,25 @@ static item_t voltronic_qx2nut[] = { * 0 0 0 */ - { "ups.start.auto", 0, voltronic_e_cap, "P%sR\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, voltronic_capability_set }, - { "battery.protection", 0, voltronic_e_cap, "P%sS\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, voltronic_capability_set }, - { "battery.energysave", 0, voltronic_e_cap, "P%sG\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, voltronic_capability_set }, - { "ups.start.battery", 0, voltronic_e_cap, "P%sC\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, voltronic_capability_set }, - { "outlet.0.switchable", 0, voltronic_e_cap, "P%sJ\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, voltronic_capability_set }, + { "ups.start.auto", 0, voltronic_e_cap, "P%sR\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, NULL, voltronic_capability_set }, + { "battery.protection", 0, voltronic_e_cap, "P%sS\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, NULL, voltronic_capability_set }, + { "battery.energysave", 0, voltronic_e_cap, "P%sG\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, NULL, voltronic_capability_set }, + { "ups.start.battery", 0, voltronic_e_cap, "P%sC\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, NULL, voltronic_capability_set }, + { "outlet.0.switchable", 0, voltronic_e_cap, "P%sJ\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, NULL, voltronic_capability_set }, /* Not available in NUT */ - { "reset_to_default", 0, NULL, "PF\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_reset }, - { "bypass_alarm", 0, voltronic_e_cap_nonut, "P%sP\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "battery_alarm", 0, voltronic_e_cap_nonut, "P%sB\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "bypass_when_off", 0, voltronic_e_cap_nonut, "P%sO\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "alarm_control", 0, voltronic_e_cap_nonut, "P%sA\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "converter_mode", 0, voltronic_e_cap_nonut, "P%sV\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "eco_mode", 0, voltronic_e_cap_nonut, "P%sE\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "battery_open_status_check", 0, voltronic_e_cap_nonut, "P%sD\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "bypass_forbidding", 0, voltronic_e_cap_nonut, "P%sF\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "site_fault_detection", 0, voltronic_e_cap_nonut, "P%sL\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "advanced_eco_mode", 0, voltronic_e_cap_nonut, "P%sN\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "constant_phase_angle", 0, voltronic_e_cap_nonut, "P%sQ\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "limited_runtime_on_battery", 0, voltronic_e_cap_nonut, "P%sW\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, + { "reset_to_default", 0, NULL, "PF\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_reset }, + { "bypass_alarm", 0, voltronic_e_cap_nonut, "P%sP\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "battery_alarm", 0, voltronic_e_cap_nonut, "P%sB\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "bypass_when_off", 0, voltronic_e_cap_nonut, "P%sO\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "alarm_control", 0, voltronic_e_cap_nonut, "P%sA\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "converter_mode", 0, voltronic_e_cap_nonut, "P%sV\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "eco_mode", 0, voltronic_e_cap_nonut, "P%sE\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "battery_open_status_check", 0, voltronic_e_cap_nonut, "P%sD\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "bypass_forbidding", 0, voltronic_e_cap_nonut, "P%sF\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "site_fault_detection", 0, voltronic_e_cap_nonut, "P%sL\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "advanced_eco_mode", 0, voltronic_e_cap_nonut, "P%sN\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "constant_phase_angle", 0, voltronic_e_cap_nonut, "P%sQ\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "limited_runtime_on_battery", 0, voltronic_e_cap_nonut, "P%sW\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, /* Query UPS for programmable outlet (1-4) status * > [QSK1\r] @@ -1274,14 +1274,14 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "outlet.1.switchable", 0, NULL, "QSK1\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_outlet }, - { "outlet.1.status", 0, NULL, "QSK1\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_outlet }, - { "outlet.2.switchable", 0, NULL, "QSK2\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_outlet }, - { "outlet.2.status", 0, NULL, "QSK2\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_outlet }, - { "outlet.3.switchable", 0, NULL, "QSK3\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_outlet }, - { "outlet.3.status", 0, NULL, "QSK3\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_outlet }, - { "outlet.4.switchable", 0, NULL, "QSK4\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_outlet }, - { "outlet.4.status", 0, NULL, "QSK4\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_outlet }, + { "outlet.1.switchable", 0, NULL, "QSK1\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_outlet }, + { "outlet.1.status", 0, NULL, "QSK1\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_outlet }, + { "outlet.2.switchable", 0, NULL, "QSK2\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_outlet }, + { "outlet.2.status", 0, NULL, "QSK2\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_outlet }, + { "outlet.3.switchable", 0, NULL, "QSK3\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_outlet }, + { "outlet.3.status", 0, NULL, "QSK3\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_outlet }, + { "outlet.4.switchable", 0, NULL, "QSK4\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_outlet }, + { "outlet.4.status", 0, NULL, "QSK4\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_outlet }, /* Query UPS for programmable outlet n (1-4) delay time before it shuts down the load when on battery mode * > [QSKT1\r] @@ -1290,10 +1290,10 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "outlet.1.delay.shutdown", ST_FLAG_RW, voltronic_r_outlet_delay, "QSKT1\r", "", 5, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_outlet_delay }, - { "outlet.2.delay.shutdown", ST_FLAG_RW, voltronic_r_outlet_delay, "QSKT2\r", "", 5, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_outlet_delay }, - { "outlet.3.delay.shutdown", ST_FLAG_RW, voltronic_r_outlet_delay, "QSKT3\r", "", 5, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_outlet_delay }, - { "outlet.4.delay.shutdown", ST_FLAG_RW, voltronic_r_outlet_delay, "QSKT4\r", "", 5, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_outlet_delay }, + { "outlet.1.delay.shutdown", ST_FLAG_RW, voltronic_r_outlet_delay, "QSKT1\r", "", 5, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_outlet_delay }, + { "outlet.2.delay.shutdown", ST_FLAG_RW, voltronic_r_outlet_delay, "QSKT2\r", "", 5, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_outlet_delay }, + { "outlet.3.delay.shutdown", ST_FLAG_RW, voltronic_r_outlet_delay, "QSKT3\r", "", 5, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_outlet_delay }, + { "outlet.4.delay.shutdown", ST_FLAG_RW, voltronic_r_outlet_delay, "QSKT4\r", "", 5, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_outlet_delay }, /* Set delay time for programmable outlets * > [PSK1nnn\r] n = 0..9 @@ -1302,10 +1302,10 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "outlet.1.delay.shutdown", 0, voltronic_r_outlet_delay, "PSK1%03d\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_outlet_delay_set }, - { "outlet.2.delay.shutdown", 0, voltronic_r_outlet_delay, "PSK2%03d\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_outlet_delay_set }, - { "outlet.3.delay.shutdown", 0, voltronic_r_outlet_delay, "PSK3%03d\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_outlet_delay_set }, - { "outlet.4.delay.shutdown", 0, voltronic_r_outlet_delay, "PSK4%03d\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_outlet_delay_set }, + { "outlet.1.delay.shutdown", 0, voltronic_r_outlet_delay, "PSK1%03d\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_outlet_delay_set }, + { "outlet.2.delay.shutdown", 0, voltronic_r_outlet_delay, "PSK2%03d\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_outlet_delay_set }, + { "outlet.3.delay.shutdown", 0, voltronic_r_outlet_delay, "PSK3%03d\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_outlet_delay_set }, + { "outlet.4.delay.shutdown", 0, voltronic_r_outlet_delay, "PSK4%03d\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_outlet_delay_set }, /* Query UPS for ECO Mode voltage limits * > [QHE\r] @@ -1314,12 +1314,12 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "input.transfer.high", ST_FLAG_RW, voltronic_r_eco_volt_max, "QHE\r", "", 9, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_eco_volt }, - { "input.transfer.low", ST_FLAG_RW, voltronic_r_eco_volt_min, "QHE\r", "", 9, '(', "", 5, 7, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_eco_volt }, - { "input.transfer.low.min", 0, NULL, "QHE\r", "", 9, '(', "", 5, 7, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_eco_volt_range }, - { "input.transfer.low.max", 0, NULL, "QHE\r", "", 9, '(', "", 5, 7, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_eco_volt_range }, - { "input.transfer.high.min", 0, NULL, "QHE\r", "", 9, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_eco_volt_range }, - { "input.transfer.high.max", 0, NULL, "QHE\r", "", 9, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_eco_volt_range }, + { "input.transfer.high", ST_FLAG_RW, voltronic_r_eco_volt_max, "QHE\r", "", 9, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_eco_volt }, + { "input.transfer.low", ST_FLAG_RW, voltronic_r_eco_volt_min, "QHE\r", "", 9, '(', "", 5, 7, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_eco_volt }, + { "input.transfer.low.min", 0, NULL, "QHE\r", "", 9, '(', "", 5, 7, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_eco_volt_range }, + { "input.transfer.low.max", 0, NULL, "QHE\r", "", 9, '(', "", 5, 7, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_eco_volt_range }, + { "input.transfer.high.min", 0, NULL, "QHE\r", "", 9, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_eco_volt_range }, + { "input.transfer.high.max", 0, NULL, "QHE\r", "", 9, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_eco_volt_range }, /* Set ECO Mode voltage limits * > [HEHnnn\r] > [HELnnn\r] n = 0..9 @@ -1328,8 +1328,8 @@ static item_t voltronic_qx2nut[] = { * 0 0 */ - { "input.transfer.high", 0, voltronic_r_eco_volt_max, "HEH%03.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_process_setvar }, - { "input.transfer.low", 0, voltronic_r_eco_volt_min, "HEL%03.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_process_setvar }, + { "input.transfer.high", 0, voltronic_r_eco_volt_max, "HEH%03.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_process_setvar }, + { "input.transfer.low", 0, voltronic_r_eco_volt_min, "HEL%03.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_process_setvar }, /* Query UPS for ECO Mode frequency limits * > [QFRE\r] @@ -1338,8 +1338,8 @@ static item_t voltronic_qx2nut[] = { * 0 1 */ - { "input.frequency.high", ST_FLAG_RW, voltronic_r_eco_freq_max, "QFRE\r", "", 11, '(', "", 1, 4, "%.1f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_eco_freq }, - { "input.frequency.low", ST_FLAG_RW, voltronic_r_eco_freq_min, "QFRE\r", "", 11, '(', "", 6, 9, "%.1f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_eco_freq }, + { "input.frequency.high", ST_FLAG_RW, voltronic_r_eco_freq_max, "QFRE\r", "", 11, '(', "", 1, 4, "%.1f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_eco_freq }, + { "input.frequency.low", ST_FLAG_RW, voltronic_r_eco_freq_min, "QFRE\r", "", 11, '(', "", 6, 9, "%.1f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_eco_freq }, /* Set ECO Mode frequency limits * > [FREHnn.n\r] > [FRELnn.n\r] n = 0..9 @@ -1348,8 +1348,8 @@ static item_t voltronic_qx2nut[] = { * 0 0 */ - { "input.frequency.high", 0, voltronic_r_eco_freq_max, "FREH%04.1f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_process_setvar }, - { "input.frequency.low", 0, voltronic_r_eco_freq_min, "FREL%04.1f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_process_setvar }, + { "input.frequency.high", 0, voltronic_r_eco_freq_max, "FREH%04.1f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_process_setvar }, + { "input.frequency.low", 0, voltronic_r_eco_freq_min, "FREL%04.1f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_process_setvar }, /* Query UPS for Bypass Mode voltage limits * > [QBYV\r] @@ -1358,8 +1358,8 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "max_bypass_volt", ST_FLAG_RW, voltronic_r_bypass_volt_max, "QBYV\r", "", 9, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_bypass }, - { "min_bypass_volt", ST_FLAG_RW, voltronic_r_bypass_volt_min, "QBYV\r", "", 9, '(', "", 5, 7, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_bypass }, + { "max_bypass_volt", ST_FLAG_RW, voltronic_r_bypass_volt_max, "QBYV\r", "", 9, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_bypass }, + { "min_bypass_volt", ST_FLAG_RW, voltronic_r_bypass_volt_min, "QBYV\r", "", 9, '(', "", 5, 7, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_bypass }, /* Set Bypass Mode voltage limits * > [PHVnnn\r] > [PLVnnn\r] n = 0..9 @@ -1368,8 +1368,8 @@ static item_t voltronic_qx2nut[] = { * 0 0 */ - { "max_bypass_volt", 0, voltronic_r_bypass_volt_max, "PHV%03.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_process_setvar }, - { "min_bypass_volt", 0, voltronic_r_bypass_volt_min, "PLV%03.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_process_setvar }, + { "max_bypass_volt", 0, voltronic_r_bypass_volt_max, "PHV%03.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_process_setvar }, + { "min_bypass_volt", 0, voltronic_r_bypass_volt_min, "PLV%03.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_process_setvar }, /* Query UPS for Bypass Mode frequency limits * > [QBYF\r] @@ -1378,8 +1378,8 @@ static item_t voltronic_qx2nut[] = { * 0 1 */ - { "max_bypass_freq", ST_FLAG_RW, voltronic_r_bypass_freq_max, "QBYF\r", "", 11, '(', "", 1, 4, "%.1f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_bypass }, - { "min_bypass_freq", ST_FLAG_RW, voltronic_r_bypass_freq_min, "QBYF\r", "", 11, '(', "", 6, 9, "%.1f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_bypass }, + { "max_bypass_freq", ST_FLAG_RW, voltronic_r_bypass_freq_max, "QBYF\r", "", 11, '(', "", 1, 4, "%.1f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_bypass }, + { "min_bypass_freq", ST_FLAG_RW, voltronic_r_bypass_freq_min, "QBYF\r", "", 11, '(', "", 6, 9, "%.1f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_bypass }, /* Set Bypass Mode frequency limits * > [PGFnn.n\r] > [PSFnn.n\r] n = 0..9 @@ -1388,8 +1388,8 @@ static item_t voltronic_qx2nut[] = { * 0 0 */ - { "max_bypass_freq", 0, voltronic_r_bypass_freq_max, "PGF%04.1f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_process_setvar }, - { "min_bypass_freq", 0, voltronic_r_bypass_freq_min, "PSF%04.1f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_process_setvar }, + { "max_bypass_freq", 0, voltronic_r_bypass_freq_max, "PGF%04.1f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_process_setvar }, + { "min_bypass_freq", 0, voltronic_r_bypass_freq_min, "PSF%04.1f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_process_setvar }, /* Set number of batteries that make a pack to n (integer, 1-9). NOTE: changing the number of batteries will change the UPS's estimation on battery charge/runtime * > [BATNn\r] @@ -1398,7 +1398,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "battery_number", 0, voltronic_r_batt_numb, "BATN%1.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT, voltronic_process_setvar }, + { "battery_number", 0, voltronic_r_batt_numb, "BATN%1.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT, NULL, voltronic_process_setvar }, /* Set number of battery packs in parallel to n (integer, 01-99). NOTE: changing the number of battery packs will change the UPS's estimation on battery charge/runtime * > [BATGNn\r] @@ -1407,7 +1407,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "battery.packs", 0, voltronic_r_batt_packs, "BATGN%02.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE, voltronic_process_setvar }, + { "battery.packs", 0, voltronic_r_batt_packs, "BATGN%02.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, voltronic_process_setvar }, /* Query UPS for battery type (Only P31) * > [QBT\r] @@ -1416,7 +1416,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "battery.type", ST_FLAG_RW, voltronic_e_batt_type, "QBT\r", "", 4, '(', "", 1, 2, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM | QX_FLAG_SKIP, voltronic_p31b }, + { "battery.type", ST_FLAG_RW, voltronic_e_batt_type, "QBT\r", "", 4, '(', "", 1, 2, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM | QX_FLAG_SKIP, NULL, voltronic_p31b }, /* Set battery type (Only P31) * > [PBTnn\r] nn = 00/01/02 @@ -1425,7 +1425,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "battery.type", 0, voltronic_e_batt_type, "PBT%02.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, voltronic_p31b_set }, + { "battery.type", 0, voltronic_e_batt_type, "PBT%02.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, NULL, voltronic_p31b_set }, /* Query UPS for device grid working range (Only P31) * > [QGR\r] @@ -1434,7 +1434,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "work_range_type", ST_FLAG_RW, voltronic_e_work_range, "QGR\r", "", 4, '(', "", 1, 2, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_p31g }, + { "work_range_type", ST_FLAG_RW, voltronic_e_work_range, "QGR\r", "", 4, '(', "", 1, 2, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_p31g }, /* Set device grid working range type (Only P31) * > [PBTnn\r] nn = 00/01 @@ -1443,7 +1443,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "work_range_type", 0, voltronic_e_work_range, "PGR%02.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_p31g_set }, + { "work_range_type", 0, voltronic_e_work_range, "PGR%02.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_p31g_set }, /* Query UPS for battery low voltage * > [RE0\r] @@ -1452,7 +1452,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "battery.voltage.low", ST_FLAG_RW, voltronic_r_batt_low, "RE0\r", "", 3, '#', "", 1, 2, "%.1f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE, NULL }, + { "battery.voltage.low", ST_FLAG_RW, voltronic_r_batt_low, "RE0\r", "", 3, '#', "", 1, 2, "%.1f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE, NULL, NULL }, /* Set voltage for battery low to n (integer, 20..24/20..28). NOTE: changing the battery low voltage will change the UPS's estimation on battery charge/runtime * > [W0En\r] @@ -1461,7 +1461,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "battery.voltage.low", 0, voltronic_r_batt_low, "W0E%02.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE, voltronic_process_setvar }, + { "battery.voltage.low", 0, voltronic_r_batt_low, "W0E%02.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, voltronic_process_setvar }, /* Query UPS for Phase Angle * > [QPD\r] @@ -1470,8 +1470,8 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "input_phase_angle", 0, NULL, "QPD\r", "", 9, '(', "", 1, 3, "%03d", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_phase }, - { "output_phase_angle", ST_FLAG_RW, voltronic_e_phase, "QPD\r", "", 9, '(', "", 5, 7, "%03d", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM | QX_FLAG_NONUT, voltronic_phase }, + { "input_phase_angle", 0, NULL, "QPD\r", "", 9, '(', "", 1, 3, "%03d", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_phase }, + { "output_phase_angle", ST_FLAG_RW, voltronic_e_phase, "QPD\r", "", 9, '(', "", 5, 7, "%03d", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM | QX_FLAG_NONUT, NULL, voltronic_phase }, /* Set output phase angle * > [PPDn\r] n = (000, 120, 180 or 240) @@ -1480,7 +1480,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "output_phase_angle", 0, voltronic_e_phase, "PPD%03.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_phase_set }, + { "output_phase_angle", 0, voltronic_e_phase, "PPD%03.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_phase_set }, /* Query UPS for master/slave for a system of UPSes in parallel * > [QPAR\r] @@ -1489,7 +1489,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "voltronic_parallel", 0, NULL, "QPAR\r", "", 5, '(', "", 1, 3, "%s", QX_FLAG_STATIC | QX_FLAG_NONUT, voltronic_parallel }, + { "voltronic_parallel", 0, NULL, "QPAR\r", "", 5, '(', "", 1, 3, "%s", QX_FLAG_STATIC | QX_FLAG_NONUT, NULL, voltronic_parallel }, /* Query UPS for ?? * > [QBDR\r] @@ -1498,167 +1498,167 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "unknown.7", 0, NULL, "QBDR\r", "", 5, '(', "", 1, 0, "%s", QX_FLAG_STATIC | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL }, + { "unknown.7", 0, NULL, "QBDR\r", "", 5, '(', "", 1, 0, "%s", QX_FLAG_STATIC | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, NULL }, /* Instant commands */ - { "load.off", 0, NULL, "SOFF\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "load.on", 0, NULL, "SON\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, + { "load.off", 0, NULL, "SOFF\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.on", 0, NULL, "SON\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, - { "shutdown.return", 0, NULL, "S%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, voltronic_process_command }, - { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, voltronic_process_command }, - { "shutdown.stop", 0, NULL, "CS\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, + { "shutdown.return", 0, NULL, "S%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, voltronic_process_command }, + { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, voltronic_process_command }, + { "shutdown.stop", 0, NULL, "CS\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, - { "test.battery.start", 0, NULL, "T%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, voltronic_process_command }, - { "test.battery.start.deep", 0, NULL, "TL\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start.quick", 0, NULL, "T\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.stop", 0, NULL, "CT\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, + { "test.battery.start", 0, NULL, "T%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, voltronic_process_command }, + { "test.battery.start.deep", 0, NULL, "TL\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.stop", 0, NULL, "CT\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, - { "beeper.toggle", 0, NULL, "BZ%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, voltronic_process_command }, + { "beeper.toggle", 0, NULL, "BZ%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, voltronic_process_command }, /* Enable/disable beeper: unskipped if the UPS can control alarm (capability) */ - { "beeper.enable", 0, NULL, "PEA\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, - { "beeper.disable", 0, NULL, "PDA\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, + { "beeper.enable", 0, NULL, "PEA\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, + { "beeper.disable", 0, NULL, "PDA\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, /* Outlet control: unskipped if the outlets are manageable */ - { "outlet.1.load.off", 0, NULL, "SKOFF1\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, - { "outlet.1.load.on", 0, NULL, "SKON1\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, - { "outlet.2.load.off", 0, NULL, "SKOFF2\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, - { "outlet.2.load.on", 0, NULL, "SKON2\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, - { "outlet.3.load.off", 0, NULL, "SKOFF3\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, - { "outlet.3.load.on", 0, NULL, "SKON3\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, - { "outlet.4.load.off", 0, NULL, "SKOFF4\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, - { "outlet.4.load.on", 0, NULL, "SKON4\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, + { "outlet.1.load.off", 0, NULL, "SKOFF1\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, + { "outlet.1.load.on", 0, NULL, "SKON1\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, + { "outlet.2.load.off", 0, NULL, "SKOFF2\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, + { "outlet.2.load.on", 0, NULL, "SKON2\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, + { "outlet.3.load.off", 0, NULL, "SKOFF3\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, + { "outlet.3.load.on", 0, NULL, "SKON3\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, + { "outlet.4.load.off", 0, NULL, "SKOFF4\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, + { "outlet.4.load.on", 0, NULL, "SKON4\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, /* Bypass: unskipped if the UPS is capable of ECO Mode */ - { "bypass.start", 0, NULL, "PEE\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, - { "bypass.stop", 0, NULL, "PDE\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, + { "bypass.start", 0, NULL, "PEE\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, + { "bypass.stop", 0, NULL, "PDE\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, /* Server-side settable vars */ - { "ups.delay.start", ST_FLAG_RW, voltronic_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, voltronic_process_setvar }, - { "ups.delay.shutdown", ST_FLAG_RW, voltronic_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, voltronic_process_setvar }, + { "ups.delay.start", ST_FLAG_RW, voltronic_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, voltronic_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, voltronic_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, voltronic_process_setvar }, /* End of structure. */ - { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL } + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL, NULL } }; /* == Testing table == */ #ifdef TESTING static testing_t voltronic_testing[] = { - { "QGS\r", "(234.9 50.0 229.8 50.0 000.0 00A 369.1 ---.- 026.5 ---.- 018.8 100000000001\r" }, - { "QPI\r", "(PI01\r" }, - { "QRI\r", "(230.0 004 024.0 50.0\r" }, - { "QMF\r", "(#####VOLTRONIC\r" }, - { "I\r", "#------------- ------ VT12046Q \r" }, - { "F\r", "#220.0 000 024.0 50.0\r" }, - { "QMD\r", "(#######OLHVT1K0 ###1000 80 2/2 230 230 02 12.0\r" }, - { "QFS\r", "(14 212.1 50.0 005.6 49.9 006 010.6 343.8 ---.- 026.2 021.8 01101100\r" }, - { "QMOD\r", "(S\r" }, - { "QVFW\r", "(VERFW:00322.02\r" }, - { "QID\r", "(685653211455\r" }, - { "QBV\r", "(026.5 02 01 068 255\r" }, - { "QFLAG\r", "(EpashcjDbroegfl\r" }, - { "QWS\r", "(0000000000000000000000000000000000000000000000000000000001000001\r" }, - { "QHE\r", "(242 218\r" }, - { "QBYV\r", "(264 170\r" }, - { "QBYF\r", "(53.0 47.0\r" }, - { "QSK1\r", "(1\r" }, - { "QSK2\r", "(0\r" }, - { "QSK3\r", "(1\r" }, - { "QSK4\r", "(NAK\r" }, - { "QSKT1\r", "(008\r" }, - { "QSKT2\r", "(012\r" }, - { "QSKT3\r", "(NAK\r" }, - { "QSKT4\r", "(007\r" }, - { "RE0\r", "#20\r" }, - { "W0E24\r", "(ACK\r" }, - { "PF\r", "(ACK\r" }, - { "PEA\r", "(ACK\r" }, - { "PDR\r", "(NAK\r" }, - { "HEH250\r", "(ACK\r" }, - { "HEL210\r", "(ACK\r" }, - { "PHV260\r", "(NAK\r" }, - { "PLV190\r", "(ACK\r" }, - { "PGF51.0\r", "(NAK\r" }, - { "PSF47.5\r", "(ACK\r" }, - { "BATN2\r", "(ACK\r" }, - { "BATGN04\r", "(ACK\r" }, - { "QBT\r", "(01\r" }, - { "PBT02\r", "(ACK\r" }, - { "QGR\r", "(00\r" }, - { "PGR01\r", "(ACK\r" }, - { "PSK1008\r", "(ACK\r" }, - { "PSK3987\r", "(ACK\r" }, - { "PSK2009\r", "(ACK\r" }, - { "PSK4012\r", "(ACK\r" }, - { "Q3PV\r", "(123.4 456.4 789.4 012.4 323.4 223.4\r" }, - { "Q3OV\r", "(253.4 163.4 023.4 143.4 103.4 523.4\r" }, - { "Q3OC\r", "(109 069 023\r" }, - { "Q3LD\r", "(005 033 089\r" }, - { "Q3YV\r", "(303.4 245.4 126.4 222.4 293.4 321.4\r" }, - { "Q3PC\r", "(002 023 051\r" }, - { "SOFF\r", "(NAK\r" }, - { "SON\r", "(ACK\r" }, - { "T\r", "(NAK\r" }, - { "TL\r", "(ACK\r" }, - { "CS\r", "(ACK\r" }, - { "CT\r", "(NAK\r" }, - { "BZOFF\r", "(ACK\r" }, - { "BZON\r", "(ACK\r" }, - { "S.3R0002\r", "(ACK\r" }, - { "S02R0024\r", "(NAK\r" }, - { "S.5\r", "(ACK\r" }, - { "T.3\r", "(ACK\r" }, - { "T02\r", "(NAK\r" }, - { "SKON1\r", "(ACK\r" }, - { "SKOFF1\r", "(NAK\r" }, - { "SKON2\r", "(ACK\r" }, - { "SKOFF2\r", "(ACK\r" }, - { "SKON3\r", "(NAK\r" }, - { "SKOFF3\r", "(ACK\r" }, - { "SKON4\r", "(NAK\r" }, - { "SKOFF4\r", "(NAK\r" }, - { "QPAR\r", "(003\r" }, - { "QPD\r", "(000 240\r" }, - { "PPD120\r", "(ACK\r" }, - { "QLDL\r", "(005 080\r" }, - { "QBDR\r", "(1234\r" }, - { "QFRE\r", "(50.0 00.0\r" }, - { "FREH54.0\r", "(ACK\r" }, - { "FREL47.0\r", "(ACK\r" }, - { "PEP\r", "(ACK\r" }, - { "PDP\r", "(ACK\r" }, - { "PEB\r", "(ACK\r" }, - { "PDB\r", "(ACK\r" }, - { "PER\r", "(NAK\r" }, - { "PDR\r", "(NAK\r" }, - { "PEO\r", "(ACK\r" }, - { "PDO\r", "(ACK\r" }, - { "PEA\r", "(ACK\r" }, - { "PDA\r", "(ACK\r" }, - { "PES\r", "(ACK\r" }, - { "PDS\r", "(ACK\r" }, - { "PEV\r", "(ACK\r" }, - { "PDV\r", "(ACK\r" }, - { "PEE\r", "(ACK\r" }, - { "PDE\r", "(ACK\r" }, - { "PEG\r", "(ACK\r" }, - { "PDG\r", "(NAK\r" }, - { "PED\r", "(ACK\r" }, - { "PDD\r", "(ACK\r" }, - { "PEC\r", "(ACK\r" }, - { "PDC\r", "(NAK\r" }, - { "PEF\r", "(NAK\r" }, - { "PDF\r", "(ACK\r" }, - { "PEJ\r", "(NAK\r" }, - { "PDJ\r", "(ACK\r" }, - { "PEL\r", "(ACK\r" }, - { "PDL\r", "(ACK\r" }, - { "PEN\r", "(ACK\r" }, - { "PDN\r", "(ACK\r" }, - { "PEQ\r", "(ACK\r" }, - { "PDQ\r", "(ACK\r" }, - { "PEW\r", "(NAK\r" }, - { "PDW\r", "(ACK\r" }, + { "QGS\r", "(234.9 50.0 229.8 50.0 000.0 00A 369.1 ---.- 026.5 ---.- 018.8 100000000001\r", -1 }, + { "QPI\r", "(PI01\r", -1 }, + { "QRI\r", "(230.0 004 024.0 50.0\r", -1 }, + { "QMF\r", "(#####VOLTRONIC\r", -1 }, + { "I\r", "#------------- ------ VT12046Q \r", -1 }, + { "F\r", "#220.0 000 024.0 50.0\r", -1 }, + { "QMD\r", "(#######OLHVT1K0 ###1000 80 2/2 230 230 02 12.0\r", -1 }, + { "QFS\r", "(14 212.1 50.0 005.6 49.9 006 010.6 343.8 ---.- 026.2 021.8 01101100\r", -1 }, + { "QMOD\r", "(S\r", -1 }, + { "QVFW\r", "(VERFW:00322.02\r", -1 }, + { "QID\r", "(685653211455\r", -1 }, + { "QBV\r", "(026.5 02 01 068 255\r", -1 }, + { "QFLAG\r", "(EpashcjDbroegfl\r", -1 }, + { "QWS\r", "(0000000000000000000000000000000000000000000000000000000001000001\r", -1 }, + { "QHE\r", "(242 218\r", -1 }, + { "QBYV\r", "(264 170\r", -1 }, + { "QBYF\r", "(53.0 47.0\r", -1 }, + { "QSK1\r", "(1\r", -1 }, + { "QSK2\r", "(0\r", -1 }, + { "QSK3\r", "(1\r", -1 }, + { "QSK4\r", "(NAK\r", -1 }, + { "QSKT1\r", "(008\r", -1 }, + { "QSKT2\r", "(012\r", -1 }, + { "QSKT3\r", "(NAK\r", -1 }, + { "QSKT4\r", "(007\r", -1 }, + { "RE0\r", "#20\r", -1 }, + { "W0E24\r", "(ACK\r", -1 }, + { "PF\r", "(ACK\r", -1 }, + { "PEA\r", "(ACK\r", -1 }, + { "PDR\r", "(NAK\r", -1 }, + { "HEH250\r", "(ACK\r", -1 }, + { "HEL210\r", "(ACK\r", -1 }, + { "PHV260\r", "(NAK\r", -1 }, + { "PLV190\r", "(ACK\r", -1 }, + { "PGF51.0\r", "(NAK\r", -1 }, + { "PSF47.5\r", "(ACK\r", -1 }, + { "BATN2\r", "(ACK\r", -1 }, + { "BATGN04\r", "(ACK\r", -1 }, + { "QBT\r", "(01\r", -1 }, + { "PBT02\r", "(ACK\r", -1 }, + { "QGR\r", "(00\r", -1 }, + { "PGR01\r", "(ACK\r", -1 }, + { "PSK1008\r", "(ACK\r", -1 }, + { "PSK3987\r", "(ACK\r", -1 }, + { "PSK2009\r", "(ACK\r", -1 }, + { "PSK4012\r", "(ACK\r", -1 }, + { "Q3PV\r", "(123.4 456.4 789.4 012.4 323.4 223.4\r", -1 }, + { "Q3OV\r", "(253.4 163.4 023.4 143.4 103.4 523.4\r", -1 }, + { "Q3OC\r", "(109 069 023\r", -1 }, + { "Q3LD\r", "(005 033 089\r", -1 }, + { "Q3YV\r", "(303.4 245.4 126.4 222.4 293.4 321.4\r", -1 }, + { "Q3PC\r", "(002 023 051\r", -1 }, + { "SOFF\r", "(NAK\r", -1 }, + { "SON\r", "(ACK\r", -1 }, + { "T\r", "(NAK\r", -1 }, + { "TL\r", "(ACK\r", -1 }, + { "CS\r", "(ACK\r", -1 }, + { "CT\r", "(NAK\r", -1 }, + { "BZOFF\r", "(ACK\r", -1 }, + { "BZON\r", "(ACK\r", -1 }, + { "S.3R0002\r", "(ACK\r", -1 }, + { "S02R0024\r", "(NAK\r", -1 }, + { "S.5\r", "(ACK\r", -1 }, + { "T.3\r", "(ACK\r", -1 }, + { "T02\r", "(NAK\r", -1 }, + { "SKON1\r", "(ACK\r", -1 }, + { "SKOFF1\r", "(NAK\r", -1 }, + { "SKON2\r", "(ACK\r", -1 }, + { "SKOFF2\r", "(ACK\r", -1 }, + { "SKON3\r", "(NAK\r", -1 }, + { "SKOFF3\r", "(ACK\r", -1 }, + { "SKON4\r", "(NAK\r", -1 }, + { "SKOFF4\r", "(NAK\r", -1 }, + { "QPAR\r", "(003\r", -1 }, + { "QPD\r", "(000 240\r", -1 }, + { "PPD120\r", "(ACK\r", -1 }, + { "QLDL\r", "(005 080\r", -1 }, + { "QBDR\r", "(1234\r", -1 }, + { "QFRE\r", "(50.0 00.0\r", -1 }, + { "FREH54.0\r", "(ACK\r", -1 }, + { "FREL47.0\r", "(ACK\r", -1 }, + { "PEP\r", "(ACK\r", -1 }, + { "PDP\r", "(ACK\r", -1 }, + { "PEB\r", "(ACK\r", -1 }, + { "PDB\r", "(ACK\r", -1 }, + { "PER\r", "(NAK\r", -1 }, + { "PDR\r", "(NAK\r", -1 }, + { "PEO\r", "(ACK\r", -1 }, + { "PDO\r", "(ACK\r", -1 }, + { "PEA\r", "(ACK\r", -1 }, + { "PDA\r", "(ACK\r", -1 }, + { "PES\r", "(ACK\r", -1 }, + { "PDS\r", "(ACK\r", -1 }, + { "PEV\r", "(ACK\r", -1 }, + { "PDV\r", "(ACK\r", -1 }, + { "PEE\r", "(ACK\r", -1 }, + { "PDE\r", "(ACK\r", -1 }, + { "PEG\r", "(ACK\r", -1 }, + { "PDG\r", "(NAK\r", -1 }, + { "PED\r", "(ACK\r", -1 }, + { "PDD\r", "(ACK\r", -1 }, + { "PEC\r", "(ACK\r", -1 }, + { "PDC\r", "(NAK\r", -1 }, + { "PEF\r", "(NAK\r", -1 }, + { "PDF\r", "(ACK\r", -1 }, + { "PEJ\r", "(NAK\r", -1 }, + { "PDJ\r", "(ACK\r", -1 }, + { "PEL\r", "(ACK\r", -1 }, + { "PDL\r", "(ACK\r", -1 }, + { "PEN\r", "(ACK\r", -1 }, + { "PDN\r", "(ACK\r", -1 }, + { "PEQ\r", "(ACK\r", -1 }, + { "PDQ\r", "(ACK\r", -1 }, + { "PEW\r", "(NAK\r", -1 }, + { "PDW\r", "(ACK\r", -1 }, { NULL } }; #endif /* TESTING */ @@ -2524,8 +2524,8 @@ static int voltronic_eco_volt(item_t *item, char *value, size_t valuelen) } - /* For P02/P03/P10/P14/P99 */ - } else if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) { + /* For P02/P03/P10/P13/P14/P99 */ + } else if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) { if (ovn >= 200) { min.lower = ovn - 24; @@ -2794,6 +2794,7 @@ static int voltronic_protocol(item_t *item, char *value, size_t valuelen) case 8: case 9: case 10: + case 13: case 14: case 31: case 99: diff --git a/drivers/nutdrv_qx_zinto.c b/drivers/nutdrv_qx_zinto.c index afc50fc..62f3209 100644 --- a/drivers/nutdrv_qx_zinto.c +++ b/drivers/nutdrv_qx_zinto.c @@ -25,7 +25,7 @@ #include "nutdrv_qx_zinto.h" -#define ZINTO_VERSION "Zinto 0.01" +#define ZINTO_VERSION "Zinto 0.04" /* qx2nut lookup table */ static item_t zinto_qx2nut[] = { @@ -37,23 +37,22 @@ static item_t zinto_qx2nut[] = { * 0 1 2 3 4 */ - { "input.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL }, - { "input.voltage.fault", 0, NULL, "Q1\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL }, - { "output.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL }, - { "ups.load", 0, NULL, "Q1\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL }, - { "input.frequency", 0, NULL, "Q1\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL }, - { "battery.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL }, - { "ups.temperature", 0, NULL, "Q1\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL }, + { "input.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL, NULL }, + { "input.voltage.fault", 0, NULL, "Q1\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL, NULL }, + { "output.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL, NULL }, + { "ups.load", 0, NULL, "Q1\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL, NULL }, + { "input.frequency", 0, NULL, "Q1\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL, NULL }, + { "battery.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL, NULL }, + { "ups.temperature", 0, NULL, "Q1\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL, NULL }, /* Status bits */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Battery Low */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ - { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 41, 41, NULL, 0, blazer_process_status_bits }, /* UPS Failed */ - { "ups.type", 0, NULL, "Q1\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, blazer_process_status_bits }, /* UPS Type */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Test in Progress */ - { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, 0, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.beeper.status", 0, NULL, "Q1\r", "", 47, '(', "", 45, 45, "%s", 0, blazer_process_status_bits }, /* Beeper status */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Battery Low */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 41, 41, NULL, 0, NULL, blazer_process_status_bits }, /* UPS Failed */ + { "ups.type", 0, NULL, "Q1\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, NULL, blazer_process_status_bits }, /* UPS Type */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Test in Progress */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Shutdown Active */ + { "ups.beeper.status", 0, NULL, "Q1\r", "", 47, '(', "", 45, 45, "%s", 0, NULL, blazer_process_status_bits }, /* Beeper status */ /* * > [F\r] @@ -62,10 +61,10 @@ static item_t zinto_qx2nut[] = { * 0 1 2 */ - { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL }, - { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL }, - { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL }, - { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL }, + { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL, NULL }, + { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL, NULL }, /* * > [FW?\r] @@ -74,45 +73,45 @@ static item_t zinto_qx2nut[] = { * 0 1 2 3 */ - { "device.mfr", 0, NULL, "FW?\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "device.model", 0, NULL, "FW?\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "ups.firmware", 0, NULL, "FW?\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, + { "device.mfr", 0, NULL, "FW?\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "device.model", 0, NULL, "FW?\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "ups.firmware", 0, NULL, "FW?\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, /* Instant commands */ - { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, + { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, /* Server-side settable vars */ - { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, - { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, + { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, /* End of structure. */ - { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL } + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL, NULL } }; /* Testing table */ #ifdef TESTING static testing_t zinto_testing[] = { - { "Q1\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r" }, - { "F\r", "#230.0 000 024.0 50.0\r" }, - { "FW?\r", "#NOT_A_LIVE_UPS TESTING TESTING \r" }, - { "Q\r", "" }, - { "S03\r", "" }, - { "C\r", "" }, - { "S02R0005\r", "" }, - { "S.5R0000\r", "" }, - { "T04\r", "" }, - { "TL\r", "" }, - { "T\r", "" }, - { "CT\r", "" }, + { "Q1\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r", -1 }, + { "F\r", "#230.0 000 024.0 50.0\r", -1 }, + { "FW?\r", "#NOT_A_LIVE_UPS TESTING TESTING \r", -1 }, + { "Q\r", "", -1 }, + { "S03\r", "", -1 }, + { "C\r", "", -1 }, + { "S02R0005\r", "", -1 }, + { "S.5R0000\r", "", -1 }, + { "T04\r", "", -1 }, + { "TL\r", "", -1 }, + { "T\r", "", -1 }, + { "CT\r", "", -1 }, { NULL } }; #endif /* TESTING */ @@ -120,9 +119,7 @@ static testing_t zinto_testing[] = { /* Subdriver-specific initups */ static void zinto_initups(void) { - blazer_initups(zinto_qx2nut); - } /* Subdriver interface */ diff --git a/drivers/openups-hid.c b/drivers/openups-hid.c index 69a4a61..bfe386f 100644 --- a/drivers/openups-hid.c +++ b/drivers/openups-hid.c @@ -26,17 +26,53 @@ #include "main.h" /* for getval() */ #include "usb-common.h" -#define OPENUPS_HID_VERSION "openUPS HID 0.1" +#define OPENUPS_HID_VERSION "openUPS HID 0.4" /* Minibox */ #define OPENUPS_VENDORID 0x04d8 +/* constants for converting HID read values to real values */ +static const double vin_scale_d004 = 0.03545 * 100; +static const double vout_scale_d004 = 0.02571 * 100; +/* static const double vbat_scale = 0.00857 * 100; */ +static const double ccharge_scale_d004 = 0.8274 / 10; +static const double cdischarge_scale_d004 = 16.113 / 10; + +static double vin_scale = 1; +static double vout_scale= 1; +static double ccharge_scale = 1; +static double cdischarge_scale = 1; + static char openups_scratch_buf[20]; +static void *get_voltage_multiplier(USBDevice_t *device) +{ + + switch(device->ProductID) { + case 0xd004: + vin_scale = vin_scale_d004; + vout_scale= vout_scale_d004; + ccharge_scale= ccharge_scale_d004; + cdischarge_scale= cdischarge_scale_d004; + break; + case 0xd005: + vin_scale = 0.1; + vout_scale = 0.1; + ccharge_scale = 0.1; /* unverified */ + cdischarge_scale = 0.1; /* unverified */ + break; + } + + upsdebugx(1, "vin_scale = %g; vout_scale = %g\n", vin_scale, vout_scale); + return NULL; +} + + /* USB IDs device table */ -static usb_device_id_t openups_usb_device_table[] = { +static /* const */ usb_device_id_t openups_usb_device_table[] = { /* openUPS Intelligent UPS (minimum required firmware 1.4) */ - {USB_DEVICE(OPENUPS_VENDORID, 0xd004), NULL}, + {USB_DEVICE(OPENUPS_VENDORID, 0xd004), get_voltage_multiplier}, + {USB_DEVICE(OPENUPS_VENDORID, 0xd005), get_voltage_multiplier}, /* Terminating entry */ {-1, -1, NULL} @@ -45,7 +81,7 @@ static usb_device_id_t openups_usb_device_table[] = { /* Thermistor table used for temperature lookups * taken from the windows monitoring application */ -static unsigned int therm_tbl[] = +static const unsigned int therm_tbl[] = { (unsigned int)0x31, (unsigned int)0x40, @@ -83,7 +119,7 @@ static unsigned int therm_tbl[] = (unsigned int)0x3CC }; -static unsigned int therm_tbl_size = sizeof(therm_tbl)/sizeof(therm_tbl[0]); +static const unsigned int therm_tbl_size = sizeof(therm_tbl)/sizeof(therm_tbl[0]); static const char *openups_charging_fun(double value); static const char *openups_discharging_fun(double value); @@ -225,7 +261,7 @@ static const char *openups_temperature_fun(double value) unsigned int d1 = therm_tbl[pos]; unsigned int d2 = therm_tbl[pos + 1]; - float temp = (float) (thermistor - d1) * (t2 - t1) / (d2 - d1) + t1; + double temp = (double) (thermistor - d1) * (t2 - t1) / (d2 - d1) + t1; snprintf(openups_scratch_buf, sizeof(openups_scratch_buf), "%.2f", temp); } } diff --git a/drivers/openups-hid.h b/drivers/openups-hid.h index c87b3d1..ee8e06e 100644 --- a/drivers/openups-hid.h +++ b/drivers/openups-hid.h @@ -26,12 +26,7 @@ #include "usbhid-ups.h" -/* constants for converting HID read values to real values */ -static const float vin_scale = 0.03545 * 100; -static const float vout_scale = 0.02571 * 100; -static const float vbat_scale = 0.00857 * 100; -static const float ccharge_scale = 0.8274 / 10; -static const float cdischarge_scale = 16.113 / 10; +/* Don't put non-extern definitions here - this file gets included by usbhid-ups.c */ extern subdriver_t openups_subdriver; diff --git a/drivers/powercom-hid.c b/drivers/powercom-hid.c index 3f76057..fbe6332 100644 --- a/drivers/powercom-hid.c +++ b/drivers/powercom-hid.c @@ -25,7 +25,7 @@ #include "powercom-hid.h" #include "usb-common.h" -#define POWERCOM_HID_VERSION "PowerCOM HID 0.4" +#define POWERCOM_HID_VERSION "PowerCOM HID 0.5" /* FIXME: experimental flag to be put in upsdrv_info */ /* PowerCOM */ @@ -45,6 +45,7 @@ static usb_device_id_t powercom_usb_device_table[] = { { USB_DEVICE(POWERCOM_VENDORID, 0x00a6), NULL }, /* PowerCOM Vanguard and BNT-xxxAP */ { USB_DEVICE(POWERCOM_VENDORID, 0x0004), NULL }, + { USB_DEVICE(POWERCOM_VENDORID, 0x0001), NULL }, /* Terminating entry */ { -1, -1, NULL } @@ -130,12 +131,160 @@ static info_lkp_t powercom_beeper_info[] = { { 0, NULL, NULL } }; +static const char *powercom_voltage_conversion_fun(double value) +{ + static char buf[20]; + snprintf(buf, sizeof(buf), "%0.0f", value * 4); + return buf; +} + +static info_lkp_t powercom_voltage_conversion[] = { + { 0, NULL, powercom_voltage_conversion_fun } +}; + +static const char *powercom_upsfail_conversion_fun(double value) +{ + if ((long)value & 0x0001) { + return "fanfail"; + } else { + return "!fanfail"; + } +} + +static info_lkp_t powercom_upsfail_conversion[] = { + { 0, NULL, powercom_upsfail_conversion_fun } +}; + +static const char *powercom_replacebatt_conversion_fun(double value) +{ + if ((long)value & 0x0002) { + return "replacebatt"; + } else { + return "!replacebatt"; + } +} + +static info_lkp_t powercom_replacebatt_conversion[] = { + { 0, NULL, powercom_replacebatt_conversion_fun } +}; + +static const char *powercom_test_conversion_fun(double value) +{ + if ((long)value & 0x0004) { + return "cal"; + } else { + return "!cal"; + } +} + +static info_lkp_t powercom_test_conversion[] = { + { 0, NULL, powercom_test_conversion_fun } +}; + +static const char *powercom_shutdownimm_conversion_fun(double value) +{ + if ((long)value & 0x0010) { + return "shutdownimm"; + } else { + return "!shutdownimm"; + } +} + +static info_lkp_t powercom_shutdownimm_conversion[] = { + { 0, NULL, powercom_shutdownimm_conversion_fun } +}; + +static const char *powercom_online_conversion_fun(double value) +{ + if ((long)value & 0x0001) { + return "!online"; + } else { + return "online"; + } +} + +static info_lkp_t powercom_online_conversion[] = { + { 0, NULL, powercom_online_conversion_fun } +}; + +static const char *powercom_lowbatt_conversion_fun(double value) +{ + if ((long)value & 0x0002) { + return "lowbatt"; + } else { + return "!lowbatt"; + } +} + +static info_lkp_t powercom_lowbatt_conversion[] = { + { 0, NULL, powercom_lowbatt_conversion_fun } +}; + +static const char *powercom_trim_conversion_fun(double value) +{ + if (((long)value & 0x0018) == 0x0008) { + return "trim"; + } else { + return "!trim"; + } +} + +static info_lkp_t powercom_trim_conversion[] = { + { 0, NULL, powercom_trim_conversion_fun } +}; + +static const char *powercom_boost_conversion_fun(double value) +{ + if (((long)value & 0x0018) == 0x0018) { + return "boost"; + } else { + return "!boost"; + } +} + +static info_lkp_t powercom_boost_conversion[] = { + { 0, NULL, powercom_boost_conversion_fun } +}; + +static const char *powercom_overload_conversion_fun(double value) +{ + if ((long)value & 0x0020) { + return "overload"; + } else { + return "!overload"; + } +} + +static info_lkp_t powercom_overload_conversion[] = { + { 0, NULL, powercom_overload_conversion_fun } +}; + /* --------------------------------------------------------------- */ /* Vendor-specific usage table */ /* --------------------------------------------------------------- */ /* POWERCOM usage table */ static usage_lkp_t powercom_usage_lkp[] = { + { "PowercomUPS", 0x00020004 }, + { "PowercomBatterySystem", 0x00020010 }, + { "PowercomPowerConverter", 0x00020016 }, + { "PowercomInput", 0x0002001a }, + { "PowercomOutput", 0x0002001c }, + { "PowercomVoltage", 0x00020030 }, + { "PowercomFrequency", 0x00020032 }, + { "PowercomPercentLoad", 0x00020035 }, + { "PowercomTemperature", 0x00020036 }, + { "PowercomDelayBeforeStartup", 0x00020056 }, + { "PowercomDelayBeforeShutdown", 0x00020057 }, + { "PowercomTest", 0x00020058 }, + { "PowercomShutdownRequested", 0x00020068 }, + { "PowercomInternalChargeController", 0x00020081 }, + { "PowercomPrimaryBatterySupport", 0x00020082 }, + { "PowercomDesignCapacity", 0x00020083 }, + { "PowercomSpecificationInfo", 0x00020084 }, + { "PowercomManufacturerDate", 0x00020085 }, + { "PowercomSerialNumber", 0x00020086 }, + { "PowercomManufacturerName", 0x00020087 }, { "POWERCOM1", 0x0084002f }, { "POWERCOM2", 0xff860060 }, { "POWERCOM3", 0xff860080 }, @@ -268,6 +417,56 @@ static hid_info_t powercom_hid2nut[] = { { "shutdown.return", 0, 0, "UPS.PowerSummary.PCMDelayBeforeShutdown", NULL, NULL, HU_TYPE_CMD, powercom_shutdown_info }, { "shutdown.stayoff", 0, 0, "UPS.PowerSummary.PCMDelayBeforeShutdown", NULL, NULL, HU_TYPE_CMD, powercom_stayoff_info }, + { "ups.serial", 0, 0, "PowercomUPS.PowercomSerialNumber", NULL, "%s", 0, stringid_conversion }, + { "ups.mfr", 0, 0, "PowercomUPS.PowercomManufacturerName", NULL, "%s", 0, stringid_conversion }, +/* { "UPS.DesignCapacity", 0, 0, "PowercomUPS.PowercomDesignCapacity", NULL, "%.0f", 0, NULL }, is always 255 */ + { "ups.mfr.date", 0, 0, "PowercomUPS.PowercomManufacturerDate", NULL, "%s", 0, date_conversion }, + { "battery.temperature", 0, 0, "PowercomUPS.PowercomBatterySystem.PowercomTemperature", NULL, "%.0f", 0, NULL }, + { "battery.charge", 0, 0, "PowercomUPS.PowercomBatterySystem.PowercomVoltage", NULL, "%.0f", 0, NULL }, +/* { "UPS.BatterySystem.SpecificationInfo", 0, 0, "PowercomUPS.PowercomBatterySystem.PowercomSpecificationInfo", NULL, "%.0f", 0, NULL }, */ + { "input.frequency", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomInput.PowercomFrequency", NULL, "%.0f", 0, NULL }, + { "input.voltage", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomInput.PowercomVoltage", NULL, "%.0f", 0, powercom_voltage_conversion }, + { "output.voltage", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomVoltage", NULL, "%.0f", 0, powercom_voltage_conversion }, + { "ups.load", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomPercentLoad", NULL, "%.0f", 0, NULL }, + /* flags: 4 - Testing, 8 - Probably mute (it's set on battery with muted beeper and sometimes during ups test) + * bit 0 UPS fault (1 = FAILT) + * bit 1 Battery status (1 = BAD, 0 = NORMAL) + * bit 2 Test mode (1 = TEST, 0 = NORMAL) + * bit 3 X + * bit 4 Pre-SD count mode (1 = ACTIVE) + * bit 5 Schedule count mode (1 = ACTIVE) + * bit 6 Disable NO LOAD SHUTDOWN (1 = ACTIVE) + * bit 7 0 + */ +/* { "UPS.PowerConverter.Output.InternalChargeController", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomInternalChargeController", NULL, "%.0f", 0, NULL }, */ + { "BOOL", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomInternalChargeController", NULL, NULL, HU_FLAG_QUICK_POLL, powercom_upsfail_conversion }, + { "BOOL", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomInternalChargeController", NULL, NULL, HU_FLAG_QUICK_POLL, powercom_replacebatt_conversion }, + { "BOOL", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomInternalChargeController", NULL, NULL, HU_FLAG_QUICK_POLL, powercom_test_conversion }, + { "BOOL", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomInternalChargeController", NULL, NULL, HU_FLAG_QUICK_POLL, powercom_shutdownimm_conversion }, + /* flags: 1 - On battery, 2 - Low Battery, 8 - Trim, 8+16 - Boost + * bit 0 is line fail (1 = INV, 0 = LINE) + * bit 1 is low battery (1 = BAT_ LOW, 0 = NORMAL) + * bit 2 X + * bit 3 AVR status (1 = AVR, 0 = NO_AVR) + * bit 4 AVR mode (1 = BOOST, 0 = BUCK) + * bit 5 Load status (1 = OVER LOAD, 0 = NORMAL) + * bit 6 X + * bit 7 SD mode display + */ +/* { "UPS.PowerConverter.Output.PrimaryBatterySupport", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomPrimaryBatterySupport", NULL, "%.0f", 0, NULL }, */ + { "BOOL", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomPrimaryBatterySupport", NULL, NULL, HU_FLAG_QUICK_POLL, powercom_online_conversion }, + /* Low battery status may not work */ + { "BOOL", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomPrimaryBatterySupport", NULL, NULL, HU_FLAG_QUICK_POLL, powercom_lowbatt_conversion }, + { "BOOL", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomPrimaryBatterySupport", NULL, NULL, HU_FLAG_QUICK_POLL, powercom_trim_conversion }, + { "BOOL", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomPrimaryBatterySupport", NULL, NULL, HU_FLAG_QUICK_POLL, powercom_boost_conversion }, + { "BOOL", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomPrimaryBatterySupport", NULL, NULL, HU_FLAG_QUICK_POLL, powercom_overload_conversion }, + { "output.frequency", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomFrequency", NULL, "%.0f", 0, NULL }, + { "ups.test.result", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomTest", NULL, "%s", 0, test_read_info }, +/* { "UPS.PowerConverter.ShutdownRequested", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomShutdownRequested", NULL, "%.0f", 0, NULL }, */ + { "ups.delay.shutdown", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomDelayBeforeShutdown", NULL, "%.0f", 0, NULL }, + { "ups.delay.start", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomDelayBeforeStartup", NULL, "%.0f", 0, NULL }, + { "load.off", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomDelayBeforeShutdown", NULL, "0", HU_TYPE_CMD, NULL }, + /* end of structure. */ { NULL, 0, 0, NULL, NULL, NULL, 0, NULL } }; @@ -307,6 +506,10 @@ static int powercom_claim(HIDDevice_t *hd) return 0; case SUPPORTED: + if (hd->ProductID == 0x0001) { + interrupt_only = 1; + interrupt_size = 8; + } return 1; case NOT_SUPPORTED: diff --git a/drivers/powercom.c b/drivers/powercom.c index 62d8683..573a234 100644 --- a/drivers/powercom.c +++ b/drivers/powercom.c @@ -64,6 +64,11 @@ * - Added support for OptiUPS VS 575C * This probably also works with others, but I don't have their model numbers. * + * rev 0.15: VSE NN + * - Fixed UPS type assignment for Powercom Imperial USB series manufactured since 2009. + * + * Tested on: IMP-625AP + * */ #include "main.h" @@ -908,17 +913,24 @@ void upsdrv_initups(void) if (!ups_getinfo()) return; /* Give "BNT-other" a chance! */ if (raw_data[MODELNAME]==0x42 || raw_data[MODELNAME]==0x4B || raw_data[MODELNAME]==0x4F){ - model=BNTmodels[raw_data[MODELNUMBER]/16]; - if (!strcmp(types[type].name, "BNT-other")) - types[type].name="BNT-other"; - else if (raw_data[MODELNAME]==0x42) - types[type].name="BNT"; - else if (raw_data[MODELNAME]==0x4B){ - types[type].name="KIN"; - model=KINmodels[raw_data[MODELNUMBER]/16]; - } else if (raw_data[MODELNAME]==0x4F){ - types[type].name="OPTI"; - model=OPTImodels[raw_data[MODELNUMBER]/16]; + /* Give "IMP" a chance also! */ + if (raw_data[UPSVERSION]==0xFF){ + types[type].name="IMP"; + model=IMPmodels[raw_data[MODELNUMBER]/16]; + } + else { + model=BNTmodels[raw_data[MODELNUMBER]/16]; + if (!strcmp(types[type].name, "BNT-other")) + types[type].name="BNT-other"; + else if (raw_data[MODELNAME]==0x42) + types[type].name="BNT"; + else if (raw_data[MODELNAME]==0x4B){ + types[type].name="KIN"; + model=KINmodels[raw_data[MODELNUMBER]/16]; + } else if (raw_data[MODELNAME]==0x4F){ + types[type].name="OPTI"; + model=OPTImodels[raw_data[MODELNUMBER]/16]; + } } } else if (raw_data[UPSVERSION]==0xFF){ diff --git a/drivers/powerware-mib.c b/drivers/powerware-mib.c index 33a5eb2..54b3628 100644 --- a/drivers/powerware-mib.c +++ b/drivers/powerware-mib.c @@ -1,9 +1,10 @@ /* powerware-mib.c - data to monitor Powerware UPS with NUT * (using MIBs described in stdupsv1.mib and Xups.mib) * - * Copyright (C) 2005-2006 - * Olli Savia - * Niels Baggesen + * Copyright (C) + * 2005-2006 Olli Savia + * 2005-2006 Niels Baggesen + * 2015 Arnaud Quette * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,7 +25,7 @@ #include "powerware-mib.h" -#define PW_MIB_VERSION "0.6.2" +#define PW_MIB_VERSION "0.7" /* TODO: more sysOID and MIBs support: * @@ -134,6 +135,7 @@ static info_lkp_t pw_mode_info[] = { { 0, "NULL" } }; +/* Legacy implementation */ static info_lkp_t pw_battery_abm_status[] = { { 1, "CHRG" }, { 2, "DISCHRG" }, @@ -143,13 +145,13 @@ static info_lkp_t pw_battery_abm_status[] = { { 0, "NULL" } } ; -static info_lkp_t pw_batt_info[] = { - { 1, "" }, - { 2, "" }, - { 3, "Battery Floating" }, /* battery floating - can we put that stuff somewhere so one actually access that information? */ - { 4, "Battery Resting" }, /* battery resting - could come handy if support asks what - state the batteries are in... pw_batt_info doesn't get used */ - { 5, "unknown" }, /* unknown */ +static info_lkp_t eaton_abm_status_info[] = { + { 1, "charging" }, + { 2, "discharging" }, + { 3, "floating" }, + { 4, "resting" }, + { 5, "unknown" }, /* Undefined - ABM is not activated */ + { 6, "disabled" }, /* ABM Charger Disabled */ { 0, "NULL" } }; @@ -200,8 +202,8 @@ static snmp_info_t pw_mib[] = { 0, NULL }, { "ups.test.result", ST_FLAG_STRING, SU_INFOSIZE, PW_OID_BATTEST_RES, "", 0, &pw_batt_test_info[0] }, - { "vendor.specific.abmstatus", ST_FLAG_STRING, SU_INFOSIZE, PW_OID_BATT_STATUS, "", - SU_STATUS_BATT, &pw_batt_info[0] }, + { "battery.charger.status", ST_FLAG_STRING, SU_INFOSIZE, PW_OID_BATT_STATUS, "", + SU_STATUS_BATT, &eaton_abm_status_info[0] }, /* Battery page */ { "battery.charge", 0, 1.0, PW_OID_BATT_CHARGE, "", diff --git a/drivers/riello_ser.c b/drivers/riello_ser.c index b76be96..9ee779d 100644 --- a/drivers/riello_ser.c +++ b/drivers/riello_ser.c @@ -37,7 +37,7 @@ #include "riello.h" #define DRIVER_NAME "Riello serial driver" -#define DRIVER_VERSION "0.02" +#define DRIVER_VERSION "0.03" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -188,12 +188,13 @@ int get_ups_nominal() if (!wait_packet && foundbadcrc) { upsdebugx (3, "Get nominal Ko: bad CRC or Checksum"); - return 1; + return -1; } + /* mandatory */ if (!wait_packet && foundnak) { upsdebugx (3, "Get nominal Ko: command not supported"); - return 1; + return -1; } upsdebugx (3, "Get nominal Ok: received byte %u", buf_ptr_length); @@ -227,12 +228,13 @@ int get_ups_status() if (!wait_packet && foundbadcrc) { upsdebugx (3, "Get status Ko: bad CRC or Checksum"); - return 1; + return -1; } + /* mandatory */ if (!wait_packet && foundnak) { upsdebugx (3, "Get status Ko: command not supported"); - return 1; + return -1; } upsdebugx (3, "Get status Ok: received byte %u", buf_ptr_length); @@ -259,12 +261,13 @@ int get_ups_extended() if (!wait_packet && foundbadcrc) { upsdebugx (3, "Get extended Ko: bad CRC or Checksum"); - return 1; + return -1; } + /* optonal */ if (!wait_packet && foundnak) { upsdebugx (3, "Get extended Ko: command not supported"); - return 1; + return 0; } upsdebugx (3, "Get extended Ok: received byte %u", buf_ptr_length); @@ -291,12 +294,13 @@ int get_ups_statuscode() if (!wait_packet && foundbadcrc) { upsdebugx (3, "Get statuscode Ko: bad CRC or Checksum"); - return 1; + return -1; } + /* optional */ if (!wait_packet && foundnak) { upsdebugx (3, "Get statuscode Ko: command not supported"); - return 1; + return 0; } upsdebugx (3, "Get statuscode Ok: received byte %u", buf_ptr_length); @@ -333,12 +337,13 @@ int get_ups_sentr() if (!wait_packet && foundbadcrc) { upsdebugx (3, "Get sentry Ko: bad CRC or Checksum"); - return 1; + return -1; } + /* mandatory */ if (!wait_packet && foundnak) { upsdebugx (3, "Get sentry Ko: command not supported"); - return 1; + return -1; } upsdebugx (3, "Get sentry Ok: received byte %u", buf_ptr_length); @@ -359,68 +364,74 @@ int riello_instcmd(const char *cmdname, const char *extra) delay = 0; riello_init_serial(); - if (typeRielloProtocol == DEV_RIELLOGPSER) + if (typeRielloProtocol == DEV_RIELLOGPSER) length = riello_prepare_cs(bufOut, gpser_error_control, delay); else length = riello_prepare_shutsentr(bufOut, delay); - if (ser_send_buf(upsfd, bufOut, length) == 0) + if (ser_send_buf(upsfd, bufOut, length) == 0) { + upsdebugx (3, "Command load.off communication error"); return STAT_INSTCMD_FAILED; - else { - riello_serialcomm(&bufIn[0], typeRielloProtocol); - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command load.off Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - - if (!wait_packet && foundnak) { - upsdebugx (3, "Command load.off Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; } + + riello_serialcomm(&bufIn[0], typeRielloProtocol); + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command load.off Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command load.off Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command load.off Ok"); + return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "load.off.delay")) { - delay_char = dstate_getinfo("ups.delay.shutdown"); + delay_char = dstate_getinfo("ups.delay.shutdown"); delay = atoi(delay_char); riello_init_serial(); - if (typeRielloProtocol == DEV_RIELLOGPSER) + if (typeRielloProtocol == DEV_RIELLOGPSER) length = riello_prepare_cs(bufOut, gpser_error_control, delay); else length = riello_prepare_shutsentr(bufOut, delay); - if (ser_send_buf(upsfd, bufOut, length) == 0) + if (ser_send_buf(upsfd, bufOut, length) == 0) { + upsdebugx (3, "Command load.off delay communication error"); return STAT_INSTCMD_FAILED; - else { - riello_serialcomm(&bufIn[0], typeRielloProtocol); - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command load.off.delay Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - - if (!wait_packet && foundnak) { - upsdebugx (3, "Command load.off.delay Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; } + + riello_serialcomm(&bufIn[0], typeRielloProtocol); + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command load.off.delay Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command load.off.delay Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command load.off delay Ok"); + return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "load.on")) { delay = 0; riello_init_serial(); - if (typeRielloProtocol == DEV_RIELLOGPSER) + if (typeRielloProtocol == DEV_RIELLOGPSER) length = riello_prepare_cr(bufOut, gpser_error_control, delay); else { length = riello_prepare_setrebsentr(bufOut, delay); - if (ser_send_buf(upsfd, bufOut, length) == 0) + if (ser_send_buf(upsfd, bufOut, length) == 0) { + upsdebugx (3, "Command load.on communication error"); return STAT_INSTCMD_FAILED; + } riello_serialcomm(&bufIn[0], typeRielloProtocol); if (!wait_packet && foundbadcrc) { @@ -436,169 +447,184 @@ int riello_instcmd(const char *cmdname, const char *extra) length = riello_prepare_rebsentr(bufOut, delay); } - if (ser_send_buf(upsfd, bufOut, length) == 0) + if (ser_send_buf(upsfd, bufOut, length) == 0) { + upsdebugx (3, "Command load.on communication error"); return STAT_INSTCMD_FAILED; - else { - riello_serialcomm(&bufIn[0], typeRielloProtocol); - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command load.on Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - - if (!wait_packet && foundnak) { - upsdebugx (3, "Command load.on Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; } + + riello_serialcomm(&bufIn[0], typeRielloProtocol); + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command load.on Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command load.on Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command load.on Ok"); + return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "load.on.delay")) { - delay_char = dstate_getinfo("ups.delay.reboot"); + delay_char = dstate_getinfo("ups.delay.reboot"); delay = atoi(delay_char); riello_init_serial(); - if (typeRielloProtocol == DEV_RIELLOGPSER) + if (typeRielloProtocol == DEV_RIELLOGPSER) length = riello_prepare_cr(bufOut, gpser_error_control, delay); else { - length = riello_prepare_setrebsentr(bufOut, delay); - if (ser_send_buf(upsfd, bufOut, length) == 0) + length = riello_prepare_setrebsentr(bufOut, delay); + + if (ser_send_buf(upsfd, bufOut, length) == 0) { + upsdebugx (3, "Command load.on delay communication error"); return STAT_INSTCMD_FAILED; + } riello_serialcomm(&bufIn[0], typeRielloProtocol); if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command load.on Ko: bad CRC or Checksum"); + upsdebugx (3, "Command load.on delay Ko: bad CRC or Checksum"); return STAT_INSTCMD_FAILED; } if (!wait_packet && foundnak) { - upsdebugx (3, "Command load.on Ko: command not supported"); + upsdebugx (3, "Command load.on delay Ko: command not supported"); return STAT_INSTCMD_FAILED; } length = riello_prepare_rebsentr(bufOut, delay); } - if (ser_send_buf(upsfd, bufOut, length) == 0) + if (ser_send_buf(upsfd, bufOut, length) == 0) { + upsdebugx (3, "Command load.on delay communication error"); return STAT_INSTCMD_FAILED; - else { - riello_serialcomm(&bufIn[0], typeRielloProtocol); - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command load.on.delay Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - - if (!wait_packet && foundnak) { - upsdebugx (3, "Command load.on.delay Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; } + + riello_serialcomm(&bufIn[0], typeRielloProtocol); + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command load.on.delay Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command load.on.delay Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command load.on delay Ok"); + return STAT_INSTCMD_HANDLED; } } else { if (!strcasecmp(cmdname, "shutdown.return")) { - delay_char = dstate_getinfo("ups.delay.shutdown"); + delay_char = dstate_getinfo("ups.delay.shutdown"); delay = atoi(delay_char); riello_init_serial(); - if (typeRielloProtocol == DEV_RIELLOGPSER) + if (typeRielloProtocol == DEV_RIELLOGPSER) length = riello_prepare_cs(bufOut, gpser_error_control, delay); else length = riello_prepare_shutsentr(bufOut, delay); - if (ser_send_buf(upsfd, bufOut, length) == 0) + if (ser_send_buf(upsfd, bufOut, length) == 0) { + upsdebugx (3, "Command shutdown.return communication error"); return STAT_INSTCMD_FAILED; - else { - riello_serialcomm(&bufIn[0], typeRielloProtocol); - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command shutdown.return Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - - if (!wait_packet && foundnak) { - upsdebugx (3, "Command shutdown.return Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; } + + riello_serialcomm(&bufIn[0], typeRielloProtocol); + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command shutdown.return Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command shutdown.return Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command shutdown.return Ok"); + return STAT_INSTCMD_HANDLED; } } if (!strcasecmp(cmdname, "shutdown.stop")) { riello_init_serial(); - if (typeRielloProtocol == DEV_RIELLOGPSER) + if (typeRielloProtocol == DEV_RIELLOGPSER) length = riello_prepare_cd(bufOut, gpser_error_control); else length = riello_prepare_cancelsentr(bufOut); - if (ser_send_buf(upsfd, bufOut, length) == 0) + if (ser_send_buf(upsfd, bufOut, length) == 0) { + upsdebugx (3, "Command shutdown.stop communication error"); return STAT_INSTCMD_FAILED; - else { - riello_serialcomm(&bufIn[0], typeRielloProtocol); - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command shutdown.stop Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - - if (!wait_packet && foundnak) { - upsdebugx (3, "Command shutdown.stop Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; } + + riello_serialcomm(&bufIn[0], typeRielloProtocol); + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command shutdown.stop Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command shutdown.stop Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command shutdown.stop Ok"); + return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "test.panel.start")) { riello_init_serial(); length = riello_prepare_tp(bufOut, gpser_error_control); - if (ser_send_buf(upsfd, bufOut, length) == 0) + + if (ser_send_buf(upsfd, bufOut, length) == 0) { + upsdebugx (3, "Command test.panel.start communication error"); return STAT_INSTCMD_FAILED; - else { - riello_serialcomm(&bufIn[0], DEV_RIELLOGPSER); - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command panel.start Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - - if (!wait_packet && foundnak) { - upsdebugx (3, "Command panel.start Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; } + + riello_serialcomm(&bufIn[0], DEV_RIELLOGPSER); + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command test.panel.start Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command test.panel.start Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command test.panel.start Ok"); + return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "test.battery.start")) { riello_init_serial(); - - if (typeRielloProtocol == DEV_RIELLOGPSER) + if (typeRielloProtocol == DEV_RIELLOGPSER) length = riello_prepare_tb(bufOut, gpser_error_control); else length = riello_prepare_tbsentr(bufOut); - if (ser_send_buf(upsfd, bufOut, length) == 0) + if (ser_send_buf(upsfd, bufOut, length) == 0) { + upsdebugx (3, "Command test.battery.start communication error"); return STAT_INSTCMD_FAILED; - else { - riello_serialcomm(&bufIn[0], typeRielloProtocol); - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command battery.start Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - - if (!wait_packet && foundnak) { - upsdebugx (3, "Command battery.start Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; } + + riello_serialcomm(&bufIn[0], typeRielloProtocol); + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command battery.start Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command battery.start Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command test.battery.start Ok"); + return STAT_INSTCMD_HANDLED; } upslogx(LOG_NOTICE, "instcmd: unknown command [%s]", cmdname); @@ -737,37 +763,40 @@ void upsdrv_updateinfo(void) { uint8_t getextendedOK; static int countlost = 0; + int stat; - if (countlost < COUNTLOST) + upsdebugx(1, "countlost %d",countlost); + + if (countlost > 0){ upsdebugx(1, "Communication with UPS is lost: status read failed!"); - else if (countlost == COUNTLOST) - upslogx(LOG_WARNING, "Communication with UPS is lost: status read failed!"); - else - dstate_datastale(); - - if (typeRielloProtocol == DEV_RIELLOGPSER) { - if (get_ups_status() != 0) { - if (countlost <= COUNTLOST) - countlost++; - return; - } + if (countlost == COUNTLOST) { + dstate_datastale(); + upslogx(LOG_WARNING, "Communication with UPS is lost: status read failed!"); + } + } + + if (typeRielloProtocol == DEV_RIELLOGPSER) + stat = get_ups_status(); + else + stat = get_ups_sentr(); + + if (stat < 0) { + if (countlost < COUNTLOST) + countlost++; + return; + } + + if (typeRielloProtocol == DEV_RIELLOGPSER) { if (get_ups_extended() == 0) getextendedOK = 1; else getextendedOK = 0; } - else { - if (get_ups_sentr() != 0) { - if (countlost <= COUNTLOST) - countlost++; - return; - } - else - getextendedOK = 1; - } + else + getextendedOK = 1; - if (countlost > COUNTLOST) + if (countlost == COUNTLOST) upslogx(LOG_NOTICE, "Communication with UPS is re-established!"); dstate_setinfo("input.frequency", "%.2f", DevData.Finp/10.0); diff --git a/drivers/riello_usb.c b/drivers/riello_usb.c index 89909da..34b319a 100644 --- a/drivers/riello_usb.c +++ b/drivers/riello_usb.c @@ -33,7 +33,7 @@ #include "riello.h" #define DRIVER_NAME "Riello USB driver" -#define DRIVER_VERSION "0.02" +#define DRIVER_VERSION "0.03" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -105,14 +105,14 @@ static int cypress_setfeatures() return ret; } -uint8_t Send_USB_Packet(uint8_t *send_str, uint16_t numbytes) +int Send_USB_Packet(uint8_t *send_str, uint16_t numbytes) { uint8_t USB_buff_pom[10]; int i, err, size, errno; /* is input correct ? */ if ((!send_str) || (!numbytes)) - return 1; + return -1; size = 7; @@ -130,11 +130,8 @@ uint8_t Send_USB_Packet(uint8_t *send_str, uint16_t numbytes) err = usb_bulk_write(udev, 0x2, (char*) USB_buff_pom, 8, 1000); if (err < 0) { - if (err==-13 || errno==19) - upsdebugx(3, "USB device disconnected !"); - else - upsdebugx(3, "USB: Send_USB_Packet: send_usb_packet, err = %08x %s ", err, strerror(errno)); - return 2; + upsdebugx(3, "USB: Send_USB_Packet: send_usb_packet, err = %d %s ", err, strerror(errno)); + return err; } ussleep(USB_WRITE_DELAY); } @@ -163,18 +160,15 @@ uint8_t Send_USB_Packet(uint8_t *send_str, uint16_t numbytes) err = usb_bulk_write(udev, 0x2, (char*) USB_buff_pom, 8, 1000); if (err < 0) { - if (err==-13 || errno==19) - upsdebugx(3, "USB device disconnected !"); - else - upsdebugx(3, "USB: Send_USB_Packet: send_usb_packet, err = %08x %s ", err, strerror(errno)); - return 2; + upsdebugx(3, "USB: Send_USB_Packet: send_usb_packet, err = %d %s ", err, strerror(errno)); + return err; } ussleep(USB_WRITE_DELAY); } return (0); } -uint8_t Get_USB_Packet(uint8_t *buffer) +int Get_USB_Packet(uint8_t *buffer) { char inBuf[10]; int err, size, errno, ep; @@ -185,23 +179,12 @@ uint8_t Get_USB_Packet(uint8_t *buffer) ep = 0x81 | USB_ENDPOINT_IN; err = usb_bulk_read(udev, ep, (char*) inBuf, size, 1000); - upsdebugx(3, "read: %02X %02X %02X %02X %02X %02X %02X %02X", inBuf[0], inBuf[1], inBuf[2], inBuf[3], inBuf[4], inBuf[5], inBuf[6], inBuf[7]); - - if (err == 0) { - if (err==-13 || err==-19 || errno==19) - upsdebugx(3, "USB device disconnected !"); - else { - switch (errno) { - case 11: /* resource temp. not available */ - case 16: /* device busy */ - /* ignore it */ - break; - default: - upsdebugx(3, "USB: Get_USB_Packet: send_usb_packet, err = %08x %s ", err, strerror(errno)); - break; - } - } - return (0); + if (err > 0) + upsdebugx(3, "read: %02X %02X %02X %02X %02X %02X %02X %02X", inBuf[0], inBuf[1], inBuf[2], inBuf[3], inBuf[4], inBuf[5], inBuf[6], inBuf[7]); + + if (err < 0){ + upsdebugx(3, "USB: Get_USB_Packet: send_usb_packet, err = %d %s ", err, strerror(errno)); + return err; } /* copy to buffer */ @@ -214,18 +197,18 @@ uint8_t Get_USB_Packet(uint8_t *buffer) static int cypress_command(uint8_t *buffer, uint8_t *buf, uint16_t length, uint16_t buflen) { + int loop = 0; int ret, i = 0; uint8_t USB_buff[BUFFER_SIZE]; /* read to flush buffer */ -/* ret = Get_USB_Packet(buf+i);*/ riello_init_serial(); /* send packet */ ret = Send_USB_Packet(buffer, length); - if (ret > 0) { - upsdebugx(3, "send: %s", ret ? usb_strerror() : "timeout"); + if (ret < 0) { + upsdebugx(3, "Cypress_command send: err %d", ret ); return ret; } @@ -243,7 +226,7 @@ static int cypress_command(uint8_t *buffer, uint8_t *buf, uint16_t length, uint1 * will happen after successfully writing a command to the UPS) */ if (ret < 0) { - upsdebugx(3, "read: %s", ret ? usb_strerror() : "timeout"); + upsdebugx(3, "Cypress_command read: err %d", ret ); return ret; } @@ -251,6 +234,14 @@ static int cypress_command(uint8_t *buffer, uint8_t *buf, uint16_t length, uint1 commbyte = USB_buff[i]; riello_parse_serialport(DEV_RIELLOGPSER, buf, gpser_error_control); } + + loop++; + if (loop>300){ + wait_packet=0; + upsdebugx(1, "wait_packet reset"); + } + + ussleep(10); } upsdebugx(3, "in read: %u", buf_ptr_length); @@ -302,6 +293,30 @@ static USBDeviceMatcher_t device_matcher = { }; +/* + * Callback that is called by usb_device_open() that handles USB device + * settings prior to accepting the devide. At the very least claim the + * device here. Detaching the kernel driver will be handled by the + * caller, don't do this here. Return < 0 on error, 0 or higher on + * success. + */ +static int driver_callback(usb_dev_handle *handle, USBDevice_t *device, unsigned char *rdbuf, int rdlen) +{ + /*if (usb_set_configuration(handle, 1) < 0) { + upslogx(LOG_WARNING, "Can't set USB configuration: %s", usb_strerror()); + return -1; + } */ + + if (usb_claim_interface(handle, 0) < 0) { + upslogx(LOG_WARNING, "Can't claim USB interface: %s", usb_strerror()); + return -1; + } + + /* TODO: HID SET_IDLE to 0 (not necessary?) */ + + return 1; +} + /* * Generic command processing function. Send a command and read a reply. * Returns < 0 on error, 0 on timeout and the number of bytes read on @@ -312,18 +327,23 @@ int riello_command(uint8_t *cmd, uint8_t *buf, uint16_t length, uint16_t buflen) int ret; if (udev == NULL) { - ret = usb->open(&udev, &usbdevice, reopen_matcher, NULL); + ret = usb->open(&udev, &usbdevice, reopen_matcher, &driver_callback); - if (ret < 1) { + upsdebugx (3, "riello_command err udev NULL : %d ", ret); + if (ret < 0) return ret; - } + + upsdrv_initinfo(); //reconekt usb cable } ret = (*subdriver_command)(cmd, buf, length, buflen); if (ret >= 0) { + upsdebugx (3, "riello_command ok: %u", ret); return ret; } + upsdebugx (3, "riello_command err: %d", ret); + switch (ret) { case -EBUSY: /* Device or resource busy */ @@ -354,37 +374,49 @@ int riello_command(uint8_t *cmd, uint8_t *buf, uint16_t length, uint16_t buflen) break; case -ETIMEDOUT: /* Connection timed out */ + upsdebugx (3, "riello_command err: Resource temporarily unavailable"); + + case -EOVERFLOW: /* Value too large for defined data type */ #ifdef EPROTO case -EPROTO: /* Protocol error */ #endif + break; default: break; } + return ret; } int get_ups_nominal() { - uint8_t recv, length; + uint8_t length; + int recv; length = riello_prepare_gn(&bufOut[0], gpser_error_control); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_GN); + if (recv < 0){ + upsdebugx (3, "Get nominal err: read byte: %d", recv); + return recv; + } + if (!wait_packet && foundbadcrc) { upsdebugx (3, "Get nominal Ko: bad CRC or Checksum"); - return 1; + return -1; } + /* mandatory */ if (!wait_packet && foundnak) { upsdebugx (3, "Get nominal Ko: command not supported"); - return 1; + return -1; } - upsdebugx (3, "Get nominal Ok: read byte: %u", recv); + upsdebugx (3, "Get nominal Ok: read byte: %d", recv); riello_parse_gn(&bufIn[0], &DevData); @@ -393,7 +425,8 @@ int get_ups_nominal() int get_ups_status() { - uint8_t recv, numread, length; + uint8_t numread, length; + int recv; length = riello_prepare_rs(&bufOut[0], gpser_error_control); @@ -406,17 +439,23 @@ int get_ups_status() recv = riello_command(&bufOut[0], &bufIn[0], length, numread); + if (recv < 0){ + upsdebugx (3, "Get status err: read byte: %d", recv); + return recv; + } + if (!wait_packet && foundbadcrc) { upsdebugx (3, "Get status Ko: bad CRC or Checksum"); - return 1; + return -1; } + /* mandatory */ if (!wait_packet && foundnak) { upsdebugx (3, "Get status Ko: command not supported"); - return 1; + return -1; } - upsdebugx (3, "Get status Ok: read byte: %u", recv); + upsdebugx (3, "Get status Ok: read byte: %d", recv); riello_parse_rs(&bufIn[0], &DevData, numread); @@ -425,23 +464,30 @@ int get_ups_status() int get_ups_extended() { - uint8_t recv, length; + uint8_t length; + int recv; length = riello_prepare_re(&bufOut[0], gpser_error_control); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_RE); + if (recv < 0){ + upsdebugx (3, "Get extended err: read byte: %d", recv); + return recv; + } + if (!wait_packet && foundbadcrc) { upsdebugx (3, "Get extended Ko: bad CRC or Checksum"); - return 1; + return -1; } + /* optional */ if (!wait_packet && foundnak) { upsdebugx (3, "Get extended Ko: command not supported"); - return 1; + return 0; } - upsdebugx (3, "Get extended Ok: read byte: %u", recv); + upsdebugx (3, "Get extended Ok: read byte: %d", recv); riello_parse_re(&bufIn[0], &DevData); @@ -450,23 +496,30 @@ int get_ups_extended() int get_ups_statuscode() { - uint8_t recv, length; + uint8_t length; + int recv; length = riello_prepare_rc(&bufOut[0], gpser_error_control); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_RC); + if (recv < 0){ + upsdebugx (3, "Get statuscode err: read byte: %d", recv); + return recv; + } + if (!wait_packet && foundbadcrc) { upsdebugx (3, "Get statuscode Ko: bad CRC or Checksum"); - return 1; + return -1; } + /* optional */ if (!wait_packet && foundnak) { upsdebugx (3, "Get statuscode Ko: command not supported"); - return 1; + return 0; } - upsdebugx (3, "Get statuscode Ok: read byte: %u", recv); + upsdebugx (3, "Get statuscode Ok: read byte: %d", recv); riello_parse_rc(&bufIn[0], &DevData); @@ -475,7 +528,8 @@ int get_ups_statuscode() int riello_instcmd(const char *cmdname, const char *extra) { - uint8_t length, recv; + uint8_t length; + int recv; uint16_t delay; const char *delay_char; @@ -483,175 +537,201 @@ int riello_instcmd(const char *cmdname, const char *extra) if (!strcasecmp(cmdname, "load.off")) { delay = 0; + length = riello_prepare_cs(bufOut, gpser_error_control, delay); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_DEF); - if (recv > 0) { - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command load.off Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - if (!wait_packet && foundnak) { - upsdebugx (3, "Command load.off Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; - } - else + if (recv < 0) { + upsdebugx (3, "Command load.off err: read byte: %d", recv); return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command load.off Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command load.off Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command load.off Ok: read byte: %d", recv); + return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "load.off.delay")) { - delay_char = dstate_getinfo("ups.delay.shutdown"); + delay_char = dstate_getinfo("ups.delay.shutdown"); delay = atoi(delay_char); length = riello_prepare_cs(bufOut, gpser_error_control, delay); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_DEF); - if (recv > 0) { - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command load.off.delay Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - if (!wait_packet && foundnak) { - upsdebugx (3, "Command load.off.delay Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; - } - else + if (recv < 0) { + upsdebugx (3, "Command load.off.delay err: read byte: %d", recv); return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command load.off.delay Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command load.off.delay Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command load.off.delay Ok: read byte: %d", recv); + return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "load.on")) { delay = 0; + length = riello_prepare_cr(bufOut, gpser_error_control, delay); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_DEF); - if (recv > 0) { - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command load.on Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - if (!wait_packet && foundnak) { - upsdebugx (3, "Command load.on Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; - } - else + if (recv < 0) { + upsdebugx (3, "Command load.on err: read byte: %d", recv); return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command load.on Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command load.on Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command load.on Ok: read byte: %d", recv); + return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "load.on.delay")) { - delay_char = dstate_getinfo("ups.delay.reboot"); + delay_char = dstate_getinfo("ups.delay.reboot"); delay = atoi(delay_char); length = riello_prepare_cr(bufOut, gpser_error_control, delay); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_DEF); - if (recv > 0) { - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command load.on.delay Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - if (!wait_packet && foundnak) { - upsdebugx (3, "Command load.on.delay Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; - } - else + if (recv < 0) { + upsdebugx (3, "Command load.on.delay err: read byte: %d", recv); return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command load.on.delay Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command load.on.delay Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command load.on.delay Ok: read byte: %d", recv); + return STAT_INSTCMD_HANDLED; } } else { if (!strcasecmp(cmdname, "shutdown.return")) { - delay_char = dstate_getinfo("ups.delay.shutdown"); + delay_char = dstate_getinfo("ups.delay.shutdown"); delay = atoi(delay_char); length = riello_prepare_cs(bufOut, gpser_error_control, delay); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_DEF); - if (recv > 0) { - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command shutdown.return Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - if (!wait_packet && foundnak) { - upsdebugx (3, "Command shutdown.return Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; - } - else + if (recv < 0) { + upsdebugx (3, "Command shutdown.return err: read byte: %d", recv); return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command shutdown.return Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command shutdown.return Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command shutdown.return Ok: read byte: %d", recv); + return STAT_INSTCMD_HANDLED; } } if (!strcasecmp(cmdname, "shutdown.stop")) { length = riello_prepare_cd(bufOut, gpser_error_control); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_DEF); - if (recv > 0) { - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command shutdown.stop Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - if (!wait_packet && foundnak) { - upsdebugx (3, "Command shutdown.stop Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; - } - else + if (recv < 0) { + upsdebugx (3, "Command shutdown.stop err: read byte: %d", recv); return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command shutdown.stop Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command shutdown.stop Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command shutdown.stop Ok: read byte: %d", recv); + return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "test.panel.start")) { length = riello_prepare_tp(bufOut, gpser_error_control); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_DEF); - if (recv > 0) { - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command test.panel.start Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - if (!wait_packet && foundnak) { - upsdebugx (3, "Command test.panel.start Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; - } - else + if (recv < 0) { + upsdebugx (3, "Command test.panel.start err: read byte: %d", recv); return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command test.panel.start Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command test.panel.start Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command test.panel.start Ok: read byte: %d", recv); + return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "test.battery.start")) { length = riello_prepare_tb(bufOut, gpser_error_control); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_DEF); - if (recv > 0) { - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command test.battery.start Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - if (!wait_packet && foundnak) { - upsdebugx (3, "Command test.battery.start Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; - } - else + if (recv < 0) { + upsdebugx (3, "Command test.battery.start err: read byte: %d", recv); return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command test.battery.start Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command test.battery.start Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command test.battery.start Ok: read byte: %d", recv); + return STAT_INSTCMD_HANDLED; } upslogx(LOG_NOTICE, "instcmd: unknown command [%s]", cmdname); @@ -671,6 +751,11 @@ int start_ups_comm() recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_GI); + if (recv < 0) { + upsdebugx (3, "Get identif err: read byte: %d", recv); + return recv; + } + if (!wait_packet && foundbadcrc) { upsdebugx (3, "Get identif Ko: bad CRC or Checksum"); return 1; @@ -681,10 +766,9 @@ int start_ups_comm() return 1; } - upsdebugx (3, "Get identif Ok: read byte: %u", recv); - return 0; + return 0; } void upsdrv_help(void) @@ -755,11 +839,10 @@ void upsdrv_initups(void) fatalx(EXIT_FAILURE, "invalid regular expression: %s", regex_array[ret]); } - /* link the matchers */ regex_matcher->next = &device_matcher; - ret = usb->open(&udev, &usbdevice, regex_matcher, NULL); + ret = usb->open(&udev, &usbdevice, regex_matcher, &driver_callback); if (ret < 0) { fatalx(EXIT_FAILURE, "No supported devices found. Please check your device availability with 'lsusb'\n" @@ -894,16 +977,25 @@ void upsdrv_updateinfo(void) { uint8_t getextendedOK; static int countlost = 0; + int stat; - if (countlost < COUNTLOST) + upsdebugx(1, "countlost %d",countlost); + + if (countlost > 0){ upsdebugx(1, "Communication with UPS is lost: status read failed!"); - else if (countlost == COUNTLOST) - upslogx(LOG_WARNING, "Communication with UPS is lost: status read failed!"); - else - dstate_datastale(); - if (get_ups_status() != 0) { - if (countlost <= COUNTLOST) + if (countlost == COUNTLOST) { + dstate_datastale(); + upslogx(LOG_WARNING, "Communication with UPS is lost: status read failed!"); + } + } + + stat = get_ups_status(); + + upsdebugx(1, "get_ups_status() %d",stat ); + + if (stat < 0) { + if (countlost < COUNTLOST) countlost++; return; } @@ -913,7 +1005,7 @@ void upsdrv_updateinfo(void) else getextendedOK = 0; - if (countlost > COUNTLOST) + if (countlost == COUNTLOST) upslogx(LOG_NOTICE, "Communication with UPS is re-established!"); dstate_setinfo("input.frequency", "%.2f", DevData.Finp/10.0); @@ -963,23 +1055,23 @@ void upsdrv_updateinfo(void) /* LowBatt */ if ((riello_test_bit(&DevData.StatusCode[0], 1)) && (riello_test_bit(&DevData.StatusCode[0], 0))) - status_set("LB"); + status_set("LB"); /* Standby */ if (!riello_test_bit(&DevData.StatusCode[0], 3)) - status_set("OFF"); + status_set("OFF"); /* On Bypass */ if (riello_test_bit(&DevData.StatusCode[1], 3)) - status_set("BYPASS"); + status_set("BYPASS"); /* Overload */ if (riello_test_bit(&DevData.StatusCode[4], 2)) - status_set("OVER"); + status_set("OVER"); /* Buck */ if (riello_test_bit(&DevData.StatusCode[1], 0)) - status_set("TRIM"); + status_set("TRIM"); /* Boost */ if (riello_test_bit(&DevData.StatusCode[1], 1)) @@ -991,7 +1083,7 @@ void upsdrv_updateinfo(void) /* Charging battery */ if (riello_test_bit(&DevData.StatusCode[2], 2)) - status_set("CHRG"); + status_set("CHRG"); status_commit(); @@ -1011,7 +1103,8 @@ void upsdrv_updateinfo(void) poll_interval = 2; - countlost = 0; + countlost = 0; + /* if (get_ups_statuscode() != 0) upsdebugx(2, "Communication is lost"); else { diff --git a/drivers/solis.c b/drivers/solis.c index 78e83e0..380ecc3 100644 --- a/drivers/solis.c +++ b/drivers/solis.c @@ -40,7 +40,7 @@ #include "timehead.h" #define DRIVER_NAME "Microsol Solis UPS driver" -#define DRIVER_VERSION "0.61" +#define DRIVER_VERSION "0.62" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -610,7 +610,7 @@ static void ScanReceivePack( void ) /* Autonomy */ - if( ( Autonomy < 5 ) ) + if( Autonomy < 5 ) LowBatt = true; else LowBatt = false; @@ -618,7 +618,7 @@ static void ScanReceivePack( void ) UpsPowerFactor = 700; /* input 110V or 220v */ - if( ( InputValue == 0 ) ) { + if( InputValue == 0 ) { InDownLim = 75; InUpLim = 150; NomInVolt = 110; @@ -702,7 +702,7 @@ CommReceive(const char *bufptr, int size) int i, CheckSum, i_end; - if( ( size==25 ) ) + if( size==25 ) Waiting = 0; switch( Waiting ) @@ -727,7 +727,8 @@ CommReceive(const char *bufptr, int size) ser_flush_in(upsfd,"",0); /* clean port */ /* correct package */ - if( ( (RecPack[0] & 0xF0) == 0xA0 ) + /* 0xA0 is original solis.c; 0xB0 is for APC-branded Microsol units */ + if( ( ( (RecPack[0] & 0xF0) == 0xA0 ) || (RecPack[0] & 0xF0) == 0xB0) && ( RecPack[ 24 ] == 254 ) && ( RecPack[ 23 ] == CheckSum ) ) { @@ -742,7 +743,11 @@ CommReceive(const char *bufptr, int size) switch( SolisModel ) { - case 10: + case 10: /* Added for APC-Branded Microsol units */ + { + ScanReceivePack(); + break; + } case 11: case 12: case 13: @@ -755,6 +760,7 @@ CommReceive(const char *bufptr, int size) default: { printf( M_UNKN ); + ScanReceivePack(); // Scan anyway. break; } } @@ -884,26 +890,30 @@ static void getbaseinfo(void) switch( SolisModel ) { - case 10: + case 10: /* Added for APC-Microsol units */ + { + Model = "Back-UPS 1200 BR"; + break; + } case 11: case 12: { - strcpy(Model, "Solis 1.0"); + Model = "Solis 1.0"; break; } case 13: { - strcpy(Model, "Solis 1.5"); + Model = "Solis 1.5"; break; } case 14: { - strcpy(Model, "Solis 2.0"); + Model = "Solis 2.0"; break; } case 15: { - strcpy(Model, "Solis 3.0"); + Model = "Solis 3.0"; break; } } diff --git a/drivers/solis.h b/drivers/solis.h index 521d080..980f8d5 100644 --- a/drivers/solis.h +++ b/drivers/solis.h @@ -309,7 +309,7 @@ unsigned char DumpPack[242]; */ /* Identification */ -char Model[12]; +const char *Model; int SolisModel, imodel; int InputValue, Out220; diff --git a/drivers/tripplite_usb.c b/drivers/tripplite_usb.c index e907c12..9b06407 100644 --- a/drivers/tripplite_usb.c +++ b/drivers/tripplite_usb.c @@ -8,7 +8,7 @@ Copyright (C) 1999 Russell Kroll Copyright (C) 2001 Rickard E. (Rik) Faith Copyright (C) 2004 Nicholas J. Kain - Copyright (C) 2005-2008 Charles Lepple + Copyright (C) 2005-2008, 2014 Charles Lepple This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -125,6 +125,9 @@ * :S -- enables remote reboot/remote power on */ +/* Watchdog for 3005 is 15 - 255 seconds. + */ + #include "main.h" #include "libusb.h" #include @@ -133,7 +136,7 @@ #include "usb-common.h" #define DRIVER_NAME "Tripp Lite OMNIVS / SMARTPRO driver" -#define DRIVER_VERSION "0.20" +#define DRIVER_VERSION "0.29" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -188,9 +191,38 @@ static enum tl_model_t { TRIPP_LITE_OMNIVS, TRIPP_LITE_OMNIVS_2001, TRIPP_LITE_SMARTPRO, - TRIPP_LITE_SMART_0004 + TRIPP_LITE_SMART_0004, + TRIPP_LITE_SMART_3005 } tl_model = TRIPP_LITE_UNKNOWN; +/*! Are the values encoded in ASCII or binary? + * TODO: Add 3004? + */ +static int is_binary_protocol() +{ + switch(tl_model) { + case TRIPP_LITE_SMART_3005: + return 1; + default: + return 0; + } +} + +/*! Is this the "SMART" family of protocols? + * TODO: Add 3004? + */ +static int is_smart_protocol() +{ + switch(tl_model) { + case TRIPP_LITE_SMARTPRO: + case TRIPP_LITE_SMART_0004: + case TRIPP_LITE_SMART_3005: + return 1; + default: + return 0; + } +} + /*!@brief If a character is not printable, return a dot. */ #define toprint(x) (isalnum((unsigned)x) ? (x) : '.') @@ -201,7 +233,7 @@ static enum tl_model_t { #define SEND_WAIT_NSEC (1000*1000*100) #define MAX_RECV_TRIES 10 -#define RECV_WAIT_MSEC 1000 /*! was 100 for OMNIVS; SMARTPRO units need longer */ +#define RECV_WAIT_MSEC 1000 /*!< was 100 for OMNIVS; SMARTPRO units need longer */ #define MAX_RECONNECT_TRIES 10 @@ -307,6 +339,36 @@ static int hex2d(const unsigned char *start, unsigned int len) return strtol((char *)buf, NULL, 16); } +/*!@brief Convert N characters from big-endian binary to decimal + * + * @param start Beginning of string to convert + * @param len Maximum number of characters to consider (max 32) + * + * @a len characters of @a start are shifted into an accumulator. + * + * We assume len < sizeof(int), and that value > 0. + * + * @return the value + */ +static unsigned int bin2d(const unsigned char *start, unsigned int len) +{ + unsigned int value = 0, index = 0; + for(index = 0; index < len; index++) { + value <<= 8; + value |= start[index]; + } + + return value; +} + +static int hex_or_bin2d(const unsigned char *start, unsigned int len) +{ + if(is_binary_protocol()) { + return bin2d(start, len); + } + return hex2d(start, len); +} + /*!@brief Dump message in both hex and ASCII * * @param[in] msg Buffer to dump @@ -349,7 +411,7 @@ enum tl_model_t decode_protocol(unsigned int proto) { switch(proto) { case 0x0004: - upslogx(3, "Using older SMART protocol (%x)", proto); + upslogx(3, "Using older SMART protocol (%04x)", proto); return TRIPP_LITE_SMART_0004; case 0x1001: upslogx(3, "Using OMNIVS protocol (%x)", proto); @@ -360,8 +422,11 @@ enum tl_model_t decode_protocol(unsigned int proto) case 0x3003: upslogx(3, "Using SMARTPRO protocol (%x)", proto); return TRIPP_LITE_SMARTPRO; + case 0x3005: + upslogx(3, "Using binary SMART protocol (%x)", proto); + return TRIPP_LITE_SMART_3005; default: - printf("Unknown protocol (%x)", proto); + printf("Unknown protocol (%04x)", proto); break; } @@ -371,7 +436,15 @@ enum tl_model_t decode_protocol(unsigned int proto) void decode_v(const unsigned char *value) { unsigned char ivn, lb; - int bv = hex2d(value+2, 2); + int bv; + + if(is_binary_protocol()) { + /* 0x00 0x0c -> 12V ? */ + battery_voltage_nominal = (value[2] << 8) | value[3]; + } else { + bv = hex2d(value+2, 2); + battery_voltage_nominal = bv * 6; + } ivn = value[1]; lb = value[4]; @@ -381,6 +454,7 @@ void decode_v(const unsigned char *value) input_voltage_scaled = 100; break; + case 2: /* protocol 3005 */ case '1': input_voltage_nominal = input_voltage_scaled = 120; break; @@ -398,16 +472,19 @@ void decode_v(const unsigned char *value) break; } - battery_voltage_nominal = bv * 6; - if( (lb >= '0') && (lb <= '9') ) { switchable_load_banks = lb - '0'; } else { - if( lb != 'X' ) { - upslogx(2, "Unknown number of switchable load banks: 0x%02x", + if(is_binary_protocol()) { + switchable_load_banks = lb; + } else { + if( lb != 'X' ) { + upslogx(2, "Unknown number of switchable load banks: 0x%02x", (unsigned int)lb); + } } } + upsdebugx(2, "Switchable load banks: %d", switchable_load_banks); } void upsdrv_initinfo(void); @@ -581,6 +658,7 @@ static int soft_shutdown(void) int ret; unsigned char buf[256], cmd_N[]="N\0x", cmd_G[] = "G"; + /* Already binary: */ cmd_N[2] = offdelay; cmd_N[1] = offdelay >> 8; upsdebugx(3, "soft_shutdown(offdelay=%d): N", offdelay); @@ -652,8 +730,22 @@ static int control_outlet(int outlet_id, int state) } else { return 1; } + break; + case TRIPP_LITE_SMART_3005: + snprintf(k_cmd, sizeof(k_cmd)-1, "N%c", 5); + ret = send_cmd((unsigned char *)k_cmd, strlen(k_cmd) + 1, (unsigned char *)buf, sizeof buf); + snprintf(k_cmd, sizeof(k_cmd)-1, "K%c%c", outlet_id, state & 1); + ret = send_cmd((unsigned char *)k_cmd, strlen(k_cmd) + 1, (unsigned char *)buf, sizeof buf); + + if(ret != 8) { + upslogx(LOG_ERR, "Could not set outlet %d to state %d, ret = %d", outlet_id, state, ret); + return 0; + } else { + return 1; + } + break; default: - upslogx(LOG_ERR, "control_outlet unimplemented for this UPS model"); + upslogx(LOG_ERR, "control_outlet unimplemented for protocol %04x", tl_model); } return 0; } @@ -664,7 +756,7 @@ static int instcmd(const char *cmdname, const char *extra) { unsigned char buf[10]; - if(tl_model == TRIPP_LITE_SMARTPRO || tl_model == TRIPP_LITE_SMART_0004) { + if(is_smart_protocol()) { if (!strcasecmp(cmdname, "test.battery.start")) { send_cmd((const unsigned char *)"A", 2, buf, sizeof buf); return STAT_INSTCMD_HANDLED; @@ -964,7 +1056,7 @@ void upsdrv_initinfo(void) dstate_setaux("ups.delay.reboot", 3); #endif - if(tl_model == TRIPP_LITE_SMARTPRO || tl_model == TRIPP_LITE_SMART_0004) { + if(is_smart_protocol()) { dstate_addcmd("test.battery.start"); dstate_addcmd("reset.input.minmax"); } @@ -1002,10 +1094,12 @@ void upsdrv_updateinfo(void) unsigned char b_value[9], d_value[9], l_value[9], s_value[9], m_value[9], t_value[9]; int bp, freq; - double bv; + double bv_12V = 0.0; /*!< battery voltage, relative to a 12V battery */ + double battery_voltage; /*!< the total battery voltage */ + + unsigned int s_value_1; int ret; - unsigned battery_charge; status_init(); @@ -1055,8 +1149,14 @@ void upsdrv_updateinfo(void) /* - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ - if(tl_model == TRIPP_LITE_SMARTPRO || tl_model == TRIPP_LITE_OMNIVS_2001 || tl_model == TRIPP_LITE_SMART_0004) { - switch(s_value[2]) { + if(is_smart_protocol() || tl_model == TRIPP_LITE_OMNIVS_2001) { + + unsigned int s_value_2 = s_value[2]; + + if(is_binary_protocol()) { + s_value_2 += '0'; + } + switch(s_value_2) { case '0': dstate_setinfo("battery.test.status", "Battery OK"); break; @@ -1096,16 +1196,27 @@ void upsdrv_updateinfo(void) } } - /* This may not be right... */ +#if 0 + /* Apparently, this value changes more frequently when the + * battery is discharged, but it does not track the actual + * state-of-charge. See battery.charge calculation below. + */ if(tl_model == TRIPP_LITE_SMARTPRO) { + unsigned battery_charge; battery_charge = (unsigned)(s_value[5]); dstate_setinfo("battery.charge", "%u", battery_charge); } +#endif } /* - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ - switch(s_value[1]) { + s_value_1 = s_value[1]; + if(is_binary_protocol()) { + s_value_1 += '0'; + } + + switch(s_value_1) { case '0': status_set("LB"); break; @@ -1134,28 +1245,18 @@ void upsdrv_updateinfo(void) return; } - dstate_setinfo("input.voltage", "%.2f", hex2d(b_value+1, 4)/30.0); + dstate_setinfo("input.voltage", "%.2f", hex2d(b_value+1, 4)/3600.0*input_voltage_scaled); - bv = hex2d(b_value+5, 2)/16.0; + bv_12V = hex2d(b_value+5, 2)/16.0; - /* dq ~= sqrt(dV) is a reasonable approximation - * Results fit well against the discrete function used in the Tripp Lite - * source, but give a continuous result. */ - if (bv >= V_interval[1]) - bp = 100; - else if (bv <= V_interval[0]) - bp = 10; - else - bp = (int)(100*sqrt((bv - V_interval[0]) - / (V_interval[1] - V_interval[0]))); - - dstate_setinfo("battery.voltage", "%.2f", bv); - dstate_setinfo("battery.charge", "%3d", bp); + /* TODO: use battery_voltage_nominal, even though it is most likely 12V */ + dstate_setinfo("battery.voltage", "%.2f", bv_12V); } /* - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ - if( tl_model == TRIPP_LITE_SMARTPRO || tl_model == TRIPP_LITE_SMART_0004 ) { + if( is_smart_protocol() ) { + ret = send_cmd(d_msg, sizeof(d_msg), d_value, sizeof(d_value)); if(ret <= 0) { dstate_datastale(); @@ -1164,17 +1265,19 @@ void upsdrv_updateinfo(void) } dstate_setinfo("input.voltage", "%d", - hex2d(d_value+1, 2) * input_voltage_scaled / 120); + hex_or_bin2d(d_value+1, 2) * input_voltage_scaled / 120); - bv = hex2d(d_value+3, 2) * battery_voltage_nominal / 120.0 ; + /* TODO: factor out the two constants */ + bv_12V = hex_or_bin2d(d_value+3, 2) / 10.0 ; + battery_voltage = bv_12V * battery_voltage_nominal / 12.0; - dstate_setinfo("battery.voltage", "%.2f", bv); + dstate_setinfo("battery.voltage", "%.2f", battery_voltage); /* - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ ret = send_cmd(m_msg, sizeof(m_msg), m_value, sizeof(m_value)); - if(m_value[5] != 0x0d) { /* we only expect 4 hex digits */ + if(m_value[5] != 0x0d) { /* we only expect 4 hex/binary digits */ dstate_setinfo("ups.debug.M", "%s", hexascdump(m_value+1, 7)); } @@ -1184,8 +1287,8 @@ void upsdrv_updateinfo(void) return; } - dstate_setinfo("input.voltage.minimum", "%3d", hex2d(m_value+1, 2)); - dstate_setinfo("input.voltage.maximum", "%3d", hex2d(m_value+3, 2)); + dstate_setinfo("input.voltage.minimum", "%3d", hex_or_bin2d(m_value+1, 2) * input_voltage_scaled / 120); + dstate_setinfo("input.voltage.maximum", "%3d", hex_or_bin2d(m_value+3, 2) * input_voltage_scaled / 120); /* - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ @@ -1216,8 +1319,30 @@ void upsdrv_updateinfo(void) dstate_setinfo("input.frequency", "%.1f", freq / 10.0); } - /* I'm guessing this is a calibration constant of some sort. */ - dstate_setinfo("ups.temperature", "%.1f", (unsigned)(hex2d(t_value+1, 2)) * 0.3636 - 21); + if( tl_model == TRIPP_LITE_SMART_3005 ) { + dstate_setinfo("ups.temperature", "%d", (unsigned)(hex2d(t_value+1, 1))); + } else { + /* I'm guessing this is a calibration constant of some sort. */ + dstate_setinfo("ups.temperature", "%.1f", (unsigned)(hex2d(t_value+1, 2)) * 0.3636 - 21); + } + } + + /* - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ + + if( tl_model == TRIPP_LITE_OMNIVS || tl_model == TRIPP_LITE_OMNIVS_2001 || + tl_model == TRIPP_LITE_SMARTPRO || tl_model == TRIPP_LITE_SMART_0004 ) { + /* dq ~= sqrt(dV) is a reasonable approximation + * Results fit well against the discrete function used in the Tripp Lite + * source, but give a continuous result. */ + if (bv_12V >= V_interval[1]) + bp = 100; + else if (bv_12V <= V_interval[0]) + bp = 10; + else + bp = (int)(100*sqrt((bv_12V - V_interval[0]) + / (V_interval[1] - V_interval[0]))); + + dstate_setinfo("battery.charge", "%3d", bp); } /* - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ @@ -1232,7 +1357,7 @@ void upsdrv_updateinfo(void) switch(tl_model) { case TRIPP_LITE_OMNIVS: case TRIPP_LITE_OMNIVS_2001: - dstate_setinfo("output.voltage", "%.1f", hex2d(l_value+1, 4)/2.0); + dstate_setinfo("output.voltage", "%.1f", hex2d(l_value+1, 4)/240.0*input_voltage_scaled); break; case TRIPP_LITE_SMARTPRO: dstate_setinfo("ups.load", "%d", hex2d(l_value+1, 2)); @@ -1272,16 +1397,20 @@ void upsdrv_makevartable(void) { char msg[256]; - snprintf(msg, sizeof msg, "Set shutdown delay, in seconds (default=%d).", + snprintf(msg, sizeof msg, "Set shutdown delay, in seconds (default=%d)", DEFAULT_OFFDELAY); addvar(VAR_VALUE, "offdelay", msg); - /* allow -x vendor=X, vendorid=X, product=X, productid=X, serial=X */ - addvar(VAR_VALUE, "vendor", "Regular expression to match UPS Manufacturer string"); - addvar(VAR_VALUE, "product", "Regular expression to match UPS Product string"); - addvar(VAR_VALUE, "serial", "Regular expression to match UPS Serial number"); - addvar(VAR_VALUE, "productid", "Regular expression to match UPS Product numerical ID (4 digits hexadecimal)"); - addvar(VAR_VALUE, "bus", "Regular expression to match USB bus name"); + /* allow -x vendor=X, vendorid=X, product=X, productid=X, serial=X */ + nut_usb_addvars(); + + snprintf(msg, sizeof msg, "Minimum battery voltage, corresponding to 10%% charge (default=%.1f)", + MIN_VOLT); + addvar(VAR_VALUE, "battery_min", msg); + + snprintf(msg, sizeof msg, "Maximum battery voltage, corresponding to 100%% charge (default=%.1f)", + MAX_VOLT); + addvar(VAR_VALUE, "battery_max", msg); #if 0 snprintf(msg, sizeof msg, "Set start delay, in seconds (default=%d).", @@ -1301,6 +1430,7 @@ void upsdrv_makevartable(void) void upsdrv_initups(void) { char *regex_array[6]; + char *value; int r; /* process the UPS selection options */ @@ -1343,8 +1473,24 @@ void upsdrv_initups(void) /* link the two matchers */ reopen_matcher->next = regex_matcher; - if (getval("offdelay")) - offdelay = atoi(getval("offdelay")); + value = getval("offdelay"); + if (value) { + offdelay = atoi(value); + upsdebugx(2, "Setting 'offdelay' to %d", offdelay); + } + + value = getval("battery_min"); + if (value) { + V_interval[0] = atof(value); + upsdebugx(2, "Setting 'battery_min' to %.g", V_interval[0]); + } + + value = getval("battery_max"); + if (value) { + V_interval[1] = atof(value); + upsdebugx(2, "Setting 'battery_max' to %.g", V_interval[1]); + } + #if 0 if (getval("startdelay")) startdelay = atoi(getval("startdelay")); diff --git a/drivers/usb-common.h b/drivers/usb-common.h index ad08172..d7a3ff4 100644 --- a/drivers/usb-common.h +++ b/drivers/usb-common.h @@ -93,4 +93,6 @@ typedef struct { int is_usb_device_supported(usb_device_id_t *usb_device_id_list, USBDevice_t *device); +void nut_usb_addvars(void); + #endif /* NUT_USB_COMMON_H */ diff --git a/drivers/usbhid-ups.c b/drivers/usbhid-ups.c index cdfbad7..c3e480c 100644 --- a/drivers/usbhid-ups.c +++ b/drivers/usbhid-ups.c @@ -27,7 +27,7 @@ */ #define DRIVER_NAME "Generic HID driver" -#define DRIVER_VERSION "0.38" +#define DRIVER_VERSION "0.39" #include "main.h" #include "libhid.h" @@ -737,14 +737,12 @@ void upsdrv_makevartable(void) #ifndef SHUT_MODE /* allow -x vendor=X, vendorid=X, product=X, productid=X, serial=X */ - addvar(VAR_VALUE, "vendor", "Regular expression to match UPS Manufacturer string"); - addvar(VAR_VALUE, "product", "Regular expression to match UPS Product string"); - addvar(VAR_VALUE, "serial", "Regular expression to match UPS Serial number"); - addvar(VAR_VALUE, "vendorid", "Regular expression to match UPS Manufacturer numerical ID (4 digits hexadecimal)"); - addvar(VAR_VALUE, "productid", "Regular expression to match UPS Product numerical ID (4 digits hexadecimal)"); - addvar(VAR_VALUE, "bus", "Regular expression to match USB bus name"); + nut_usb_addvars(); + addvar(VAR_FLAG, "explore", "Diagnostic matching of unsupported UPS"); addvar(VAR_FLAG, "maxreport", "Activate tweak for buggy APC Back-UPS firmware"); + addvar(VAR_FLAG, "interruptonly", "Don't use polling, only use interrupt pipe"); + addvar(VAR_VALUE, "interruptsize", "Number of bytes to read from interrupt pipe"); #else addvar(VAR_VALUE, "notification", "Set notification type, (ignored, only for backward compatibility)"); #endif @@ -792,7 +790,23 @@ void upsdrv_updateinfo(void) /* Get HID notifications on Interrupt pipe first */ if (use_interrupt_pipe == TRUE) { evtCount = HIDGetEvents(udev, event, MAX_EVENT_NUM); - upsdebugx(1, "Got %i HID objects...", (evtCount >= 0) ? evtCount : 0); + switch (evtCount) + { + case -EBUSY: /* Device or resource busy */ + upslog_with_errno(LOG_CRIT, "Got disconnected by another driver"); + case -EPERM: /* Operation not permitted */ + case -ENODEV: /* No such device */ + case -EACCES: /* Permission denied */ + case -EIO: /* I/O error */ + case -ENXIO: /* No such device or address */ + case -ENOENT: /* No such file or directory */ + /* Uh oh, got to reconnect! */ + hd = NULL; + return; + default: + upsdebugx(1, "Got %i HID objects...", (evtCount >= 0) ? evtCount : 0); + break; + } } else { evtCount = 0; upsdebugx(1, "Not using interrupt pipe..."); @@ -812,7 +826,7 @@ void upsdrv_updateinfo(void) } /* Skip Input reports, if we don't use the Feature report */ - item = find_hid_info(FindObject_with_Path(pDesc, &(event[i]->Path), ITEM_FEATURE)); + item = find_hid_info(FindObject_with_Path(pDesc, &(event[i]->Path), interrupt_only ? ITEM_INPUT:ITEM_FEATURE)); if (!item) { upsdebugx(3, "NUT doesn't use this HID object"); continue; @@ -948,6 +962,15 @@ void upsdrv_initups(void) upsdebugx(1, "Detected a UPS: %s/%s", hd->Vendor ? hd->Vendor : "unknown", hd->Product ? hd->Product : "unknown"); + /* Activate Powercom tweaks */ + if (testvar("interruptonly")) { + interrupt_only = 1; + } + val = getval("interruptsize"); + if (val) { + interrupt_size = atoi(val); + } + if (hid_ups_walk(HU_WALKMODE_INIT) == FALSE) { fatalx(EXIT_FAILURE, "Can't initialize data from HID UPS"); } diff --git a/include/Makefile.in b/include/Makefile.in index bd75cae..d1e2f36 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -53,8 +80,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include -DIST_COMMON = $(dist_noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/config.h.in $(dist_noinst_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -83,6 +110,18 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -91,12 +130,31 @@ am__can_run_installinfo = \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(dist_noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -203,12 +261,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -253,6 +314,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -317,8 +379,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then rm -f stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -337,26 +399,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -368,15 +419,11 @@ TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -385,6 +432,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -528,18 +590,18 @@ uninstall-am: .MAKE: all check install install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool ctags dist-hook distclean distclean-generic \ - distclean-hdr distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool cscopelist-am ctags ctags-am dist-hook distclean \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # magic to include Git version information in NUT version string diff --git a/include/common.h b/include/common.h index fb5df62..477774e 100644 --- a/include/common.h +++ b/include/common.h @@ -120,6 +120,8 @@ char *xstrdup(const char *string); char *rtrim(char *in, const char sep); char* ltrim(char *in, const char sep); +char *rtrim_m(char *in, const char *seps); +char* ltrim_m(char *in, const char *seps); int select_read(const int fd, void *buf, const size_t buflen, const long d_sec, const long d_usec); int select_write(const int fd, const void *buf, const size_t buflen, const long d_sec, const long d_usec); diff --git a/include/config.h.in b/include/config.h.in index f255496..dd42362 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -15,6 +15,9 @@ /* Default path for configuration files */ #undef CONFPATH +/* Define processor type */ +#undef CPU_TYPE + /* Default path for data files */ #undef DATADIR @@ -51,6 +54,18 @@ /* Define to 1 if C supports variable-length arrays. */ #undef HAVE_C_VARARRAYS +/* Define to 1 if you have the declaration of `i2c_smbus_read_block_data', and + to 0 if you don't. */ +#undef HAVE_DECL_I2C_SMBUS_READ_BLOCK_DATA + +/* Define to 1 if you have the declaration of `i2c_smbus_read_word_data', and + to 0 if you don't. */ +#undef HAVE_DECL_I2C_SMBUS_READ_WORD_DATA + +/* Define to 1 if you have the declaration of `i2c_smbus_write_word_data', and + to 0 if you don't. */ +#undef HAVE_DECL_I2C_SMBUS_WRITE_WORD_DATA + /* Define to 1 if you have the declaration of `LOG_UPTO', and to 0 if you don't. */ #undef HAVE_DECL_LOG_UPTO @@ -134,7 +149,7 @@ /* Define to 1 if the system has the type `long double'. */ #undef HAVE_LONG_DOUBLE -/* Define to 1 if the system has the type `long long int'. */ +/* Define to 1 if the system has the type 'long long int'. */ #undef HAVE_LONG_LONG_INT /* Define to 1 if you have the header file. */ @@ -239,6 +254,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if the system has the type 'unsigned long long int'. */ +#undef HAVE_UNSIGNED_LONG_LONG_INT + /* Define to 1 if you have the `usb_detach_kernel_driver_np' function. */ #undef HAVE_USB_DETACH_KERNEL_DRIVER_NP @@ -276,9 +294,6 @@ /* Define if getopt.h is needed */ #undef NEED_GETOPT_H -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - /* NUT network protocol version */ #undef NUT_NETVERSION @@ -382,6 +397,9 @@ /* Define to enable Powerman PDU support */ #undef WITH_LIBPOWERMAN +/* Define to enable I2C support */ +#undef WITH_LINUX_I2C + /* Define to enable Mac OS X meta-driver */ #undef WITH_MACOSX diff --git a/install-sh b/install-sh index a9244eb..377bb86 100755 --- a/install-sh +++ b/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-01-19.21; # UTC +scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,7 +35,7 @@ scriptversion=2011-01-19.21; # UTC # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it +# 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written @@ -156,7 +156,7 @@ while test $# -ne 0; do -s) stripcmd=$stripprog;; -t) dst_arg=$2 - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac @@ -190,7 +190,7 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then fi shift # arg dst_arg=$arg - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac @@ -202,7 +202,7 @@ if test $# -eq 0; then echo "$0: no input file specified." >&2 exit 1 fi - # It's OK to call `install-sh -d' without argument. + # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi @@ -240,7 +240,7 @@ fi for src do - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac @@ -354,7 +354,7 @@ do if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. + # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in diff --git a/lib/Makefile.in b/lib/Makefile.in index 0480c02..a0d827c 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -19,23 +18,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -56,9 +83,9 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = lib -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/libnutclient.pc.in $(srcdir)/libnutscan.pc.in \ - $(srcdir)/libupsclient-config.in $(srcdir)/libupsclient.pc.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/libupsclient-config.in $(srcdir)/libupsclient.pc.in \ + $(srcdir)/libnutclient.pc.in $(srcdir)/libnutscan.pc.in README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -117,6 +144,18 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" SCRIPTS = $(bin_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -125,10 +164,12 @@ am__can_run_installinfo = \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(pkgconfig_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -235,12 +276,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -285,6 +329,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -411,11 +456,11 @@ uninstall-pkgconfigDATA: @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) @@ -554,17 +599,17 @@ uninstall-am: uninstall-binSCRIPTS uninstall-pkgconfigDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binSCRIPTS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pkgconfigDATA install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \ - uninstall-pkgconfigDATA + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-binSCRIPTS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgconfigDATA install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am uninstall-binSCRIPTS uninstall-pkgconfigDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/ltmain.sh b/ltmain.sh index b9205ee..bffda54 100644 --- a/ltmain.sh +++ b/ltmain.sh @@ -70,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.2ubuntu1 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.11 # automake: $automake_version # autoconf: $autoconf_version # @@ -80,7 +80,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.2 Debian-2.4.2-1.2ubuntu1" +VERSION="2.4.2 Debian-2.4.2-1.11" TIMESTAMP="" package_revision=1.3337 diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 02b4bbe..d7c043f 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -1312,7 +1312,7 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -1333,7 +1333,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ;; esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1352,7 +1355,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) diff --git a/m4/nut_check_asciidoc.m4 b/m4/nut_check_asciidoc.m4 index 944870e..c629eab 100644 --- a/m4/nut_check_asciidoc.m4 +++ b/m4/nut_check_asciidoc.m4 @@ -35,6 +35,25 @@ if test -z "${nut_have_asciidoc_seen}"; then AC_MSG_RESULT(${DBLATEX_VERSION} found) fi - dnl FIXME check for xsltproc, xmlllint, etc for chunked HTML and man pages + AC_PATH_PROGS([XSLTPROC], [xsltproc]) + if test -n "${XSLTPROC}"; then + AC_MSG_CHECKING([for xsltproc version]) + XSLTPROC_VERSION="`${XSLTPROC} --version 2>/dev/null`" + dnl strip 'xsltproc version ' from version string + XSLTPROC_VERSION="${XSLTPROC_VERSION##* }" + AC_MSG_RESULT(${XSLTPROC_VERSION} found) + fi + + AC_PATH_PROGS([XMLLINT], [xmllint]) + if test -n "${XMLLINT}"; then + AC_MSG_CHECKING([for xmllint version]) + XMLLINT_VERSION="`${XMLLINT} --version 2>/dev/null`" + dnl strip 'xmllint version ' from version string + XMLLINT_VERSION="${XMLLINT_VERSION##* }" + AC_MSG_RESULT(${XMLLINT_VERSION} found) + fi + + AC_PATH_PROGS([SOURCE_HIGHLIGHT], [source-highlight]) + fi ]) diff --git a/missing b/missing index 86a8fc3..db98974 100755 --- a/missing +++ b/missing @@ -1,11 +1,10 @@ #! /bin/sh -# Common stub for a few missing GNU programs while installing. +# Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-01-06.13; # UTC +scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -26,68 +25,40 @@ scriptversion=2012-01-06.13; # UTC # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "Try '$0 --help' for more information" exit 1 fi -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - yacc create \`y.tab.[ch]', if possible, from existing .[ch] + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. Send bug reports to ." exit $? @@ -99,228 +70,141 @@ Send bug reports to ." ;; -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` +# Run the given program, remember its exit status. +"$@"; st=$? -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG=\${$#} - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG=\${$#} - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/scripts/Aix/nut-aix.spec.in b/scripts/Aix/nut-aix.spec.in new file mode 100644 index 0000000..37e4934 --- /dev/null +++ b/scripts/Aix/nut-aix.spec.in @@ -0,0 +1,330 @@ +%define nut_id @RUN_AS_USER@ +%define nut_group @RUN_AS_GROUP@ + +%define _prefix /usr/local/ups +%define _docdir %{_datadir}/doc + +%define confdir %{_prefix}/etc +%define rcdir /etc/rc.d +%define initdir %{rcdir}/init.d +%define cgidir /var/www/nut-cgi-bin +%define piddir /var/run/nut + +Summary: Network UPS Tools +Name: nut +Version: @PACKAGE_VERSION@ +Release: 1 +Group: Applications/System +License: GPLv2+ +Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Url: http://www.networkupstools.org/ +Source: http://www.networkupstools.org/source/@TREE_VERSION@/%{name}-%{version}.tar.gz +Source1: nut.init +#Source2: ups.sysconfig +#Source3: nut-client.tmpfiles + + +# FIXME: adjust according to what is available through RPM on Aix +BuildRequires: libtool +BuildRequires: net-snmp-devel +BuildRequires: openssl-devel +BuildRequires: pkgconfig + +# AIX BUILDERS, PLEASE NOTE: +# If building with xlc version 3.6.X rather than gcc, you must ensure +# you have the following PTF's installed on your system, or +# you will see a runtime error that says: +# "Expected but saw " +# PTFS needed: U462006 U462007 U462023 U462024 U462025 U462026 U462027 +# Refer to http://service.software.ibm.com/support/rs6000, or +# set CC=gcc to force use of the GCC compiler. +# +# %define stdlib lib +# %define liblink ../.. +# %define DEFCC xlc + +%description +Network UPS Tools (NUT) is a client/server monitoring system that allows +computers to share uninterruptible power supply (UPS) and power distribution +unit (PDU) hardware. Clients access the hardware through the server, and are +notified whenever the power status changes. + +%package client +Group: Applications/System +Summary: Network UPS Tools client monitoring utilities +#Requires(post): chkconfig +#Requires(preun): chkconfig +#Requires(pre): shadow-utils + +%description client +This package includes the client utilities that are required to monitor a +ups that the client host has access to, but where the UPS is physically +attached to a different computer on the network. + +%package devel +Group: Development/Libraries +Summary: Development files for NUT Client +Requires: %{name}-client = %{version}-%{release} webserver openssl-devel + +%description devel +This package contains the development header files and libraries +necessary to develop NUT client applications. + +%prep +%setup -q + +%build +/usr/bin/rm configure.in + +%configure \ + --with-all \ + --without-powerman \ + --without-avahi \ + --without-usb \ + --without-ipmi \ + --without-cgi \ + --datadir=%{_datadir}/%{name} \ + --with-user=%{nut_id} \ + --with-group=%{nut_group} \ + --with-statepath=%{piddir} \ + --with-pidpath=%{piddir} \ + --with-altpidpath=%{piddir} \ + --sysconfdir=%{confdir} \ + --with-cgipath=%{cgidir} \ + --with-drvpath=%{_sbindir} \ + --with-pkgconfig-dir=%{_libdir}/pkgconfig \ + --disable-static \ + --libdir=%{_libdir} \ + --program-transform-name=s,^%{_target_platform}-,, \ + LDFLAGS="$LDFLAGS -Wl,-brtl" \ +# --with-libltdl-includes=/opt/freeware/share/libtool/libltdl/libltdl/ \ +# --with-libltdl-libs=/opt/freeware/lib \ +# --with-doc \ asciidoc >= 8.6.3 is required + +# FIXME: remove rpath? +#sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +#sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +make %{?_smp_mflags} + +%install +/usr/bin/rm -rf %{buildroot} + +/usr/bin/mkdir -p %{buildroot}%{_sbindir} \ + %{buildroot}%{piddir} \ + %{buildroot}%{_libdir}/ups \ + %{buildroot}%{initdir} \ + %{buildroot}%{_libexecdir} + +make install DESTDIR=%{buildroot} + +install -m 755 %{SOURCE1} %{buildroot}%{initdir}/ups + +/usr/bin/rm -f %{buildroot}%{_libdir}/*.la + +# Remove ".sample" suffix from the config filenames +#pushd conf; +#make install DESTDIR=%{buildroot} +#for file in %{buildroot}%{confdir}/*.sample +#do +# mv $file %{buildroot}%{confdir}/`basename $file .sample` +#done +#popd + +%pre +/usr/bin/test -L %{_libdir}/ups || \ +/usr/bin/mkdir -p %{_libdir}/ups +/usr/bin/grep -qc %{nut_group} /etc/group || \ +/usr/bin/mkgroup %{nut_group} +/usr/bin/grep -qc %{nut_id} /etc/passwd || \ +/usr/sbin/useradd -c "Network UPS Tools" \ + -g %{nut_group} -d %{_libdir}/ups %{nut_id} +/usr/bin/test -L %{piddir} || \ +/usr/bin/mkdir -p %{piddir} +/usr/bin/chmod 750 %{piddir} +/usr/bin/chown %{nut_id}:%{nut_group} %{piddir} + +%post +/usr/bin/test -L %{rcdir}/rc2.d/Sups || \ +/usr/bin/ln -s %{initdir}/ups %{rcdir}/rc2.d/Sups +/usr/bin/test -L %{rcdir}/rc2.d/Kups || \ +/usr/bin/ln -s %{initdir}/ups %{rcdir}/rc2.d/Kups +exit 0 + +%preun +%{initdir}/ups stop +if [ "$1" = "0" ]; then + /usr/bin/rm -f %{rcdir}/rc2.d/[SK]ups +fi +exit 0 + +%postun +if [ "$1" = "0" ]; then + /usr/bin/grep -qc %{nut_id} /etc/passwd && \ + /usr/sbin/userdel %{nut_id} + /usr/bin/grep -qc %{nut_group}: /etc/group && \ + /usr/sbin/rmgroup %{nut_group} + /usr/bin/test -L %{piddir} && \ + /usr/bin/rm -rf %{piddir} + /usr/bin/test -L %{_libdir}/ups && \ + /usr/bin/rm -rf %{_libdir}/ups +fi +exit 0 + +%pre client +/usr/bin/grep -qc %{nut_group}: /etc/group || \ +/usr/bin/mkgroup %{nut_group} +/usr/bin/grep -qc %{nut_id} /etc/passwd || \ +/usr/sbin/useradd -c "Network UPS Tools" \ + -g %{nut_group} -d %{_libdir}/ups %{nut_id} +/usr/bin/test -L %{piddir} || \ +/usr/bin/mkdir -p %{piddir} +/usr/bin/chmod 750 %{piddir} +/usr/bin/chown %{nut_id}:%{nut_group} %{piddir} + +%post client +/usr/bin/test -L %{rcdir}/rc2.d/Sups || \ +/usr/bin/ln -s %{initdir}/ups %{rcdir}/rc2.d/Sups +/usr/bin/test -L %{rcdir}/rc2.d/Kups || \ +/usr/bin/ln -s %{initdir}/ups %{rcdir}/rc2.d/Kups +#%{initdir}/ups start +exit 0 + +%preun client +%{initdir}/ups stop +remove="no" +if /usr/bin/rpm -q nut >/dev/null 2>&1; then + remove="no" +elif [ "$1" = "0" ]; then + remove="yes" +fi +if [ "$remove" = "yes" ]; then + /usr/bin/rm -f %{rcdir}/rc2.d/[SK]ups + /usr/bin/test -L %{piddir} && \ + /usr/bin/rm -rf %{piddir} +fi +exit 0 + +%postun client +remove="no" +if /usr/bin/rpm -q nut >/dev/null 2>&1; then + remove="no" +elif [ "$1" = "0" ]; then + remove="yes" +fi +if [ "$remove" = "yes" ]; then + /usr/bin/grep -qc %{nut_id} /etc/passwd && \ + /usr/sbin/userdel %{nut_id} + /usr/bin/grep -qc %{nut_group}: /etc/group && \ + /usr/sbin/rmgroup %{nut_group} +#else +# %{initdir}/ups start +fi +exit 0 + +%clean +/usr/bin/rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%attr(755,root,root) %{initdir}/ups +%doc COPYING ChangeLog AUTHORS MAINTAINERS README docs UPGRADING INSTALL NEWS +%config(noreplace) %attr(640,root,%nut_group) %{confdir}/nut.conf.sample +%config(noreplace) %attr(640,root,%nut_group) %{confdir}/ups.conf.sample +%config(noreplace) %attr(640,root,%nut_group) %{confdir}/upsd.conf.sample +%config(noreplace) %attr(640,root,%nut_group) %{confdir}/upsd.users.sample +%dir %attr(750,%nut_id,%nut_group) %{_libdir}/ups +#%ghost %{piddir} +%{_sbindir}/* +%{_bindir}/upslog +%{_bindir}/nutconf +%{_libdir}/libnutscan.so* +%{_libdir}/libupsclient.so* +%{_datadir}/%{name}/cmdvartab +%{_datadir}/%{name}/driver.list +%{_mandir}/man5/nut.conf.5 +%{_mandir}/man5/ups.conf.5 +%{_mandir}/man5/upsd.conf.5 +%{_mandir}/man5/upsd.users.5 +%{_mandir}/man8/apcsmart.8 +%{_mandir}/man8/bcmxcp.8 +#%{_mandir}/man8/bcmxcp_usb.8 +%{_mandir}/man8/belkin.8 +%{_mandir}/man8/bestfcom.8 +%{_mandir}/man8/belkinunv.8 +%{_mandir}/man8/bestfortress.8 +%{_mandir}/man8/bestups.8 +%{_mandir}/man8/bestuferrups.8 +%{_mandir}/man8/blazer.8 +%{_mandir}/man8/clone.8 +%{_mandir}/man8/dummy-ups.8 +%{_mandir}/man8/everups.8 +%{_mandir}/man8/etapro.8 +%{_mandir}/man8/gamatronic.8 +%{_mandir}/man8/genericups.8 +%{_mandir}/man8/isbmex.8 +%{_mandir}/man8/ivtscd.8 +%{_mandir}/man8/liebert.8 +%{_mandir}/man8/liebert-esp2.8 +%{_mandir}/man8/masterguard.8 +%{_mandir}/man8/metasys.8 +%{_mandir}/man8/microdowell.8 +%{_mandir}/man8/mge-utalk.8 +%{_mandir}/man8/mge-shut.8 +%{_mandir}/man8/nutupsdrv.8 +%{_mandir}/man8/oneac.8 +%{_mandir}/man8/optiups.8 +%{_mandir}/man8/powercom.8 +#%{_mandir}/man8/powerman-pdu.8 +%{_mandir}/man8/powerpanel.8 +%{_mandir}/man8/rhino.8 +#%{_mandir}/man8/richcomm_usb.8 +%{_mandir}/man8/safenet.8 +%{_mandir}/man8/snmp-ups.8 +%{_mandir}/man8/solis.8 +%{_mandir}/man8/tripplite.8 +#%{_mandir}/man8/tripplite_usb.8 +%{_mandir}/man8/tripplitesu.8 +%{_mandir}/man8/victronups.8 +%{_mandir}/man8/upscode2.8 +%{_mandir}/man8/upsd.8 +%{_mandir}/man8/upsdrvctl.8 + +%files client +%doc COPYING +%defattr(-,root,root) +%attr(755,root,root) %{initdir}/ups +%dir %{confdir} +%config(noreplace) %attr(640,root,%nut_group) %{confdir}/upsmon.conf.sample +%config(noreplace) %attr(640,root,%nut_group) %{confdir}/upssched.conf.sample +%dir %attr(750,%nut_id,%nut_group) %{_libdir}/ups +#%ghost %{piddir} +%{_bindir}/upsc +%{_bindir}/upscmd +%{_bindir}/upsrw +%{_sbindir}/upsmon +%{_sbindir}/upssched +%{_bindir}/upssched-cmd +%{_libdir}/libupsclient.so* +%{_mandir}/man5/upsmon.conf.5 +%{_mandir}/man5/upssched.conf.5 +%{_mandir}/man8/upsc.8 +%{_mandir}/man8/upscmd.8 +%{_mandir}/man8/upsrw.8 +%{_mandir}/man8/upslog.8 +%{_mandir}/man8/upsmon.8 +%{_mandir}/man8/upssched.8 + +%files devel +%defattr(-,root,root,-) +%{_includedir}/* +%{_mandir}/man3/upscli* +%{_libdir}/libupsclient.so* +%{_libdir}/pkgconfig/libupsclient.pc + +%changelog +* Tue Jul 12 2014 Arnaud Quette - 2.7.2-1.master +- Minor adjustments + +* Tue Jul 12 2011 Arnaud Quette - 2.6.5-1.trunk +- derive from RHEL 2.6.1-2, and adapt for Aix 6.1 diff --git a/scripts/Makefile.in b/scripts/Makefile.in index c260153..fc45fe7 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,23 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -52,7 +79,7 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = scripts -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -81,15 +108,28 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -97,9 +137,29 @@ am__can_run_installinfo = \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -132,6 +192,7 @@ am__relativize = \ A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -238,12 +299,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -288,6 +352,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -378,22 +443,25 @@ clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -408,57 +476,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -474,12 +497,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -491,15 +509,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -508,6 +522,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -668,22 +697,20 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/scripts/Solaris/Makefile.in b/scripts/Solaris/Makefile.in index e968d1f..c49592e 100644 --- a/scripts/Solaris/Makefile.in +++ b/scripts/Solaris/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,23 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -52,9 +79,9 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = scripts/Solaris -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/nut.in $(srcdir)/pkginfo.in $(srcdir)/postinstall.in \ - $(srcdir)/preremove.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/pkginfo.in $(srcdir)/postinstall.in \ + $(srcdir)/preremove.in $(srcdir)/nut.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -83,6 +110,18 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = pkginfo postinstall preremove nut CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -90,10 +129,12 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -200,12 +241,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -250,6 +294,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -319,11 +364,11 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) @@ -459,15 +504,16 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am package: makelocal.sh pkginfo diff --git a/scripts/augeas/Makefile.in b/scripts/augeas/Makefile.in index 2c1d35c..e3271d4 100644 --- a/scripts/augeas/Makefile.in +++ b/scripts/augeas/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,23 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -52,12 +79,12 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = scripts/augeas -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/nuthostsconf.aug.in $(srcdir)/nutnutconf.aug.in \ - $(srcdir)/nutupsconf.aug.in $(srcdir)/nutupsdconf.aug.in \ - $(srcdir)/nutupsdusers.aug.in $(srcdir)/nutupsmonconf.aug.in \ - $(srcdir)/nutupsschedconf.aug.in \ - $(srcdir)/nutupssetconf.aug.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/nutnutconf.aug.in $(srcdir)/nutupsconf.aug.in \ + $(srcdir)/nutupsdconf.aug.in $(srcdir)/nutupsdusers.aug.in \ + $(srcdir)/nutupsmonconf.aug.in \ + $(srcdir)/nutupsschedconf.aug.in $(srcdir)/nuthostsconf.aug.in \ + $(srcdir)/nutupssetconf.aug.in README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -88,6 +115,18 @@ CONFIG_CLEAN_FILES = nutnutconf.aug nutupsconf.aug nutupsdconf.aug \ nutupsdusers.aug nutupsmonconf.aug nutupsschedconf.aug \ nuthostsconf.aug nutupssetconf.aug CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -95,10 +134,12 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -205,12 +246,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -255,6 +299,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -334,11 +379,11 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) @@ -477,16 +522,16 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - dist-hook distclean distclean-generic distclean-libtool \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ + cscopelist-am ctags-am dist-hook distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am + tags-am uninstall uninstall-am # only call the script to generate Augeas ups.conf lens upon "make dist", diff --git a/scripts/augeas/nutupsconf.aug.in b/scripts/augeas/nutupsconf.aug.in index 1182150..70d5f67 100644 --- a/scripts/augeas/nutupsconf.aug.in +++ b/scripts/augeas/nutupsconf.aug.in @@ -60,6 +60,8 @@ let ups_fields = "driver" | "awd" | "batteryPercentage" | "battery_alarm" + | "battery_max" + | "battery_min" | "battery_number" | "battery_open_status_check" | "battext" @@ -86,11 +88,16 @@ let ups_fields = "driver" | "frequency" | "fruid" | "full_update" + | "hb" | "houroff" | "houron" | "idleload" + | "ignoresab" | "input_timeout" + | "interruptonly" + | "interruptsize" | "langid_fix" + | "lb" | "limited_runtime_on_battery" | "linevoltage" | "load.off" @@ -127,6 +134,7 @@ let ups_fields = "driver" | "output_pace" | "output_phase_angle" | "password" + | "pins_shutdown_mode" | "pollfreq" | "pollonly" | "powerup" @@ -166,6 +174,7 @@ let ups_fields = "driver" | "ups.delay.shutdown" | "ups.delay.start" | "upstype" + | "usb_set_altinterface" | "usd" | "use_crlf" | "use_pre_lf" diff --git a/scripts/devd/Makefile.in b/scripts/devd/Makefile.in index 2b564ce..cad7c1f 100644 --- a/scripts/devd/Makefile.in +++ b/scripts/devd/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -54,8 +81,8 @@ host_triplet = @host@ target_triplet = @target@ @WITH_DEVD_TRUE@@WITH_USB_TRUE@am__append_1 = nut-usb.conf subdir = scripts/devd -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/nut-usb.conf.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/nut-usb.conf.in README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -84,6 +111,18 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = nut-usb.conf CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -120,10 +159,12 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(devdconfdir)" DATA = $(devdconf_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -230,12 +271,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -280,6 +324,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -367,11 +412,11 @@ uninstall-devdconfDATA: @list='$(devdconf_DATA)'; test -n "$(devdconfdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(devdconfdir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) @@ -511,16 +556,17 @@ uninstall-am: uninstall-devdconfDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-devdconfDATA install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-devdconfDATA + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-devdconfDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am uninstall-devdconfDATA # we should never remove this one, apart from a distclean-check #MAINTAINERCLEANFILES = nut-usbups.rules.in diff --git a/scripts/devd/nut-usb.conf.in b/scripts/devd/nut-usb.conf.in index 05b6ffa..09418de 100644 --- a/scripts/devd/nut-usb.conf.in +++ b/scripts/devd/nut-usb.conf.in @@ -8,7 +8,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0001"; match "product" "0x0000"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Hewlett Packard @@ -19,7 +19,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x0001"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # T500 - bcmxcp_usb notify 100 { @@ -28,7 +28,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1f01"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # T750 - bcmxcp_usb notify 100 { @@ -37,7 +37,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1f02"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # HP T750 INTL - usbhid-ups notify 100 { @@ -46,7 +46,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1f06"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # HP T1000 INTL - usbhid-ups notify 100 { @@ -55,7 +55,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1f08"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # HP T1500 INTL - usbhid-ups notify 100 { @@ -64,7 +64,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1f09"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # HP R/T 2200 INTL (like SMART2200RMXL2U) - usbhid-ups notify 100 { @@ -73,7 +73,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1f0a"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # HP R1500 G2 and G3 INTL - usbhid-ups notify 100 { @@ -82,7 +82,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1fe0"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # HP T750 G2 - usbhid-ups notify 100 { @@ -91,7 +91,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1fe1"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -100,7 +100,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1fe2"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # HP T1500 G3 - usbhid-ups notify 100 { @@ -109,7 +109,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1fe3"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # R/T3000 - usbhid-ups notify 100 { @@ -118,7 +118,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1fe5"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # R/T3000 - usbhid-ups notify 100 { @@ -127,7 +127,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1fe6"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # various models - usbhid-ups notify 100 { @@ -136,7 +136,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1fe7"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # various models - usbhid-ups notify 100 { @@ -145,7 +145,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1fe8"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Eaton @@ -156,7 +156,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0463"; match "product" "0x0001"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # various models - usbhid-ups notify 100 { @@ -165,7 +165,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0463"; match "product" "0xffff"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Dell @@ -176,7 +176,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x047c"; match "product" "0xffff"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Riello (Cypress Semiconductor Corp.) @@ -187,7 +187,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x04b4"; match "product" "0x5500"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Minibox @@ -198,7 +198,16 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x04d8"; match "product" "0xd004"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; +}; +# openUPS Intelligent UPS (minimum required firmware 1.4) - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x04d8"; + match "product" "0xd005"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Belkin @@ -209,7 +218,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x050d"; match "product" "0x0375"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # F6C550-AVR - usbhid-ups notify 100 { @@ -218,7 +227,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x050d"; match "product" "0x0551"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # F6C1250-TW-RK - usbhid-ups notify 100 { @@ -227,7 +236,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x050d"; match "product" "0x0750"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # F6C1500-TW-RK - usbhid-ups notify 100 { @@ -236,7 +245,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x050d"; match "product" "0x0751"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # F6C900-UNV - usbhid-ups notify 100 { @@ -245,7 +254,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x050d"; match "product" "0x0900"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # F6C100-UNV - usbhid-ups notify 100 { @@ -254,7 +263,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x050d"; match "product" "0x0910"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # F6C120-UNV - usbhid-ups notify 100 { @@ -263,7 +272,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x050d"; match "product" "0x0912"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # F6C800-UNV - usbhid-ups notify 100 { @@ -272,7 +281,16 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x050d"; match "product" "0x0980"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; +}; +# Regulator PRO-USB - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x050d"; + match "product" "0x0f51"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # F6C1100-UNV, F6C1200-UNV - usbhid-ups notify 100 { @@ -281,10 +299,19 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x050d"; match "product" "0x1100"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # APC +# APC AP9584 Serial->USB kit - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x051d"; + match "product" "0x0000"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; +}; # various models - usbhid-ups notify 100 { match "system" "USB"; @@ -292,7 +319,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x051d"; match "product" "0x0002"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # various 5G models - usbhid-ups notify 100 { @@ -301,7 +328,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x051d"; match "product" "0x0003"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Powerware @@ -312,7 +339,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0592"; match "product" "0x0002"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # PW 9140 - usbhid-ups notify 100 { @@ -321,7 +348,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0592"; match "product" "0x0004"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Agiler UPS - blazer_usb notify 100 { @@ -330,7 +357,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x05b8"; match "product" "0x0000"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Belkin F6C1200-UNV - blazer_usb notify 100 { @@ -339,18 +366,18 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0665"; match "product" "0x5161"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Phoenixtec Power Co., Ltd -# Online Yunto YQ450 - blazer_usb +# various models - bcmxcp_usb notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; match "type" "ATTACH"; match "vendor" "0x06da"; match "product" "0x0002"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Mustek Powermust - blazer_usb notify 100 { @@ -359,7 +386,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x06da"; match "product" "0x0003"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Phoenixtec Innova 3/1 T - blazer_usb notify 100 { @@ -368,7 +395,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x06da"; match "product" "0x0004"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Phoenixtec Innova RT - blazer_usb notify 100 { @@ -377,7 +404,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x06da"; match "product" "0x0005"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Phoenixtec Innova T - blazer_usb notify 100 { @@ -386,7 +413,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x06da"; match "product" "0x0201"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Online Zinto A - blazer_usb notify 100 { @@ -395,7 +422,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x06da"; match "product" "0x0601"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # various models - usbhid-ups notify 100 { @@ -404,7 +431,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x06da"; match "product" "0xffff"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # iDowell @@ -415,27 +442,27 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x075d"; match "product" "0x0300"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Cyber Power Systems -# 900AVR/BC900D, CP1200AVR/BC1200D - usbhid-ups +# 900AVR/BC900D - usbhid-ups notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; match "type" "ATTACH"; match "vendor" "0x0764"; match "product" "0x0005"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; -# Dynex DX-800U? - usbhid-ups +# Dynex DX-800U?, CP1200AVR/BC1200D, CP825AVR-G, CP1000AVRLCD, CP1000PFCLCD, CP1500C, CP550HG, etc. - usbhid-ups notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; match "type" "ATTACH"; match "vendor" "0x0764"; match "product" "0x0501"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # OR2200LCDRM2U, OR700LCDRM1U, PR6000LCDRTXL5U - usbhid-ups notify 100 { @@ -444,7 +471,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0764"; match "product" "0x0601"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Sweex 1000VA - richcomm_usb notify 100 { @@ -453,7 +480,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0925"; match "product" "0x1234"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # TrippLite @@ -464,7 +491,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x0001"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite AVR550U - usbhid-ups notify 100 { @@ -473,7 +500,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x1003"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite AVR750U - usbhid-ups notify 100 { @@ -482,7 +509,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x1007"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite ECO550UPS - usbhid-ups notify 100 { @@ -491,7 +518,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x1008"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite ECO550UPS - usbhid-ups notify 100 { @@ -500,7 +527,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x1009"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite ECO550UPS - usbhid-ups notify 100 { @@ -509,7 +536,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x1010"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite OMNI1000LCD - usbhid-ups notify 100 { @@ -518,7 +545,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x2005"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite OMNI900LCD - usbhid-ups notify 100 { @@ -527,7 +554,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x2007"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -536,7 +563,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x2008"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite Smart1000LCD - usbhid-ups notify 100 { @@ -545,7 +572,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x2009"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -554,7 +581,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x2010"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -563,7 +590,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x2011"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -572,7 +599,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x2012"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -581,7 +608,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x2013"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -590,7 +617,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x2014"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -599,7 +626,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x3008"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -608,7 +635,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x3009"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -617,7 +644,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x3010"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -626,7 +653,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x3011"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite smart2200RMXL2U - usbhid-ups notify 100 { @@ -635,7 +662,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x3012"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -644,7 +671,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x3013"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -653,7 +680,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x3014"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -662,7 +689,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x3015"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite Smart1500LCD (newer unit) - usbhid-ups notify 100 { @@ -671,7 +698,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x3016"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite SmartOnline SU1500RTXL2UA (older unit?) - usbhid-ups notify 100 { @@ -680,7 +707,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x4001"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite SmartOnline SU6000RT4U? - usbhid-ups notify 100 { @@ -689,7 +716,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x4002"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite SmartOnline SU1500RTXL2ua - usbhid-ups notify 100 { @@ -698,7 +725,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x4003"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite SmartOnline SU1000XLA - usbhid-ups notify 100 { @@ -707,7 +734,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x4004"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -716,7 +743,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x4005"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -725,7 +752,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x4006"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -734,7 +761,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x4007"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -743,18 +770,27 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x4008"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # PowerCOM # PowerCOM Vanguard and BNT-xxxAP - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x0d9f"; + match "product" "0x0001"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; +}; +# PowerCOM Vanguard and BNT-xxxAP - usbhid-ups notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; match "type" "ATTACH"; match "vendor" "0x0d9f"; match "product" "0x0004"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # PowerCOM IMP - IMPERIAL Series - usbhid-ups notify 100 { @@ -763,7 +799,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0d9f"; match "product" "0x00a2"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # PowerCOM SKP - Smart KING Pro (all Smart series) - usbhid-ups notify 100 { @@ -772,7 +808,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0d9f"; match "product" "0x00a3"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # PowerCOM WOW - usbhid-ups notify 100 { @@ -781,7 +817,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0d9f"; match "product" "0x00a4"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # PowerCOM VGD - Vanguard - usbhid-ups notify 100 { @@ -790,7 +826,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0d9f"; match "product" "0x00a5"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # PowerCOM BNT - Black Knight Pro - usbhid-ups notify 100 { @@ -799,7 +835,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0d9f"; match "product" "0x00a6"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Unitek Alpha 1200Sx - blazer_usb notify 100 { @@ -808,7 +844,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0f03"; match "product" "0x0001"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Liebert @@ -819,7 +855,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x10af"; match "product" "0x0001"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Liebert PowerSure PSI 1440 - usbhid-ups notify 100 { @@ -828,7 +864,16 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x10af"; match "product" "0x0004"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; +}; +# Liebert GXT3 - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x10af"; + match "product" "0x0008"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # GE EP series - blazer_usb notify 100 { @@ -837,7 +882,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x14f0"; match "product" "0x00c9"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Ablerex 625L USB - blazer_usb notify 100 { @@ -846,5 +891,5 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0xffff"; match "product" "0x0000"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; diff --git a/scripts/hotplug/Makefile.in b/scripts/hotplug/Makefile.in index 4d6b47e..4e9b5e5 100644 --- a/scripts/hotplug/Makefile.in +++ b/scripts/hotplug/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,23 +16,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -54,9 +81,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = scripts/hotplug -DIST_COMMON = README $(am__dist_hotplugusb_DATA_DIST) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/libhidups.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/libhidups.in $(am__dist_hotplugusb_DATA_DIST) README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -115,6 +141,18 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(hotplugusbdir)" \ "$(DESTDIR)$(hotplugusbdir)" SCRIPTS = $(hotplugusb_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -124,10 +162,12 @@ am__can_run_installinfo = \ esac am__dist_hotplugusb_DATA_DIST = libhid.usermap DATA = $(dist_hotplugusb_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -234,12 +274,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -284,6 +327,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -407,11 +451,11 @@ uninstall-dist_hotplugusbDATA: @list='$(dist_hotplugusb_DATA)'; test -n "$(hotplugusbdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(hotplugusbdir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) @@ -552,16 +596,17 @@ uninstall-am: uninstall-dist_hotplugusbDATA \ .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dist_hotplugusbDATA \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-hotplugusbSCRIPTS install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dist_hotplugusbDATA install-dvi install-dvi-am \ + install-exec install-exec-am install-hotplugusbSCRIPTS \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags-am uninstall uninstall-am \ uninstall-dist_hotplugusbDATA uninstall-hotplugusbSCRIPTS # we should never remove this one, apart from a distclean-check diff --git a/scripts/hotplug/libhid.usermap b/scripts/hotplug/libhid.usermap index 08f25c5..d1be810 100644 --- a/scripts/hotplug/libhid.usermap +++ b/scripts/hotplug/libhid.usermap @@ -56,6 +56,8 @@ libhidups 0x0003 0x04b4 0x5500 0x0000 0x0000 0x00 # Minibox # openUPS Intelligent UPS (minimum required firmware 1.4) libhidups 0x0003 0x04d8 0xd004 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# openUPS Intelligent UPS (minimum required firmware 1.4) +libhidups 0x0003 0x04d8 0xd005 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Belkin # F6H375-USB @@ -74,10 +76,14 @@ libhidups 0x0003 0x050d 0x0910 0x0000 0x0000 0x00 libhidups 0x0003 0x050d 0x0912 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # F6C800-UNV libhidups 0x0003 0x050d 0x0980 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# Regulator PRO-USB +libhidups 0x0003 0x050d 0x0f51 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # F6C1100-UNV, F6C1200-UNV libhidups 0x0003 0x050d 0x1100 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # APC +# APC AP9584 Serial->USB kit +libhidups 0x0003 0x051d 0x0000 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # various models libhidups 0x0003 0x051d 0x0002 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # various 5G models @@ -94,7 +100,7 @@ libhidups 0x0003 0x05b8 0x0000 0x0000 0x0000 0x00 libhidups 0x0003 0x0665 0x5161 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Phoenixtec Power Co., Ltd -# Online Yunto YQ450 +# various models libhidups 0x0003 0x06da 0x0002 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Mustek Powermust libhidups 0x0003 0x06da 0x0003 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 @@ -114,9 +120,9 @@ libhidups 0x0003 0x06da 0xffff 0x0000 0x0000 0x00 libhidups 0x0003 0x075d 0x0300 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Cyber Power Systems -# 900AVR/BC900D, CP1200AVR/BC1200D +# 900AVR/BC900D libhidups 0x0003 0x0764 0x0005 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 -# Dynex DX-800U? +# Dynex DX-800U?, CP1200AVR/BC1200D, CP825AVR-G, CP1000AVRLCD, CP1000PFCLCD, CP1500C, CP550HG, etc. libhidups 0x0003 0x0764 0x0501 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # OR2200LCDRM2U, OR700LCDRM1U, PR6000LCDRTXL5U libhidups 0x0003 0x0764 0x0601 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 @@ -191,6 +197,8 @@ libhidups 0x0003 0x09ae 0x4008 0x0000 0x0000 0x00 # PowerCOM # PowerCOM Vanguard and BNT-xxxAP +libhidups 0x0003 0x0d9f 0x0001 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# PowerCOM Vanguard and BNT-xxxAP libhidups 0x0003 0x0d9f 0x0004 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # PowerCOM IMP - IMPERIAL Series libhidups 0x0003 0x0d9f 0x00a2 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 @@ -210,6 +218,8 @@ libhidups 0x0003 0x0f03 0x0001 0x0000 0x0000 0x00 libhidups 0x0003 0x10af 0x0001 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Liebert PowerSure PSI 1440 libhidups 0x0003 0x10af 0x0004 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# Liebert GXT3 +libhidups 0x0003 0x10af 0x0008 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # GE EP series libhidups 0x0003 0x14f0 0x00c9 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Ablerex 625L USB diff --git a/scripts/python/Makefile.am b/scripts/python/Makefile.am index 2d670e5..0326725 100644 --- a/scripts/python/Makefile.am +++ b/scripts/python/Makefile.am @@ -3,6 +3,7 @@ EXTRA_DIST = README \ app/gui-1.3.glade \ app/NUT-Monitor \ + app/nut-monitor.appdata.xml \ app/nut-monitor.desktop \ app/nut-monitor.png \ app/README \ diff --git a/scripts/python/Makefile.in b/scripts/python/Makefile.in index d04e8aa..79c48e5 100644 --- a/scripts/python/Makefile.in +++ b/scripts/python/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,23 +16,51 @@ # Network UPS Tools: data/html VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -54,7 +81,7 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = scripts/python -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -83,6 +110,18 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -90,10 +129,12 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -200,12 +241,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -250,6 +294,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -274,6 +319,7 @@ udevdir = @udevdir@ EXTRA_DIST = README \ app/gui-1.3.glade \ app/NUT-Monitor \ + app/nut-monitor.appdata.xml \ app/nut-monitor.desktop \ app/nut-monitor.png \ app/README \ @@ -326,11 +372,11 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) @@ -466,15 +512,16 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/scripts/python/app/NUT-Monitor b/scripts/python/app/NUT-Monitor index 91e9001..08dfaa4 100755 --- a/scripts/python/app/NUT-Monitor +++ b/scripts/python/app/NUT-Monitor @@ -23,12 +23,16 @@ # # 2010-10-06 David Goncalves - Version 1.3 # Added localisation support +# +# 2015-02-14 Michal Fincham - Version 1.3.1 +# Corrected unsafe permissions on ~/.nut-monitor (Debian #777706) import gtk, gtk.glade, gobject import sys import base64 import os, os.path +import stat import platform import time import threading @@ -44,21 +48,23 @@ gobject.threads_init() class interface : - __widgets = {} - __callbacks = {} - __favorites = {} - __favorites_file = None - __favorites_path = "" - __fav_menu_items = list() - __window_visible = True - __glade_file = None - __connected = False - __ups_handler = None - __ups_commands = None - __ups_vars = None - __ups_rw_vars = None - __gui_thread = None - __current_ups = None + DESIRED_FAVORITES_DIRECTORY_MODE = 0700 + + __widgets = {} + __callbacks = {} + __favorites = {} + __favorites_file = None + __favorites_path = "" + __fav_menu_items = list() + __window_visible = True + __glade_file = None + __connected = False + __ups_handler = None + __ups_commands = None + __ups_vars = None + __ups_rw_vars = None + __gui_thread = None + __current_ups = None def __init__( self ) : @@ -528,6 +534,9 @@ class interface : return try : + if ( not stat.S_IMODE( os.stat( self.__favorites_path ).st_mode ) == self.DESIRED_FAVORITES_DIRECTORY_MODE ) : # unsafe pre-1.2 directory found + os.chmod( self.__favorites_path, self.DESIRED_FAVORITES_DIRECTORY_MODE ) + conf = ConfigParser.ConfigParser() conf.read( self.__favorites_file ) for current in conf.sections() : @@ -573,7 +582,7 @@ class interface : # If path does not exists, try to create it if ( not os.path.exists( self.__favorites_file ) ) : try : - os.makedirs( self.__favorites_path, mode=0700 ) + os.makedirs( self.__favorites_path, mode=self.DESIRED_FAVORITES_DIRECTORY_MODE ) except : self.gui_status_message( _("Error while creating configuration folder (%s)") % sys.exc_info()[1] ) diff --git a/scripts/python/app/gui-1.3.glade b/scripts/python/app/gui-1.3.glade index 1d54fe6..eb42aba 100644 --- a/scripts/python/app/gui-1.3.glade +++ b/scripts/python/app/gui-1.3.glade @@ -1021,7 +1021,7 @@ want to delete from list... center-always normal NUT-Monitor - 1.3 + 1.3.1 Copyright (c) 2010 David Goncalves GUI to manage devices connected a NUT server. diff --git a/scripts/python/app/nut-monitor.appdata.xml b/scripts/python/app/nut-monitor.appdata.xml new file mode 100644 index 0000000..ba1d0b9 --- /dev/null +++ b/scripts/python/app/nut-monitor.appdata.xml @@ -0,0 +1,42 @@ + + + + nut-monitor.desktop + CC0-1.0 + GPL-3.0+ + NUT Monitor + GUI application to monitor UPS status + +

+ NUT Monitor is a GUI application to monitor UPS status, through NUT - + Network UPS Tools. + NUT is a client/server monitoring system that allows computers to + share uninterruptible power supply (UPS) and power distribution unit + (PDU) hardware. Clients access the hardware through the server, and + are notified whenever the power status changes. +

+

NUT Monitor provides the following features:

+
    +
  • Automatically connects to local UPS if there is only one managed
  • +
  • Command line options to start hidden, load a favorite, ...
  • +
  • System tray (notification area) integration, including notifications
  • +
  • Favorites, to store different devices
  • +
  • Display all device variables
  • +
  • Modify writable variables on UPS and devices
  • +
  • Support English and French
  • +
+

+ NUT Monitor requires that you have a running NUT system, that you can + connect to, either locally or remotely. + For more information on NUT: http://www.networkupstools.org/ +

+
+ + http://www.lestat.st/_media/informatique/projets/nut-monitor/nut-monitor-1.png + http://www.lestat.st/_media/informatique/projets/nut-monitor/nut-monitor-2.png + http://www.lestat.st/_media/informatique/projets/nut-monitor/nut-monitor-3.png + + http://www.lestat.st/en/informatique/projets/nut-monitor + david@lestat.st + +
diff --git a/scripts/python/module/PyNUT.py b/scripts/python/module/PyNUT.py index 98c9114..9a9399c 100644 --- a/scripts/python/module/PyNUT.py +++ b/scripts/python/module/PyNUT.py @@ -35,9 +35,16 @@ # 2012-02-07 René Martín Rodríguez - Version 1.2.2 # Added support for LIST CLIENTS command # +# 2014-06-03 george2 - Version 1.3.0 +# Added custom exception class, fixed minor bug, added Python 3 support. +# import telnetlib +class PyNUTError( Exception ) : + """ Base class for custom exceptions """ + + class PyNUTClient : """ Abstraction class to access NUT (Network UPS Tools) server """ @@ -49,8 +56,8 @@ class PyNUTClient : __timeout = None __srv_handler = None - __version = "1.2.2" - __release = "2012-02-07" + __version = "1.3.0" + __release = "2014-06-03" def __init__( self, host="127.0.0.1", port=3493, login=None, password=None, debug=False, timeout=5 ) : @@ -101,13 +108,13 @@ if something goes wrong. self.__srv_handler.write( "USERNAME %s\n" % self.__login ) result = self.__srv_handler.read_until( "\n", self.__timeout ) if result[:2] != "OK" : - raise Exception, result.replace( "\n", "" ) + raise PyNUTError( result.replace( "\n", "" ) ) if self.__password != None : self.__srv_handler.write( "PASSWORD %s\n" % self.__password ) result = self.__srv_handler.read_until( "\n", self.__timeout ) if result[:2] != "OK" : - raise Exception, result.replace( "\n", "" ) + raise PyNUTError( result.replace( "\n", "" ) ) def GetUPSList( self ) : """ Returns the list of available UPS from the NUT server @@ -120,7 +127,7 @@ The result is a dictionary containing 'key->val' pairs of 'UPSName' and 'UPS Des self.__srv_handler.write( "LIST UPS\n" ) result = self.__srv_handler.read_until( "\n" ) if result != "BEGIN LIST UPS\n" : - raise Exception, result.replace( "\n", "" ) + raise PyNUTError( result.replace( "\n", "" ) ) result = self.__srv_handler.read_until( "END LIST UPS\n" ) ups_list = {} @@ -144,7 +151,7 @@ available vars. self.__srv_handler.write( "LIST VAR %s\n" % ups ) result = self.__srv_handler.read_until( "\n" ) if result != "BEGIN LIST VAR %s\n" % ups : - raise Exception, result.replace( "\n", "" ) + raise PyNUTError( result.replace( "\n", "" ) ) ups_vars = {} result = self.__srv_handler.read_until( "END LIST VAR %s\n" % ups ) @@ -170,7 +177,7 @@ of the command as value self.__srv_handler.write( "LIST CMD %s\n" % ups ) result = self.__srv_handler.read_until( "\n" ) if result != "BEGIN LIST CMD %s\n" % ups : - raise Exception, result.replace( "\n", "" ) + raise PyNUTError( result.replace( "\n", "" ) ) ups_cmds = {} result = self.__srv_handler.read_until( "END LIST CMD %s\n" % ups ) @@ -185,7 +192,7 @@ of the command as value self.__srv_handler.write( "GET CMDDESC %s %s\n" % ( ups, var ) ) temp = self.__srv_handler.read_until( "\n" ) if temp[:7] != "CMDDESC" : - raise + raise PyNUTError else : off = len( "CMDDESC %s %s " % ( ups, var ) ) desc = temp[off:-1].split('"')[1] @@ -207,7 +214,7 @@ The result is presented as a dictionary containing 'key->val' pairs self.__srv_handler.write( "LIST RW %s\n" % ups ) result = self.__srv_handler.read_until( "\n" ) if ( result != "BEGIN LIST RW %s\n" % ups ) : - raise Exception, result.replace( "\n", "" ) + raise PyNUTError( result.replace( "\n", "" ) ) result = self.__srv_handler.read_until( "END LIST RW %s\n" % ups ) offset = len( "VAR %s" % ups ) @@ -237,7 +244,7 @@ rights to set it (maybe login/password). if ( result == "OK\n" ) : return( "OK" ) else : - raise Exception, result + raise PyNUTError( result ) def RunUPSCommand( self, ups="", command="" ) : """ Send a command to the specified UPS @@ -253,7 +260,7 @@ Returns OK on success or raises an error if ( result == "OK\n" ) : return( "OK" ) else : - raise Exception, result.replace( "\n", "" ) + raise PyNUTError( result.replace( "\n", "" ) ) def FSD( self, ups="") : """ Send FSD command @@ -267,7 +274,7 @@ Returns OK on success or raises an error self.__srv_handler.write( "MASTER %s\n" % ups ) result = self.__srv_handler.read_until( "\n" ) if ( result != "OK MASTER-GRANTED\n" ) : - raise Exception, ( "Master level function are not available", "" ) + raise PyNUTError( ( "Master level function are not available", "" ) ) if self.__debug : print( "[DEBUG] FSD called..." ) @@ -276,7 +283,7 @@ Returns OK on success or raises an error if ( result == "OK FSD-SET\n" ) : return( "OK" ) else : - raise Exception, result.replace( "\n", "" ) + raise PyNUTError( result.replace( "\n", "" ) ) def help(self) : """ Send HELP command @@ -307,7 +314,7 @@ The result is a dictionary containing 'key->val' pairs of 'UPSName' and a list o print( "[DEBUG] ListClients from server" ) if ups and (ups not in self.GetUPSList()): - raise Exception, "%s is not a valid UPS" % ups + raise PyNUTError( "%s is not a valid UPS" % ups ) if ups: self.__srv_handler.write( "LIST CLIENTS %s\n" % ups) @@ -315,7 +322,7 @@ The result is a dictionary containing 'key->val' pairs of 'UPSName' and a list o self.__srv_handler.write( "LIST CLIENTS\n" ) result = self.__srv_handler.read_until( "\n" ) if result != "BEGIN LIST CLIENTS\n" : - raise Exception, result.replace( "\n", "" ) + raise PyNUTError( result.replace( "\n", "" ) ) result = self.__srv_handler.read_until( "END LIST CLIENTS\n" ) ups_list = {} diff --git a/scripts/subdriver/gen-snmp-subdriver.sh b/scripts/subdriver/gen-snmp-subdriver.sh index b9aa44f..92d18d5 100755 --- a/scripts/subdriver/gen-snmp-subdriver.sh +++ b/scripts/subdriver/gen-snmp-subdriver.sh @@ -67,11 +67,14 @@ TMP_STRWALKFILE=`mktemp "$TMPDIR/$NAME-TMP-STRWALK.XXXXXX"` get_snmp_data() { # 1) get the sysOID (points the mfr specif MIB) - SYSOID=`snmpget -v1 -c $COMMUNITY $HOSTNAME .1.3.6.1.2.1.1.2.0 41` + SYSOID=`snmpget -v1 -c $COMMUNITY -Ov $HOSTNAME .1.3.6.1.2.1.1.2.0 | cut -d' ' -f2` + + echo "sysOID retrieved: ${SYSOID}" # 2) get the content of the mfr specif MIB + echo "Retrieving SNMP information. This may take some time" snmpwalk -On -v1 -c $COMMUNITY $HOSTNAME $SYSOID 2>/dev/null 1> $DFL_NUMWALKFILE - snmpwalk -Os -v1 -M $MIBS_DIRLIST -c $COMMUNITY $HOSTNAME $SYSOID 2>/dev/null 1> $DFL_STRWALKFILE + snmpwalk -Os -v1 -m ALL -M $MIBS_DIRLIST -c $COMMUNITY $HOSTNAME $SYSOID 2>/dev/null 1> $DFL_STRWALKFILE } # process command line options @@ -80,7 +83,7 @@ while [ $# -gt 0 ]; do DRIVER="$2" shift 2 elif [ $# -gt 1 -a "$1" = "-M" ]; then - MIBS_DIRLIST="$MIBS_DIRLIST:$2" + MIBS_DIRLIST="+$2" shift 2 elif [ "$1" = "-k" ]; then KEEP=yes @@ -340,8 +343,8 @@ Done. Do not forget to: * bump DRIVER_VERSION in snmp-ups.c (add "0.01") * copy "${HFILE}" and "${CFILE}" to "../../drivers" -* add #include "${HFILE}" to snmp-ups.c -* add &${LDRIVER} to snmp-ups.c:mib2nut[] list, +* add #include "${HFILE}" to drivers/snmp-ups.c +* add &${LDRIVER} to drivers/snmp-ups.c:mib2nut[] list, * add ${LDRIVER}-mib.c to snmp_ups_SOURCES in drivers/Makefile.am * add ${LDRIVER}-mib.h to dist_noinst_HEADERS in drivers/Makefile.am * "./autogen.sh && ./configure && make" from the top level directory diff --git a/scripts/systemd/Makefile.in b/scripts/systemd/Makefile.in index d90e262..252ff39 100644 --- a/scripts/systemd/Makefile.in +++ b/scripts/systemd/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,23 +16,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -57,10 +84,11 @@ target_triplet = @target@ @HAVE_SYSTEMD_FALSE@ nut-server.service.in nutshutdown.in subdir = scripts/systemd -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/nut-driver.service.in \ $(srcdir)/nut-monitor.service.in \ - $(srcdir)/nut-server.service.in $(srcdir)/nutshutdown.in + $(srcdir)/nut-server.service.in $(srcdir)/nutshutdown.in \ + README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -120,6 +148,18 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(systemdsystemshutdowndir)" \ "$(DESTDIR)$(systemdsystemunitdir)" SCRIPTS = $(systemdsystemshutdown_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -128,10 +168,12 @@ am__can_run_installinfo = \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(systemdsystemunit_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -238,12 +280,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -288,6 +333,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -419,11 +465,11 @@ uninstall-systemdsystemunitDATA: @list='$(systemdsystemunit_DATA)'; test -n "$(systemdsystemunitdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(systemdsystemunitdir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) @@ -564,17 +610,17 @@ uninstall-am: uninstall-systemdsystemshutdownSCRIPTS \ .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - install-systemdsystemshutdownSCRIPTS \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip install-systemdsystemshutdownSCRIPTS \ install-systemdsystemunitDATA installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am uninstall uninstall-am \ + ps ps-am tags-am uninstall uninstall-am \ uninstall-systemdsystemshutdownSCRIPTS \ uninstall-systemdsystemunitDATA diff --git a/scripts/systemd/nut-server.service.in b/scripts/systemd/nut-server.service.in index edcaf10..dada977 100644 --- a/scripts/systemd/nut-server.service.in +++ b/scripts/systemd/nut-server.service.in @@ -1,7 +1,10 @@ [Unit] Description=Network UPS Tools - power devices information server After=local-fs.target network.target nut-driver.service -Requires=nut-driver.service +# We don't Require drivers to be successfully started! This would be +# a change of behavior compared to init SysV, and could prevent from +# accessing successfully started, at least to audit a system. +#Requires=nut-driver.service Before=nut-monitor.service [Service] diff --git a/scripts/udev/Makefile.am b/scripts/udev/Makefile.am index fcd6eeb..1973ccf 100644 --- a/scripts/udev/Makefile.am +++ b/scripts/udev/Makefile.am @@ -3,7 +3,7 @@ if WITH_UDEV udevrulesdir = $(udevdir)/rules.d udevrules_DATA = if WITH_USB - udevrules_DATA += 52-nut-usbups.rules + udevrules_DATA += 62-nut-usbups.rules endif if WITH_IPMI udevrules_DATA += 52-nut-ipmipsu.rules @@ -12,13 +12,13 @@ endif EXTRA_DIST = README -52-nut-usbups.rules: nut-usbups.rules - cp nut-usbups.rules 52-nut-usbups.rules +62-nut-usbups.rules: nut-usbups.rules + cp nut-usbups.rules $@ 52-nut-ipmipsu.rules: nut-ipmipsu.rules - cp nut-ipmipsu.rules 52-nut-ipmipsu.rules + cp nut-ipmipsu.rules $@ DISTCLEANFILES = nut-usbups.rules nut-ipmipsu.rules -CLEANFILES = 52-nut-usbups.rules 52-nut-ipmipsu.rules +CLEANFILES = 62-nut-usbups.rules 52-nut-ipmipsu.rules # we should never remove this one, apart from a distclean-check #MAINTAINERCLEANFILES = nut-usbups.rules.in diff --git a/scripts/udev/Makefile.in b/scripts/udev/Makefile.in index c222218..33dd60d 100644 --- a/scripts/udev/Makefile.in +++ b/scripts/udev/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -52,11 +79,12 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -@WITH_UDEV_TRUE@@WITH_USB_TRUE@am__append_1 = 52-nut-usbups.rules +@WITH_UDEV_TRUE@@WITH_USB_TRUE@am__append_1 = 62-nut-usbups.rules @WITH_IPMI_TRUE@@WITH_UDEV_TRUE@am__append_2 = 52-nut-ipmipsu.rules subdir = scripts/udev -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/nut-ipmipsu.rules.in $(srcdir)/nut-usbups.rules.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/nut-ipmipsu.rules.in $(srcdir)/nut-usbups.rules.in \ + README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -85,6 +113,18 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = nut-ipmipsu.rules nut-usbups.rules CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -121,10 +161,12 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(udevrulesdir)" DATA = $(udevrules_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -231,12 +273,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -281,6 +326,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -306,7 +352,7 @@ udevdir = @udevdir@ @WITH_UDEV_TRUE@udevrules_DATA = $(am__append_1) $(am__append_2) EXTRA_DIST = README DISTCLEANFILES = nut-usbups.rules nut-ipmipsu.rules -CLEANFILES = 52-nut-usbups.rules 52-nut-ipmipsu.rules +CLEANFILES = 62-nut-usbups.rules 52-nut-ipmipsu.rules all: all-am .SUFFIXES: @@ -371,11 +417,11 @@ uninstall-udevrulesDATA: @list='$(udevrules_DATA)'; test -n "$(udevrulesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(udevrulesdir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) @@ -516,23 +562,24 @@ uninstall-am: uninstall-udevrulesDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - install-udevrulesDATA installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-udevrulesDATA + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip install-udevrulesDATA installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am uninstall-udevrulesDATA -52-nut-usbups.rules: nut-usbups.rules - cp nut-usbups.rules 52-nut-usbups.rules +62-nut-usbups.rules: nut-usbups.rules + cp nut-usbups.rules $@ 52-nut-ipmipsu.rules: nut-ipmipsu.rules - cp nut-ipmipsu.rules 52-nut-ipmipsu.rules + cp nut-ipmipsu.rules $@ # we should never remove this one, apart from a distclean-check #MAINTAINERCLEANFILES = nut-usbups.rules.in diff --git a/scripts/udev/README b/scripts/udev/README index a3b5567..ff6a1a0 100644 --- a/scripts/udev/README +++ b/scripts/udev/README @@ -1,6 +1,6 @@ Desc: Udev script for NUT USB and IPMI drivers File: scripts/udev/README -Date: 25 July 2011 +Date: 31 July 2014 Auth: Arnaud Quette This document introduces the Linux udev script for NUT USB @@ -32,7 +32,7 @@ Manual installation To install them manually, copy the rules file(s) to /etc/udev/rules.d (or /lib/udev/rules.d on newer systems) using the command(s): -$ cp -f nut-usbups.rules /etc/udev/rules.d/52-nut-usbups.rules +$ cp -f nut-usbups.rules /etc/udev/rules.d/62-nut-usbups.rules $ cp -f nut-ipmipsu.rules /etc/udev/rules.d/52-nut-ipmipsu.rules You will need to refresh the bus to avoid a reboot for these rules to be diff --git a/scripts/udev/nut-usbups.rules.in b/scripts/udev/nut-usbups.rules.in index d8961dd..1ac601d 100644 --- a/scripts/udev/nut-usbups.rules.in +++ b/scripts/udev/nut-usbups.rules.in @@ -58,6 +58,8 @@ ATTR{idVendor}=="04b4", ATTR{idProduct}=="5500", MODE="664", GROUP="@RUN_AS_GROU # Minibox # openUPS Intelligent UPS (minimum required firmware 1.4) - usbhid-ups ATTR{idVendor}=="04d8", ATTR{idProduct}=="d004", MODE="664", GROUP="@RUN_AS_GROUP@" +# openUPS Intelligent UPS (minimum required firmware 1.4) - usbhid-ups +ATTR{idVendor}=="04d8", ATTR{idProduct}=="d005", MODE="664", GROUP="@RUN_AS_GROUP@" # Belkin # F6H375-USB - usbhid-ups @@ -76,10 +78,14 @@ ATTR{idVendor}=="050d", ATTR{idProduct}=="0910", MODE="664", GROUP="@RUN_AS_GROU ATTR{idVendor}=="050d", ATTR{idProduct}=="0912", MODE="664", GROUP="@RUN_AS_GROUP@" # F6C800-UNV - usbhid-ups ATTR{idVendor}=="050d", ATTR{idProduct}=="0980", MODE="664", GROUP="@RUN_AS_GROUP@" +# Regulator PRO-USB - usbhid-ups +ATTR{idVendor}=="050d", ATTR{idProduct}=="0f51", MODE="664", GROUP="@RUN_AS_GROUP@" # F6C1100-UNV, F6C1200-UNV - usbhid-ups ATTR{idVendor}=="050d", ATTR{idProduct}=="1100", MODE="664", GROUP="@RUN_AS_GROUP@" # APC +# APC AP9584 Serial->USB kit - usbhid-ups +ATTR{idVendor}=="051d", ATTR{idProduct}=="0000", MODE="664", GROUP="@RUN_AS_GROUP@" # various models - usbhid-ups ATTR{idVendor}=="051d", ATTR{idProduct}=="0002", MODE="664", GROUP="@RUN_AS_GROUP@" # various 5G models - usbhid-ups @@ -96,7 +102,7 @@ ATTR{idVendor}=="05b8", ATTR{idProduct}=="0000", MODE="664", GROUP="@RUN_AS_GROU ATTR{idVendor}=="0665", ATTR{idProduct}=="5161", MODE="664", GROUP="@RUN_AS_GROUP@" # Phoenixtec Power Co., Ltd -# Online Yunto YQ450 - blazer_usb +# various models - bcmxcp_usb ATTR{idVendor}=="06da", ATTR{idProduct}=="0002", MODE="664", GROUP="@RUN_AS_GROUP@" # Mustek Powermust - blazer_usb ATTR{idVendor}=="06da", ATTR{idProduct}=="0003", MODE="664", GROUP="@RUN_AS_GROUP@" @@ -116,9 +122,9 @@ ATTR{idVendor}=="06da", ATTR{idProduct}=="ffff", MODE="664", GROUP="@RUN_AS_GROU ATTR{idVendor}=="075d", ATTR{idProduct}=="0300", MODE="664", GROUP="@RUN_AS_GROUP@" # Cyber Power Systems -# 900AVR/BC900D, CP1200AVR/BC1200D - usbhid-ups +# 900AVR/BC900D - usbhid-ups ATTR{idVendor}=="0764", ATTR{idProduct}=="0005", MODE="664", GROUP="@RUN_AS_GROUP@" -# Dynex DX-800U? - usbhid-ups +# Dynex DX-800U?, CP1200AVR/BC1200D, CP825AVR-G, CP1000AVRLCD, CP1000PFCLCD, CP1500C, CP550HG, etc. - usbhid-ups ATTR{idVendor}=="0764", ATTR{idProduct}=="0501", MODE="664", GROUP="@RUN_AS_GROUP@" # OR2200LCDRM2U, OR700LCDRM1U, PR6000LCDRTXL5U - usbhid-ups ATTR{idVendor}=="0764", ATTR{idProduct}=="0601", MODE="664", GROUP="@RUN_AS_GROUP@" @@ -193,6 +199,8 @@ ATTR{idVendor}=="09ae", ATTR{idProduct}=="4008", MODE="664", GROUP="@RUN_AS_GROU # PowerCOM # PowerCOM Vanguard and BNT-xxxAP - usbhid-ups +ATTR{idVendor}=="0d9f", ATTR{idProduct}=="0001", MODE="664", GROUP="@RUN_AS_GROUP@" +# PowerCOM Vanguard and BNT-xxxAP - usbhid-ups ATTR{idVendor}=="0d9f", ATTR{idProduct}=="0004", MODE="664", GROUP="@RUN_AS_GROUP@" # PowerCOM IMP - IMPERIAL Series - usbhid-ups ATTR{idVendor}=="0d9f", ATTR{idProduct}=="00a2", MODE="664", GROUP="@RUN_AS_GROUP@" @@ -212,6 +220,8 @@ ATTR{idVendor}=="0f03", ATTR{idProduct}=="0001", MODE="664", GROUP="@RUN_AS_GROU ATTR{idVendor}=="10af", ATTR{idProduct}=="0001", MODE="664", GROUP="@RUN_AS_GROUP@" # Liebert PowerSure PSI 1440 - usbhid-ups ATTR{idVendor}=="10af", ATTR{idProduct}=="0004", MODE="664", GROUP="@RUN_AS_GROUP@" +# Liebert GXT3 - usbhid-ups +ATTR{idVendor}=="10af", ATTR{idProduct}=="0008", MODE="664", GROUP="@RUN_AS_GROUP@" # GE EP series - blazer_usb ATTR{idVendor}=="14f0", ATTR{idProduct}=="00c9", MODE="664", GROUP="@RUN_AS_GROUP@" # Ablerex 625L USB - blazer_usb diff --git a/scripts/upower/95-upower-hid.rules b/scripts/upower/95-upower-hid.rules index 31ffec2..a407b53 100644 --- a/scripts/upower/95-upower-hid.rules +++ b/scripts/upower/95-upower-hid.rules @@ -1,7 +1,7 @@ ############################################################################################################## # Uninterruptible Power Supplies with USB HID interfaces # -# to keep up to date, monitor: http://svn.debian.org/wsvn/nut/trunk/scripts/upower/95-upower-hid.rules +# to keep up to date, monitor https://github.com/networkupstools/nut/commits/master/scripts/upower/95-upower-hid.rules # only support USB, else ignore SUBSYSTEM!="usb", GOTO="up_hid_end" @@ -50,6 +50,7 @@ ATTRS{idVendor}=="047c", ATTRS{idProduct}=="ffff", ENV{UPOWER_BATTERY_TYPE}="ups # Minibox ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="d004", ENV{UPOWER_BATTERY_TYPE}="ups" +ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="d005", ENV{UPOWER_BATTERY_TYPE}="ups" # Belkin ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0375", ENV{UPOWER_BATTERY_TYPE}="ups" @@ -60,9 +61,11 @@ ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0900", ENV{UPOWER_BATTERY_TYPE}="ups ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0910", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0912", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0980", ENV{UPOWER_BATTERY_TYPE}="ups" +ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0f51", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="050d", ATTRS{idProduct}=="1100", ENV{UPOWER_BATTERY_TYPE}="ups" # APC +ATTRS{idVendor}=="051d", ATTRS{idProduct}=="0000", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="051d", ATTRS{idProduct}=="0002", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="051d", ATTRS{idProduct}=="0003", ENV{UPOWER_BATTERY_TYPE}="ups" @@ -114,6 +117,7 @@ ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="4007", ENV{UPOWER_BATTERY_TYPE}="ups ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="4008", ENV{UPOWER_BATTERY_TYPE}="ups" # PowerCOM +ATTRS{idVendor}=="0d9f", ATTRS{idProduct}=="0001", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="0d9f", ATTRS{idProduct}=="0004", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="0d9f", ATTRS{idProduct}=="00a2", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="0d9f", ATTRS{idProduct}=="00a3", ENV{UPOWER_BATTERY_TYPE}="ups" @@ -124,5 +128,6 @@ ATTRS{idVendor}=="0d9f", ATTRS{idProduct}=="00a6", ENV{UPOWER_BATTERY_TYPE}="ups # Liebert ATTRS{idVendor}=="10af", ATTRS{idProduct}=="0001", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="10af", ATTRS{idProduct}=="0004", ENV{UPOWER_BATTERY_TYPE}="ups" +ATTRS{idVendor}=="10af", ATTRS{idProduct}=="0008", ENV{UPOWER_BATTERY_TYPE}="ups" LABEL="up_hid_end" diff --git a/server/Makefile.in b/server/Makefile.in index b6c8d7d..398db3f 100644 --- a/server/Makefile.in +++ b/server/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,23 +17,51 @@ # Network UPS Tools: server VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -61,7 +88,8 @@ target_triplet = @target@ sbin_PROGRAMS = upsd$(EXEEXT) EXTRA_PROGRAMS = sockdebug$(EXEEXT) subdir = server -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -101,6 +129,10 @@ am__DEPENDENCIES_1 = sockdebug_DEPENDENCIES = ../common/libcommon.la \ ../common/libparseconf.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = am_upsd_OBJECTS = upsd.$(OBJEXT) user.$(OBJEXT) conf.$(OBJEXT) \ netssl.$(OBJEXT) sstate.$(OBJEXT) desc.$(OBJEXT) \ netget.$(OBJEXT) netmisc.$(OBJEXT) netlist.$(OBJEXT) \ @@ -110,19 +142,40 @@ upsd_LDADD = $(LDADD) upsd_DEPENDENCIES = ../common/libcommon.la ../common/libparseconf.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \ $(am__DEPENDENCIES_3) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(sockdebug_SOURCES) $(upsd_SOURCES) DIST_SOURCES = $(sockdebug_SOURCES) $(upsd_SOURCES) am__can_run_installinfo = \ @@ -130,12 +183,30 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -242,12 +313,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -292,6 +366,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -370,10 +445,12 @@ install-sbinPROGRAMS: $(sbin_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -394,7 +471,8 @@ uninstall-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files @@ -407,12 +485,14 @@ clean-sbinPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + sockdebug$(EXEEXT): $(sockdebug_OBJECTS) $(sockdebug_DEPENDENCIES) $(EXTRA_sockdebug_DEPENDENCIES) @rm -f sockdebug$(EXEEXT) - $(LINK) $(sockdebug_OBJECTS) $(sockdebug_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(sockdebug_OBJECTS) $(sockdebug_LDADD) $(LIBS) + upsd$(EXEEXT): $(upsd_OBJECTS) $(upsd_DEPENDENCIES) $(EXTRA_upsd_DEPENDENCIES) @rm -f upsd$(EXEEXT) - $(LINK) $(upsd_OBJECTS) $(upsd_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upsd_OBJECTS) $(upsd_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -435,25 +515,28 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/user.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -461,26 +544,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -492,15 +564,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -509,6 +577,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -653,19 +736,19 @@ uninstall-am: uninstall-sbinPROGRAMS .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-sbinPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-sbinPROGRAMS install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-sbinPROGRAMS install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-sbinPROGRAMS + tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/server/upsd.c b/server/upsd.c index 2c0d1a1..7dcda1d 100644 --- a/server/upsd.c +++ b/server/upsd.c @@ -1004,9 +1004,6 @@ int main(int argc, char **argv) /* start server */ server_load(); - /* initialize SSL before we drop privileges (we may not be able to read the keyfile as non-root) */ - ssl_init(); - become_user(new_uid); if (chdir(statepath)) { @@ -1038,6 +1035,9 @@ int main(int argc, char **argv) memset(pidfn, 0, sizeof(pidfn)); } + /* initialize SSL (keyfile must be readable by nut user) */ + ssl_init(); + while (!exit_flag) { mainloop(); } diff --git a/test-driver b/test-driver new file mode 100755 index 0000000..d306056 --- /dev/null +++ b/test-driver @@ -0,0 +1,139 @@ +#! /bin/sh +# test-driver - basic testsuite driver script. + +scriptversion=2013-07-13.22; # UTC + +# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +# Make unconditional expansion of undefined variables an error. This +# helps a lot in preventing typo-related bugs. +set -u + +usage_error () +{ + echo "$0: $*" >&2 + print_usage >&2 + exit 2 +} + +print_usage () +{ + cat <$log_file 2>&1 +estatus=$? +if test $enable_hard_errors = no && test $estatus -eq 99; then + estatus=1 +fi + +case $estatus:$expect_failure in + 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; + 0:*) col=$grn res=PASS recheck=no gcopy=no;; + 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; + *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; + *:*) col=$red res=FAIL recheck=yes gcopy=yes;; +esac + +# Report outcome to console. +echo "${col}${res}${std}: $test_name" + +# Register the test result, and other relevant metadata. +echo ":test-result: $res" > $trs_file +echo ":global-test-result: $res" >> $trs_file +echo ":recheck: $recheck" >> $trs_file +echo ":copy-in-global-log: $gcopy" >> $trs_file + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/tests/Makefile.in b/tests/Makefile.in index 1e9772c..ac73f55 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,23 +16,51 @@ # Network UPS Tools: tests VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -56,7 +83,8 @@ target_triplet = @target@ @HAVE_CPPUNIT_TRUE@TESTS = cppunittest$(EXEEXT) @HAVE_CPPUNIT_TRUE@check_PROGRAMS = $(am__EXEEXT_1) subdir = tests -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp $(top_srcdir)/test-driver ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -92,22 +120,47 @@ am__cppunittest_SOURCES_DIST = example.cpp cpputest.cpp @HAVE_CPPUNIT_TRUE@ cppunittest-cpputest.$(OBJEXT) cppunittest_OBJECTS = $(am_cppunittest_OBJECTS) cppunittest_LDADD = $(LDADD) -cppunittest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +cppunittest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(cppunittest_CXXFLAGS) \ $(CXXFLAGS) $(cppunittest_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(cppunittest_SOURCES) DIST_SOURCES = $(am__cppunittest_SOURCES_DIST) am__can_run_installinfo = \ @@ -115,14 +168,234 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -am__tty_colors = \ -red=; grn=; lgn=; blu=; std= +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -229,12 +502,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -279,6 +555,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -310,7 +587,7 @@ udevdir = @udevdir@ all: all-am .SUFFIXES: -.SUFFIXES: .cpp .lo .o .obj +.SUFFIXES: .cpp .lo .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -350,9 +627,10 @@ clean-checkPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + cppunittest$(EXEEXT): $(cppunittest_OBJECTS) $(cppunittest_DEPENDENCIES) $(EXTRA_cppunittest_DEPENDENCIES) @rm -f cppunittest$(EXEEXT) - $(cppunittest_LINK) $(cppunittest_OBJECTS) $(cppunittest_LDADD) $(LIBS) + $(AM_V_CXXLD)$(cppunittest_LINK) $(cppunittest_OBJECTS) $(cppunittest_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -364,53 +642,56 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cppunittest-example.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< cppunittest-example.o: example.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -MT cppunittest-example.o -MD -MP -MF $(DEPDIR)/cppunittest-example.Tpo -c -o cppunittest-example.o `test -f 'example.cpp' || echo '$(srcdir)/'`example.cpp -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/cppunittest-example.Tpo $(DEPDIR)/cppunittest-example.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='example.cpp' object='cppunittest-example.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -MT cppunittest-example.o -MD -MP -MF $(DEPDIR)/cppunittest-example.Tpo -c -o cppunittest-example.o `test -f 'example.cpp' || echo '$(srcdir)/'`example.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cppunittest-example.Tpo $(DEPDIR)/cppunittest-example.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='example.cpp' object='cppunittest-example.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -c -o cppunittest-example.o `test -f 'example.cpp' || echo '$(srcdir)/'`example.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -c -o cppunittest-example.o `test -f 'example.cpp' || echo '$(srcdir)/'`example.cpp cppunittest-example.obj: example.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -MT cppunittest-example.obj -MD -MP -MF $(DEPDIR)/cppunittest-example.Tpo -c -o cppunittest-example.obj `if test -f 'example.cpp'; then $(CYGPATH_W) 'example.cpp'; else $(CYGPATH_W) '$(srcdir)/example.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/cppunittest-example.Tpo $(DEPDIR)/cppunittest-example.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='example.cpp' object='cppunittest-example.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -MT cppunittest-example.obj -MD -MP -MF $(DEPDIR)/cppunittest-example.Tpo -c -o cppunittest-example.obj `if test -f 'example.cpp'; then $(CYGPATH_W) 'example.cpp'; else $(CYGPATH_W) '$(srcdir)/example.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cppunittest-example.Tpo $(DEPDIR)/cppunittest-example.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='example.cpp' object='cppunittest-example.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -c -o cppunittest-example.obj `if test -f 'example.cpp'; then $(CYGPATH_W) 'example.cpp'; else $(CYGPATH_W) '$(srcdir)/example.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -c -o cppunittest-example.obj `if test -f 'example.cpp'; then $(CYGPATH_W) 'example.cpp'; else $(CYGPATH_W) '$(srcdir)/example.cpp'; fi` cppunittest-cpputest.o: cpputest.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -MT cppunittest-cpputest.o -MD -MP -MF $(DEPDIR)/cppunittest-cpputest.Tpo -c -o cppunittest-cpputest.o `test -f 'cpputest.cpp' || echo '$(srcdir)/'`cpputest.cpp -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/cppunittest-cpputest.Tpo $(DEPDIR)/cppunittest-cpputest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cpputest.cpp' object='cppunittest-cpputest.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -MT cppunittest-cpputest.o -MD -MP -MF $(DEPDIR)/cppunittest-cpputest.Tpo -c -o cppunittest-cpputest.o `test -f 'cpputest.cpp' || echo '$(srcdir)/'`cpputest.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cppunittest-cpputest.Tpo $(DEPDIR)/cppunittest-cpputest.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpputest.cpp' object='cppunittest-cpputest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -c -o cppunittest-cpputest.o `test -f 'cpputest.cpp' || echo '$(srcdir)/'`cpputest.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -c -o cppunittest-cpputest.o `test -f 'cpputest.cpp' || echo '$(srcdir)/'`cpputest.cpp cppunittest-cpputest.obj: cpputest.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -MT cppunittest-cpputest.obj -MD -MP -MF $(DEPDIR)/cppunittest-cpputest.Tpo -c -o cppunittest-cpputest.obj `if test -f 'cpputest.cpp'; then $(CYGPATH_W) 'cpputest.cpp'; else $(CYGPATH_W) '$(srcdir)/cpputest.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/cppunittest-cpputest.Tpo $(DEPDIR)/cppunittest-cpputest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cpputest.cpp' object='cppunittest-cpputest.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -MT cppunittest-cpputest.obj -MD -MP -MF $(DEPDIR)/cppunittest-cpputest.Tpo -c -o cppunittest-cpputest.obj `if test -f 'cpputest.cpp'; then $(CYGPATH_W) 'cpputest.cpp'; else $(CYGPATH_W) '$(srcdir)/cpputest.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cppunittest-cpputest.Tpo $(DEPDIR)/cppunittest-cpputest.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpputest.cpp' object='cppunittest-cpputest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -c -o cppunittest-cpputest.obj `if test -f 'cpputest.cpp'; then $(CYGPATH_W) 'cpputest.cpp'; else $(CYGPATH_W) '$(srcdir)/cpputest.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -c -o cppunittest-cpputest.obj `if test -f 'cpputest.cpp'; then $(CYGPATH_W) 'cpputest.cpp'; else $(CYGPATH_W) '$(srcdir)/cpputest.cpp'; fi` mostlyclean-libtool: -rm -f *.lo @@ -418,26 +699,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -449,15 +719,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -466,102 +732,187 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ - fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + color_start= color_end=; \ fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ - else \ - skipped="($$skip tests were not run)"; \ - fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - fi; \ - echo "$${col}$$dashes$${std}"; \ - echo "$${col}$$banner$${std}"; \ - test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ - test -z "$$report" || echo "$${col}$$report$${std}"; \ - echo "$${col}$$dashes$${std}"; \ - test "$$failed" -eq 0; \ - else :; fi + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +cppunittest.log: cppunittest$(EXEEXT) + @p='cppunittest$(EXEEXT)'; \ + b='cppunittest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -619,6 +970,9 @@ install-strip: "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: @@ -702,9 +1056,9 @@ uninstall-am: .MAKE: check-am install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ - clean-checkPROGRAMS clean-generic clean-libtool ctags \ - distclean distclean-compile distclean-generic \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ @@ -714,7 +1068,7 @@ uninstall-am: installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am + recheck tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tools/Makefile.am b/tools/Makefile.am index 0e6501e..f8add46 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -16,7 +16,8 @@ # sub-directory SUBDIRS = . nut-scanner -EXTRA_DIST = nut-usbinfo.pl nut-recorder.sh gitlog2changelog.py nut-snmpinfo.py +EXTRA_DIST = nut-usbinfo.pl nut-recorder.sh nut-ddl-dump.sh \ + gitlog2changelog.py nut-snmpinfo.py all: nut-scanner-deps diff --git a/tools/Makefile.in b/tools/Makefile.in index dcbf07d..d132e0d 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,23 +16,51 @@ # TODO: remove redundancies! VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -54,7 +81,7 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = tools -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -83,15 +110,28 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -99,9 +139,29 @@ am__can_run_installinfo = \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -134,6 +194,7 @@ am__relativize = \ A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -240,12 +301,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -290,6 +354,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -327,7 +392,9 @@ udevdir = @udevdir@ # to have nutscan-{usb,snmp}.h built before going into the nut-scanner # sub-directory SUBDIRS = . nut-scanner -EXTRA_DIST = nut-usbinfo.pl nut-recorder.sh gitlog2changelog.py nut-snmpinfo.py +EXTRA_DIST = nut-usbinfo.pl nut-recorder.sh nut-ddl-dump.sh \ + gitlog2changelog.py nut-snmpinfo.py + all: all-recursive .SUFFIXES: @@ -369,22 +436,25 @@ clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -399,57 +469,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -465,12 +490,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -482,15 +502,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -499,6 +515,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -662,12 +693,11 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive dist-hook distclean distclean-generic \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am dist-hook distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ @@ -676,8 +706,8 @@ uninstall-am: install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am all: nut-scanner-deps diff --git a/tools/nut-ddl-dump.sh b/tools/nut-ddl-dump.sh new file mode 100755 index 0000000..dce1e8a --- /dev/null +++ b/tools/nut-ddl-dump.sh @@ -0,0 +1,53 @@ +#!/bin/sh +################################################################################ +# A script to ease the generation of NUT device dumps for NUT Devices Dumps Library +################################################################################ +# Author: (C) Arnaud Quette +# License: GPL v2+ +################################################################################ +# FIXME: +# - check if a previous report exists, and increase report number +#  - we currently use the .dev format ; but also consider the NDS format +# http://www.networkupstools.org/ddl/ +################################################################################ + +strUsage="Usage: $0 " + +# Check command line parameter () +if [ -z "$1" ]; then + echo "$strUsage" + exit +else + DDL_DEVICE_NAME=$1 +fi + +# Test communication with the device +testResult="`upsc ${DDL_DEVICE_NAME} 2> /dev/null`" +if [ $? -gt 0 ]; then + echo "Can't communicate with ${DDL_DEVICE_NAME}" + exit +fi + +# Build the filename +# ________. +# Process the Manufacturer name +RAW_DDL_MFR="`upsc ${DDL_DEVICE_NAME} device.mfr 2>/dev/null`" +if [ "${RAW_DDL_MFR}" = "EATON" ]; then + RAW_DDL_MFR="Eaton" +fi +# Replace spaces with underscores +DDL_MFR="`echo ${RAW_DDL_MFR} | sed s/\ /_/g`" +# Process the Model name +# Replace spaces with underscores +RAW_DDL_MODEL="`upsc ${DDL_DEVICE_NAME} device.model 2>/dev/null`" +DDL_MODEL="`echo ${RAW_DDL_MODEL} | sed s/\ /_/g`" +# Process the driver name and NUT version +DDL_DRIVER_NAME="`upsc ${DDL_DEVICE_NAME} driver.name 2>/dev/null`" +DDL_NUT_VERSION="`upsc ${DDL_DEVICE_NAME} driver.version 2>/dev/null`" +# TODO: check if a similar file exists, to update Report nb +DDL_REPORT_NUMBER="01" +DDL_FILENAME="${DDL_MFR}__${DDL_MODEL}__${DDL_DRIVER_NAME}__${DDL_NUT_VERSION}__${DDL_REPORT_NUMBER}.dev" + +# Dump device data into the file +echo "${testResult}" > ${DDL_FILENAME} +echo "${DDL_FILENAME} generated using ${DDL_DEVICE_NAME} " diff --git a/tools/nut-scanner/Makefile.am b/tools/nut-scanner/Makefile.am index 56278ee..558cb23 100644 --- a/tools/nut-scanner/Makefile.am +++ b/tools/nut-scanner/Makefile.am @@ -12,9 +12,9 @@ libnutscan_la_SOURCES = scan_nut.c scan_ipmi.c \ nutscan-device.c nutscan-ip.c nutscan-display.c \ nutscan-init.c scan_usb.c scan_snmp.c scan_xml_http.c \ scan_avahi.c scan_eaton_serial.c nutscan-serial.c \ - $(top_srcdir)/drivers/serial.c \ - $(top_srcdir)/drivers/bcmxcp_ser.c \ - $(top_srcdir)/common/common.c + ../../drivers/serial.c \ + ../../drivers/bcmxcp_ser.c \ + ../../common/common.c libnutscan_la_LIBADD = $(NETLIBS) $(LIBLTDL_LIBS) libnutscan_la_LDFLAGS = $(SERLIBS) -version-info 1:0:0 libnutscan_la_CFLAGS = -I$(top_srcdir)/clients -I$(top_srcdir)/include $(LIBLTDL_CFLAGS) -I$(top_srcdir)/drivers diff --git a/tools/nut-scanner/Makefile.in b/tools/nut-scanner/Makefile.in index dedf63c..3ff07cd 100644 --- a/tools/nut-scanner/Makefile.in +++ b/tools/nut-scanner/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,23 +17,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -64,9 +91,9 @@ target_triplet = @target@ @WITH_IPMI_TRUE@am__append_7 = $(LIBIPMI_CFLAGS) @WITH_DEV_FALSE@am__append_8 = nut-scan.h nutscan-device.h nutscan-ip.h nutscan-init.h nutscan-serial.h subdir = tools/nut-scanner -DIST_COMMON = README $(am__dist_noinst_HEADERS_DIST) \ - $(am__include_HEADERS_DIST) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp $(am__dist_noinst_HEADERS_DIST) \ + $(am__include_HEADERS_DIST) README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -129,16 +156,23 @@ am__DEPENDENCIES_1 = @WITH_SSL_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) libnutscan_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) +am__dirstamp = $(am__leading_dot)dirstamp am_libnutscan_la_OBJECTS = libnutscan_la-scan_nut.lo \ libnutscan_la-scan_ipmi.lo libnutscan_la-nutscan-device.lo \ libnutscan_la-nutscan-ip.lo libnutscan_la-nutscan-display.lo \ libnutscan_la-nutscan-init.lo libnutscan_la-scan_usb.lo \ libnutscan_la-scan_snmp.lo libnutscan_la-scan_xml_http.lo \ libnutscan_la-scan_avahi.lo libnutscan_la-scan_eaton_serial.lo \ - libnutscan_la-nutscan-serial.lo libnutscan_la-serial.lo \ - libnutscan_la-bcmxcp_ser.lo libnutscan_la-common.lo + libnutscan_la-nutscan-serial.lo \ + ../../drivers/libnutscan_la-serial.lo \ + ../../drivers/libnutscan_la-bcmxcp_ser.lo \ + ../../common/libnutscan_la-common.lo libnutscan_la_OBJECTS = $(am_libnutscan_la_OBJECTS) -libnutscan_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +libnutscan_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libnutscan_la_CFLAGS) \ $(CFLAGS) $(libnutscan_la_LDFLAGS) $(LDFLAGS) -o $@ @WITH_LIBLTDL_TRUE@am_libnutscan_la_rpath = -rpath $(libdir) @@ -146,22 +180,43 @@ PROGRAMS = $(bin_PROGRAMS) am_nut_scanner_OBJECTS = nut_scanner-nut-scanner.$(OBJEXT) nut_scanner_OBJECTS = $(am_nut_scanner_OBJECTS) nut_scanner_DEPENDENCIES = libnutscan.la ../../common/libcommon.la -nut_scanner_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ +nut_scanner_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(nut_scanner_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libnutscan_la_SOURCES) $(nut_scanner_SOURCES) DIST_SOURCES = $(libnutscan_la_SOURCES) $(nut_scanner_SOURCES) am__can_run_installinfo = \ @@ -174,12 +229,30 @@ am__dist_noinst_HEADERS_DIST = nutscan-usb.h nutscan-snmp.h nut-scan.h \ am__include_HEADERS_DIST = nut-scan.h nutscan-device.h nutscan-ip.h \ nutscan-init.h HEADERS = $(dist_noinst_HEADERS) $(include_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -286,12 +359,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -336,6 +412,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -363,9 +440,9 @@ libnutscan_la_SOURCES = scan_nut.c scan_ipmi.c \ nutscan-device.c nutscan-ip.c nutscan-display.c \ nutscan-init.c scan_usb.c scan_snmp.c scan_xml_http.c \ scan_avahi.c scan_eaton_serial.c nutscan-serial.c \ - $(top_srcdir)/drivers/serial.c \ - $(top_srcdir)/drivers/bcmxcp_ser.c \ - $(top_srcdir)/common/common.c + ../../drivers/serial.c \ + ../../drivers/bcmxcp_ser.c \ + ../../common/common.c libnutscan_la_LIBADD = $(NETLIBS) $(LIBLTDL_LIBS) $(am__append_2) libnutscan_la_LDFLAGS = $(SERLIBS) -version-info 1:0:0 @@ -414,6 +491,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): + install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ @@ -440,14 +518,36 @@ uninstall-libLTLIBRARIES: clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } +../../drivers/$(am__dirstamp): + @$(MKDIR_P) ../../drivers + @: > ../../drivers/$(am__dirstamp) +../../drivers/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ../../drivers/$(DEPDIR) + @: > ../../drivers/$(DEPDIR)/$(am__dirstamp) +../../drivers/libnutscan_la-serial.lo: ../../drivers/$(am__dirstamp) \ + ../../drivers/$(DEPDIR)/$(am__dirstamp) +../../drivers/libnutscan_la-bcmxcp_ser.lo: \ + ../../drivers/$(am__dirstamp) \ + ../../drivers/$(DEPDIR)/$(am__dirstamp) +../../common/$(am__dirstamp): + @$(MKDIR_P) ../../common + @: > ../../common/$(am__dirstamp) +../../common/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ../../common/$(DEPDIR) + @: > ../../common/$(DEPDIR)/$(am__dirstamp) +../../common/libnutscan_la-common.lo: ../../common/$(am__dirstamp) \ + ../../common/$(DEPDIR)/$(am__dirstamp) + libnutscan.la: $(libnutscan_la_OBJECTS) $(libnutscan_la_DEPENDENCIES) $(EXTRA_libnutscan_la_DEPENDENCIES) - $(libnutscan_la_LINK) $(am_libnutscan_la_rpath) $(libnutscan_la_OBJECTS) $(libnutscan_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(libnutscan_la_LINK) $(am_libnutscan_la_rpath) $(libnutscan_la_OBJECTS) $(libnutscan_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ @@ -457,10 +557,12 @@ install-binPROGRAMS: $(bin_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -481,7 +583,8 @@ uninstall-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -494,18 +597,24 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + nut-scanner$(EXEEXT): $(nut_scanner_OBJECTS) $(nut_scanner_DEPENDENCIES) $(EXTRA_nut_scanner_DEPENDENCIES) @rm -f nut-scanner$(EXEEXT) - $(nut_scanner_LINK) $(nut_scanner_OBJECTS) $(nut_scanner_LDADD) $(LIBS) + $(AM_V_CCLD)$(nut_scanner_LINK) $(nut_scanner_OBJECTS) $(nut_scanner_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) + -rm -f ../../common/*.$(OBJEXT) + -rm -f ../../common/*.lo + -rm -f ../../drivers/*.$(OBJEXT) + -rm -f ../../drivers/*.lo distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-bcmxcp_ser.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-common.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../../common/$(DEPDIR)/libnutscan_la-common.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../../drivers/$(DEPDIR)/libnutscan_la-bcmxcp_ser.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../../drivers/$(DEPDIR)/libnutscan_la-serial.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-nutscan-device.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-nutscan-display.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-nutscan-init.Plo@am__quote@ @@ -518,154 +627,158 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-scan_snmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-scan_usb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-scan_xml_http.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-serial.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nut_scanner-nut-scanner.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libnutscan_la-scan_nut.lo: scan_nut.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_nut.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_nut.Tpo -c -o libnutscan_la-scan_nut.lo `test -f 'scan_nut.c' || echo '$(srcdir)/'`scan_nut.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_nut.Tpo $(DEPDIR)/libnutscan_la-scan_nut.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan_nut.c' object='libnutscan_la-scan_nut.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_nut.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_nut.Tpo -c -o libnutscan_la-scan_nut.lo `test -f 'scan_nut.c' || echo '$(srcdir)/'`scan_nut.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-scan_nut.Tpo $(DEPDIR)/libnutscan_la-scan_nut.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scan_nut.c' object='libnutscan_la-scan_nut.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_nut.lo `test -f 'scan_nut.c' || echo '$(srcdir)/'`scan_nut.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_nut.lo `test -f 'scan_nut.c' || echo '$(srcdir)/'`scan_nut.c libnutscan_la-scan_ipmi.lo: scan_ipmi.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_ipmi.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_ipmi.Tpo -c -o libnutscan_la-scan_ipmi.lo `test -f 'scan_ipmi.c' || echo '$(srcdir)/'`scan_ipmi.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_ipmi.Tpo $(DEPDIR)/libnutscan_la-scan_ipmi.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan_ipmi.c' object='libnutscan_la-scan_ipmi.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_ipmi.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_ipmi.Tpo -c -o libnutscan_la-scan_ipmi.lo `test -f 'scan_ipmi.c' || echo '$(srcdir)/'`scan_ipmi.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-scan_ipmi.Tpo $(DEPDIR)/libnutscan_la-scan_ipmi.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scan_ipmi.c' object='libnutscan_la-scan_ipmi.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_ipmi.lo `test -f 'scan_ipmi.c' || echo '$(srcdir)/'`scan_ipmi.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_ipmi.lo `test -f 'scan_ipmi.c' || echo '$(srcdir)/'`scan_ipmi.c libnutscan_la-nutscan-device.lo: nutscan-device.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-device.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-device.Tpo -c -o libnutscan_la-nutscan-device.lo `test -f 'nutscan-device.c' || echo '$(srcdir)/'`nutscan-device.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-nutscan-device.Tpo $(DEPDIR)/libnutscan_la-nutscan-device.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutscan-device.c' object='libnutscan_la-nutscan-device.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-device.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-device.Tpo -c -o libnutscan_la-nutscan-device.lo `test -f 'nutscan-device.c' || echo '$(srcdir)/'`nutscan-device.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-nutscan-device.Tpo $(DEPDIR)/libnutscan_la-nutscan-device.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutscan-device.c' object='libnutscan_la-nutscan-device.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-device.lo `test -f 'nutscan-device.c' || echo '$(srcdir)/'`nutscan-device.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-device.lo `test -f 'nutscan-device.c' || echo '$(srcdir)/'`nutscan-device.c libnutscan_la-nutscan-ip.lo: nutscan-ip.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-ip.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-ip.Tpo -c -o libnutscan_la-nutscan-ip.lo `test -f 'nutscan-ip.c' || echo '$(srcdir)/'`nutscan-ip.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-nutscan-ip.Tpo $(DEPDIR)/libnutscan_la-nutscan-ip.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutscan-ip.c' object='libnutscan_la-nutscan-ip.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-ip.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-ip.Tpo -c -o libnutscan_la-nutscan-ip.lo `test -f 'nutscan-ip.c' || echo '$(srcdir)/'`nutscan-ip.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-nutscan-ip.Tpo $(DEPDIR)/libnutscan_la-nutscan-ip.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutscan-ip.c' object='libnutscan_la-nutscan-ip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-ip.lo `test -f 'nutscan-ip.c' || echo '$(srcdir)/'`nutscan-ip.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-ip.lo `test -f 'nutscan-ip.c' || echo '$(srcdir)/'`nutscan-ip.c libnutscan_la-nutscan-display.lo: nutscan-display.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-display.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-display.Tpo -c -o libnutscan_la-nutscan-display.lo `test -f 'nutscan-display.c' || echo '$(srcdir)/'`nutscan-display.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-nutscan-display.Tpo $(DEPDIR)/libnutscan_la-nutscan-display.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutscan-display.c' object='libnutscan_la-nutscan-display.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-display.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-display.Tpo -c -o libnutscan_la-nutscan-display.lo `test -f 'nutscan-display.c' || echo '$(srcdir)/'`nutscan-display.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-nutscan-display.Tpo $(DEPDIR)/libnutscan_la-nutscan-display.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutscan-display.c' object='libnutscan_la-nutscan-display.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-display.lo `test -f 'nutscan-display.c' || echo '$(srcdir)/'`nutscan-display.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-display.lo `test -f 'nutscan-display.c' || echo '$(srcdir)/'`nutscan-display.c libnutscan_la-nutscan-init.lo: nutscan-init.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-init.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-init.Tpo -c -o libnutscan_la-nutscan-init.lo `test -f 'nutscan-init.c' || echo '$(srcdir)/'`nutscan-init.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-nutscan-init.Tpo $(DEPDIR)/libnutscan_la-nutscan-init.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutscan-init.c' object='libnutscan_la-nutscan-init.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-init.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-init.Tpo -c -o libnutscan_la-nutscan-init.lo `test -f 'nutscan-init.c' || echo '$(srcdir)/'`nutscan-init.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-nutscan-init.Tpo $(DEPDIR)/libnutscan_la-nutscan-init.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutscan-init.c' object='libnutscan_la-nutscan-init.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-init.lo `test -f 'nutscan-init.c' || echo '$(srcdir)/'`nutscan-init.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-init.lo `test -f 'nutscan-init.c' || echo '$(srcdir)/'`nutscan-init.c libnutscan_la-scan_usb.lo: scan_usb.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_usb.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_usb.Tpo -c -o libnutscan_la-scan_usb.lo `test -f 'scan_usb.c' || echo '$(srcdir)/'`scan_usb.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_usb.Tpo $(DEPDIR)/libnutscan_la-scan_usb.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan_usb.c' object='libnutscan_la-scan_usb.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_usb.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_usb.Tpo -c -o libnutscan_la-scan_usb.lo `test -f 'scan_usb.c' || echo '$(srcdir)/'`scan_usb.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-scan_usb.Tpo $(DEPDIR)/libnutscan_la-scan_usb.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scan_usb.c' object='libnutscan_la-scan_usb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_usb.lo `test -f 'scan_usb.c' || echo '$(srcdir)/'`scan_usb.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_usb.lo `test -f 'scan_usb.c' || echo '$(srcdir)/'`scan_usb.c libnutscan_la-scan_snmp.lo: scan_snmp.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_snmp.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_snmp.Tpo -c -o libnutscan_la-scan_snmp.lo `test -f 'scan_snmp.c' || echo '$(srcdir)/'`scan_snmp.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_snmp.Tpo $(DEPDIR)/libnutscan_la-scan_snmp.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan_snmp.c' object='libnutscan_la-scan_snmp.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_snmp.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_snmp.Tpo -c -o libnutscan_la-scan_snmp.lo `test -f 'scan_snmp.c' || echo '$(srcdir)/'`scan_snmp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-scan_snmp.Tpo $(DEPDIR)/libnutscan_la-scan_snmp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scan_snmp.c' object='libnutscan_la-scan_snmp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_snmp.lo `test -f 'scan_snmp.c' || echo '$(srcdir)/'`scan_snmp.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_snmp.lo `test -f 'scan_snmp.c' || echo '$(srcdir)/'`scan_snmp.c libnutscan_la-scan_xml_http.lo: scan_xml_http.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_xml_http.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_xml_http.Tpo -c -o libnutscan_la-scan_xml_http.lo `test -f 'scan_xml_http.c' || echo '$(srcdir)/'`scan_xml_http.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_xml_http.Tpo $(DEPDIR)/libnutscan_la-scan_xml_http.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan_xml_http.c' object='libnutscan_la-scan_xml_http.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_xml_http.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_xml_http.Tpo -c -o libnutscan_la-scan_xml_http.lo `test -f 'scan_xml_http.c' || echo '$(srcdir)/'`scan_xml_http.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-scan_xml_http.Tpo $(DEPDIR)/libnutscan_la-scan_xml_http.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scan_xml_http.c' object='libnutscan_la-scan_xml_http.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_xml_http.lo `test -f 'scan_xml_http.c' || echo '$(srcdir)/'`scan_xml_http.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_xml_http.lo `test -f 'scan_xml_http.c' || echo '$(srcdir)/'`scan_xml_http.c libnutscan_la-scan_avahi.lo: scan_avahi.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_avahi.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_avahi.Tpo -c -o libnutscan_la-scan_avahi.lo `test -f 'scan_avahi.c' || echo '$(srcdir)/'`scan_avahi.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_avahi.Tpo $(DEPDIR)/libnutscan_la-scan_avahi.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan_avahi.c' object='libnutscan_la-scan_avahi.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_avahi.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_avahi.Tpo -c -o libnutscan_la-scan_avahi.lo `test -f 'scan_avahi.c' || echo '$(srcdir)/'`scan_avahi.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-scan_avahi.Tpo $(DEPDIR)/libnutscan_la-scan_avahi.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scan_avahi.c' object='libnutscan_la-scan_avahi.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_avahi.lo `test -f 'scan_avahi.c' || echo '$(srcdir)/'`scan_avahi.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_avahi.lo `test -f 'scan_avahi.c' || echo '$(srcdir)/'`scan_avahi.c libnutscan_la-scan_eaton_serial.lo: scan_eaton_serial.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_eaton_serial.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_eaton_serial.Tpo -c -o libnutscan_la-scan_eaton_serial.lo `test -f 'scan_eaton_serial.c' || echo '$(srcdir)/'`scan_eaton_serial.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_eaton_serial.Tpo $(DEPDIR)/libnutscan_la-scan_eaton_serial.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan_eaton_serial.c' object='libnutscan_la-scan_eaton_serial.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_eaton_serial.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_eaton_serial.Tpo -c -o libnutscan_la-scan_eaton_serial.lo `test -f 'scan_eaton_serial.c' || echo '$(srcdir)/'`scan_eaton_serial.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-scan_eaton_serial.Tpo $(DEPDIR)/libnutscan_la-scan_eaton_serial.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scan_eaton_serial.c' object='libnutscan_la-scan_eaton_serial.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_eaton_serial.lo `test -f 'scan_eaton_serial.c' || echo '$(srcdir)/'`scan_eaton_serial.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_eaton_serial.lo `test -f 'scan_eaton_serial.c' || echo '$(srcdir)/'`scan_eaton_serial.c libnutscan_la-nutscan-serial.lo: nutscan-serial.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-serial.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-serial.Tpo -c -o libnutscan_la-nutscan-serial.lo `test -f 'nutscan-serial.c' || echo '$(srcdir)/'`nutscan-serial.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-nutscan-serial.Tpo $(DEPDIR)/libnutscan_la-nutscan-serial.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutscan-serial.c' object='libnutscan_la-nutscan-serial.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-serial.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-serial.Tpo -c -o libnutscan_la-nutscan-serial.lo `test -f 'nutscan-serial.c' || echo '$(srcdir)/'`nutscan-serial.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-nutscan-serial.Tpo $(DEPDIR)/libnutscan_la-nutscan-serial.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutscan-serial.c' object='libnutscan_la-nutscan-serial.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-serial.lo `test -f 'nutscan-serial.c' || echo '$(srcdir)/'`nutscan-serial.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-serial.lo `test -f 'nutscan-serial.c' || echo '$(srcdir)/'`nutscan-serial.c -libnutscan_la-serial.lo: $(top_srcdir)/drivers/serial.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-serial.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-serial.Tpo -c -o libnutscan_la-serial.lo `test -f '$(top_srcdir)/drivers/serial.c' || echo '$(srcdir)/'`$(top_srcdir)/drivers/serial.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-serial.Tpo $(DEPDIR)/libnutscan_la-serial.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/drivers/serial.c' object='libnutscan_la-serial.lo' libtool=yes @AMDEPBACKSLASH@ +../../drivers/libnutscan_la-serial.lo: ../../drivers/serial.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT ../../drivers/libnutscan_la-serial.lo -MD -MP -MF ../../drivers/$(DEPDIR)/libnutscan_la-serial.Tpo -c -o ../../drivers/libnutscan_la-serial.lo `test -f '../../drivers/serial.c' || echo '$(srcdir)/'`../../drivers/serial.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../../drivers/$(DEPDIR)/libnutscan_la-serial.Tpo ../../drivers/$(DEPDIR)/libnutscan_la-serial.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../../drivers/serial.c' object='../../drivers/libnutscan_la-serial.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-serial.lo `test -f '$(top_srcdir)/drivers/serial.c' || echo '$(srcdir)/'`$(top_srcdir)/drivers/serial.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o ../../drivers/libnutscan_la-serial.lo `test -f '../../drivers/serial.c' || echo '$(srcdir)/'`../../drivers/serial.c -libnutscan_la-bcmxcp_ser.lo: $(top_srcdir)/drivers/bcmxcp_ser.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-bcmxcp_ser.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-bcmxcp_ser.Tpo -c -o libnutscan_la-bcmxcp_ser.lo `test -f '$(top_srcdir)/drivers/bcmxcp_ser.c' || echo '$(srcdir)/'`$(top_srcdir)/drivers/bcmxcp_ser.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-bcmxcp_ser.Tpo $(DEPDIR)/libnutscan_la-bcmxcp_ser.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/drivers/bcmxcp_ser.c' object='libnutscan_la-bcmxcp_ser.lo' libtool=yes @AMDEPBACKSLASH@ +../../drivers/libnutscan_la-bcmxcp_ser.lo: ../../drivers/bcmxcp_ser.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT ../../drivers/libnutscan_la-bcmxcp_ser.lo -MD -MP -MF ../../drivers/$(DEPDIR)/libnutscan_la-bcmxcp_ser.Tpo -c -o ../../drivers/libnutscan_la-bcmxcp_ser.lo `test -f '../../drivers/bcmxcp_ser.c' || echo '$(srcdir)/'`../../drivers/bcmxcp_ser.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../../drivers/$(DEPDIR)/libnutscan_la-bcmxcp_ser.Tpo ../../drivers/$(DEPDIR)/libnutscan_la-bcmxcp_ser.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../../drivers/bcmxcp_ser.c' object='../../drivers/libnutscan_la-bcmxcp_ser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-bcmxcp_ser.lo `test -f '$(top_srcdir)/drivers/bcmxcp_ser.c' || echo '$(srcdir)/'`$(top_srcdir)/drivers/bcmxcp_ser.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o ../../drivers/libnutscan_la-bcmxcp_ser.lo `test -f '../../drivers/bcmxcp_ser.c' || echo '$(srcdir)/'`../../drivers/bcmxcp_ser.c -libnutscan_la-common.lo: $(top_srcdir)/common/common.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-common.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-common.Tpo -c -o libnutscan_la-common.lo `test -f '$(top_srcdir)/common/common.c' || echo '$(srcdir)/'`$(top_srcdir)/common/common.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-common.Tpo $(DEPDIR)/libnutscan_la-common.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/common/common.c' object='libnutscan_la-common.lo' libtool=yes @AMDEPBACKSLASH@ +../../common/libnutscan_la-common.lo: ../../common/common.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT ../../common/libnutscan_la-common.lo -MD -MP -MF ../../common/$(DEPDIR)/libnutscan_la-common.Tpo -c -o ../../common/libnutscan_la-common.lo `test -f '../../common/common.c' || echo '$(srcdir)/'`../../common/common.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../../common/$(DEPDIR)/libnutscan_la-common.Tpo ../../common/$(DEPDIR)/libnutscan_la-common.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../../common/common.c' object='../../common/libnutscan_la-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-common.lo `test -f '$(top_srcdir)/common/common.c' || echo '$(srcdir)/'`$(top_srcdir)/common/common.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o ../../common/libnutscan_la-common.lo `test -f '../../common/common.c' || echo '$(srcdir)/'`../../common/common.c nut_scanner-nut-scanner.o: nut-scanner.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nut_scanner_CFLAGS) $(CFLAGS) -MT nut_scanner-nut-scanner.o -MD -MP -MF $(DEPDIR)/nut_scanner-nut-scanner.Tpo -c -o nut_scanner-nut-scanner.o `test -f 'nut-scanner.c' || echo '$(srcdir)/'`nut-scanner.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nut_scanner-nut-scanner.Tpo $(DEPDIR)/nut_scanner-nut-scanner.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nut-scanner.c' object='nut_scanner-nut-scanner.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nut_scanner_CFLAGS) $(CFLAGS) -MT nut_scanner-nut-scanner.o -MD -MP -MF $(DEPDIR)/nut_scanner-nut-scanner.Tpo -c -o nut_scanner-nut-scanner.o `test -f 'nut-scanner.c' || echo '$(srcdir)/'`nut-scanner.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nut_scanner-nut-scanner.Tpo $(DEPDIR)/nut_scanner-nut-scanner.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nut-scanner.c' object='nut_scanner-nut-scanner.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nut_scanner_CFLAGS) $(CFLAGS) -c -o nut_scanner-nut-scanner.o `test -f 'nut-scanner.c' || echo '$(srcdir)/'`nut-scanner.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nut_scanner_CFLAGS) $(CFLAGS) -c -o nut_scanner-nut-scanner.o `test -f 'nut-scanner.c' || echo '$(srcdir)/'`nut-scanner.c nut_scanner-nut-scanner.obj: nut-scanner.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nut_scanner_CFLAGS) $(CFLAGS) -MT nut_scanner-nut-scanner.obj -MD -MP -MF $(DEPDIR)/nut_scanner-nut-scanner.Tpo -c -o nut_scanner-nut-scanner.obj `if test -f 'nut-scanner.c'; then $(CYGPATH_W) 'nut-scanner.c'; else $(CYGPATH_W) '$(srcdir)/nut-scanner.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nut_scanner-nut-scanner.Tpo $(DEPDIR)/nut_scanner-nut-scanner.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nut-scanner.c' object='nut_scanner-nut-scanner.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nut_scanner_CFLAGS) $(CFLAGS) -MT nut_scanner-nut-scanner.obj -MD -MP -MF $(DEPDIR)/nut_scanner-nut-scanner.Tpo -c -o nut_scanner-nut-scanner.obj `if test -f 'nut-scanner.c'; then $(CYGPATH_W) 'nut-scanner.c'; else $(CYGPATH_W) '$(srcdir)/nut-scanner.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nut_scanner-nut-scanner.Tpo $(DEPDIR)/nut_scanner-nut-scanner.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nut-scanner.c' object='nut_scanner-nut-scanner.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nut_scanner_CFLAGS) $(CFLAGS) -c -o nut_scanner-nut-scanner.obj `if test -f 'nut-scanner.c'; then $(CYGPATH_W) 'nut-scanner.c'; else $(CYGPATH_W) '$(srcdir)/nut-scanner.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nut_scanner_CFLAGS) $(CFLAGS) -c -o nut_scanner-nut-scanner.obj `if test -f 'nut-scanner.c'; then $(CYGPATH_W) 'nut-scanner.c'; else $(CYGPATH_W) '$(srcdir)/nut-scanner.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs + -rm -rf ../../common/.libs ../../common/_libs + -rm -rf ../../drivers/.libs ../../drivers/_libs install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ @@ -688,26 +801,15 @@ uninstall-includeHEADERS: files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -719,15 +821,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -736,6 +834,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -808,6 +921,10 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -rm -f ../../common/$(DEPDIR)/$(am__dirstamp) + -rm -f ../../common/$(am__dirstamp) + -rm -f ../../drivers/$(DEPDIR)/$(am__dirstamp) + -rm -f ../../drivers/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -819,7 +936,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -rf ../../common/$(DEPDIR) ../../drivers/$(DEPDIR) ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -865,7 +982,7 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -rf ../../common/$(DEPDIR) ../../drivers/$(DEPDIR) ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -887,20 +1004,21 @@ uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \ .MAKE: all check install install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libLTLIBRARIES clean-libtool ctags \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-includeHEADERS uninstall-libLTLIBRARIES diff --git a/tools/nut-scanner/nutscan-snmp.h b/tools/nut-scanner/nutscan-snmp.h index c66aa96..38202a0 100644 --- a/tools/nut-scanner/nutscan-snmp.h +++ b/tools/nut-scanner/nutscan-snmp.h @@ -27,24 +27,24 @@ typedef struct { /* SNMP IDs device table */ static snmp_device_id_t snmp_device_table[] = { - { ".1.3.6.1.4.1.4555.1.1.1.1.1.1.0" , "netvision", ".1.3.6.1.4.1.4555.1.1.1"}, - { ".1.3.6.1.4.1.4779.1.3.5.2.1.24.1" , "baytech", NULL}, - { ".1.3.6.1.4.1.318.1.1.1.1.1.1.0" , "apcc", NULL}, + { ".1.3.6.1.4.1.13742.1.1.12.0" , "raritan", ".1.3.6.1.4.1.13742"}, + { "" , "xppc", ".1.3.6.1.4.1.935"}, { "1.3.6.1.4.1.534.1.1.2.0" , "pw", ".1.3.6.1.4.1.534.1"}, + { "1.3.6.1.2.1.33.1.1.1.0" , "ietf", ".1.3.6.1.2.1.33"}, + { ".1.3.6.1.4.1.232.165.3.1.1.0" , "cpqpower", ".1.3.6.1.4.1.232.165.3"}, { ".1.3.6.1.4.1.17373.3.1.1.0" , "aphel_genesisII", ".1.3.6.1.4.1.17373"}, { ".1.3.6.1.4.1.534.6.6.6.1.1.12.0" , "aphel_revelation", ".1.3.6.1.4.1.534.6.6.6"}, { ".1.3.6.1.4.1.534.6.6.7.1.2.1.2.0" , "eaton_epdu", ".1.3.6.1.4.1.534.6.6.7"}, { "" , "pulizzi_monitored", NULL}, { ".1.3.6.1.4.1.20677.1" , "pulizzi_switched1", ".1.3.6.1.4.1.20677.1"}, { ".1.3.6.1.4.1.20677.1" , "pulizzi_switched2", ".1.3.6.1.4.1.20677.2"}, - { ".1.3.6.1.4.1.2947.1.1.2.0" , "bestpower", NULL}, { ".1.3.6.1.4.1.3808.1.1.1.1.1.1.0" , "cyberpower", ".1.3.6.1.4.1.3808"}, - { "" , "xppc", ".1.3.6.1.4.1.935"}, - { "" , "delta_ups", ".1.3.6.1.4.1.2254.2.4"}, { ".1.3.6.1.4.1.705.1.1.1.0" , "mge", ".1.3.6.1.4.1.705.1"}, - { ".1.3.6.1.4.1.232.165.3.1.1.0" , "cpqpower", ".1.3.6.1.4.1.232.165.3"}, - { ".1.3.6.1.4.1.13742.1.1.12.0" , "raritan", ".1.3.6.1.4.1.13742"}, - { "1.3.6.1.2.1.33.1.1.1.0" , "ietf", ".1.3.6.1.2.1.33"}, + { "" , "delta_ups", ".1.3.6.1.4.1.2254.2.4"}, + { ".1.3.6.1.4.1.4555.1.1.1.1.1.1.0" , "netvision", ".1.3.6.1.4.1.4555.1.1.1"}, + { ".1.3.6.1.4.1.318.1.1.1.1.1.1.0" , "apcc", NULL}, + { ".1.3.6.1.4.1.4779.1.3.5.2.1.24.1" , "baytech", NULL}, + { ".1.3.6.1.4.1.2947.1.1.2.0" , "bestpower", NULL}, /* Terminating entry */ { NULL, NULL, NULL} }; diff --git a/tools/nut-scanner/nutscan-usb.h b/tools/nut-scanner/nutscan-usb.h index c31466f..a35513a 100644 --- a/tools/nut-scanner/nutscan-usb.h +++ b/tools/nut-scanner/nutscan-usb.h @@ -52,6 +52,7 @@ static usb_device_id_t usb_device_table[] = { { 0x047c, 0xffff, "usbhid-ups" }, { 0x04b4, 0x5500, "riello_usb" }, { 0x04d8, 0xd004, "usbhid-ups" }, + { 0x04d8, 0xd005, "usbhid-ups" }, { 0x050d, 0x0375, "usbhid-ups" }, { 0x050d, 0x0551, "usbhid-ups" }, { 0x050d, 0x0750, "usbhid-ups" }, @@ -60,14 +61,16 @@ static usb_device_id_t usb_device_table[] = { { 0x050d, 0x0910, "usbhid-ups" }, { 0x050d, 0x0912, "usbhid-ups" }, { 0x050d, 0x0980, "usbhid-ups" }, + { 0x050d, 0x0f51, "usbhid-ups" }, { 0x050d, 0x1100, "usbhid-ups" }, + { 0x051d, 0x0000, "usbhid-ups" }, { 0x051d, 0x0002, "usbhid-ups" }, { 0x051d, 0x0003, "usbhid-ups" }, { 0x0592, 0x0002, "bcmxcp_usb" }, { 0x0592, 0x0004, "usbhid-ups" }, { 0x05b8, 0x0000, "blazer_usb" }, { 0x0665, 0x5161, "blazer_usb" }, - { 0x06da, 0x0002, "blazer_usb" }, + { 0x06da, 0x0002, "bcmxcp_usb" }, { 0x06da, 0x0003, "blazer_usb" }, { 0x06da, 0x0004, "blazer_usb" }, { 0x06da, 0x0005, "blazer_usb" }, @@ -111,6 +114,7 @@ static usb_device_id_t usb_device_table[] = { { 0x09ae, 0x4006, "usbhid-ups" }, { 0x09ae, 0x4007, "usbhid-ups" }, { 0x09ae, 0x4008, "usbhid-ups" }, + { 0x0d9f, 0x0001, "usbhid-ups" }, { 0x0d9f, 0x0004, "usbhid-ups" }, { 0x0d9f, 0x00a2, "usbhid-ups" }, { 0x0d9f, 0x00a3, "usbhid-ups" }, @@ -120,6 +124,7 @@ static usb_device_id_t usb_device_table[] = { { 0x0f03, 0x0001, "blazer_usb" }, { 0x10af, 0x0001, "usbhid-ups" }, { 0x10af, 0x0004, "usbhid-ups" }, + { 0x10af, 0x0008, "usbhid-ups" }, { 0x14f0, 0x00c9, "blazer_usb" }, { 0xffff, 0x0000, "blazer_usb" }, /* Terminating entry */ diff --git a/tools/nut-usbinfo.pl b/tools/nut-usbinfo.pl index 989cef2..51a60e1 100755 --- a/tools/nut-usbinfo.pl +++ b/tools/nut-usbinfo.pl @@ -111,7 +111,7 @@ sub gen_usb_files open my $outputUPower, ">$outputUPower" || die "error $outputUPower : $!"; print $outputUPower '##############################################################################################################'."\n"; print $outputUPower '# Uninterruptible Power Supplies with USB HID interfaces'."\n#\n"; - print $outputUPower '# to keep up to date, monitor: http://svn.debian.org/wsvn/nut/trunk/scripts/upower/95-upower-hid.rules'."\n\n"; + print $outputUPower '# to keep up to date, monitor https://github.com/networkupstools/nut/commits/master/scripts/upower/95-upower-hid.rules'."\n\n"; print $outputUPower '# only support USB, else ignore'."\n".'SUBSYSTEM!="usb", GOTO="up_hid_end"'."\n\n"; print $outputUPower '# if usbraw device, ignore'."\n".'KERNEL!="hiddev*", GOTO="up_hid_end"'."\n\n"; print $outputUPower '# if an interface, ignore'."\n".'ENV{DEVTYPE}=="usb_interface", GOTO="up_hid_end"'."\n\n"; @@ -169,7 +169,7 @@ sub gen_usb_files print $out_devd "\tmatch \"vendor\"\t\t\"$vendorId\";\n"; # print $out_devd "\tmatch \"product\"\t\t\"$productId\";\n"; - print $out_devd "\taction \"chgrp \@RUN_AS_GROUP\@ /dev/\$device-name*; chmod g+rw /dev/\$device-name*\";\n"; + print $out_devd "\taction \"chgrp \@RUN_AS_GROUP\@ /dev/\$cdev; chmod g+rw /dev/\$cdev\";\n"; print $out_devd "};\n"; # UPower device entry (only for USB/HID devices!) @@ -209,7 +209,7 @@ sub gen_usb_files sub find_usbdevs { # maybe there's an option to turn off all .* files, but anyway this is stupid - return $File::Find::prune = 1 if ($_ eq '.svn') || ($_ =~ /^\.#/); + return $File::Find::prune = 1 if ($_ eq '.svn') || ($_ =~ /^\.#/) || ($_ =~ /\.orig$/); my $nameFile=$_; my $lastComment=""; @@ -265,8 +265,8 @@ sub find_usbdevs } } - # store date (to be optimized) - # and don't overwritte actual vendor names with empty values + # store data (to be optimized) + # and don't overwrite actual vendor names with empty values if( (!$vendorName{$VendorID}) or (($vendorName{$VendorID} eq "") and ($VendorName ne "")) ) { $vendorName{$VendorID}=trim($VendorName);