Introduce sdcommands
option and shutdown.default
INSTCMD to all drivers#2686
Merged
jimklimov merged 97 commits intonetworkupstools:masterfrom jimklimov:issue-2670Dec 7, 2024
+1,637-473
Commits
Commits on Nov 18, 2024
- committed
- committed
- committed
drivers/adelsystem_cbi.c: update to use "sdcommands" and move logic from upsdrv_shutdown() to upscmd("shutdown.stayoff") [networkupstools#2670]
committed- committed
- committed
- committed
- committed
- committed
- committed
- committed
drivers/belkin.c: update to use "sdcommands" and move logic from upsdrv_shutdown() to upscmd("shutdown.return") [networkupstools#2670]
committeddrivers/belkinunv.c: update to use "sdcommands" (if customized by user); revise warning message [networkupstools#2670]
committeddrivers/bestfcom.c: update to use "sdcommands" and move logic from upsdrv_shutdown() to upscmd("shutdown.return"); newly support INSTCMD at all [networkupstools#2670]
committeddrivers/bestfortress.c: update to use "sdcommands" and move logic from upsdrv_shutdown() to upscmd("shutdown.return") [networkupstools#2670]
committeddrivers/bestuferrups.c: update to use "sdcommands" and move logic from upsdrv_shutdown() to upscmd("shutdown.return"); newly support INSTCMD at all [networkupstools#2670]
committed- committed
- committed
- committed
- committed
- committed
- committed
drivers/etapro.c: update to use "sdcommands" and move logic from upsdrv_shutdown() to upscmd("shutdown.return") [networkupstools#2670]
committeddrivers/gamatronic.c: update to use "sdcommands" and move logic from upsdrv_shutdown() to upscmd("shutdown.return"); newly support INSTCMD at all [networkupstools#2670]
committed- committed
drivers/generic_gpio_common.c: update to use "sdcommands" (if customized by user) [networkupstools#2670]
committed
Commits on Nov 19, 2024
drivers/generic_modbus.c: update to use "sdcommands" and move logic from upsdrv_shutdown() to upscmd("shutdown.stayoff") [networkupstools#2670]
committed- committed
- committed
- committed
drivers/isbmex.c: update to use "sdcommands" and move logic from upsdrv_shutdown() to upscmd("shutdown.stayoff"); newly support INSTCMD at all [networkupstools#2670]
committed- committed
- committed
- committed
- committed
- committed
drivers/masterguard.c: update to use "sdcommands" and move logic from upsdrv_shutdown() to upscmd("shutdown.return"); newly support INSTCMD at all [networkupstools#2670]
committed- committed
- committed
- committed
- committed
- committed
drivers/nutdrv_atcl_usb.c: update to use "sdcommands" and move logic from upsdrv_shutdown() to upscmd("shutdown.stayoff"); newly support INSTCMD at all [networkupstools#2670]
committeddrivers/nutdrv_siemens_sitop.c: update to use "sdcommands" (if customized by user) [networkupstools#2670]
committed- committed
- committed
- committed
drivers/phoenixcontact_modbus.c: update to use "sdcommands" (if customized by user) [networkupstools#2670]
committeddrivers/pijuice.c: update to use "sdcommands" and move logic from upsdrv_shutdown() to upscmd("shutdown.stayoff"); newly support INSTCMD at all [networkupstools#2670]
committed- committed
- committed
- committed
- committed
drivers/richcomm_usb.c: update to use "sdcommands" and move logic from upsdrv_shutdown() to upscmd("shutdown.return"); newly support INSTCMD at all [networkupstools#2670]
committed- committed
- committed
- committed
- committed
- committed
- committed
drivers/snmp-ups.c: update to use "sdcommands" (if customized by user), by default chain the originally used sequence in upsdrv_shutdown() [networkupstools#2670]
committed- committed
- committed
- committed
- committed
- committed
- committed
- committed
drivers/usbhid-ups.c: update to use "sdcommands" (if customized by user), by default chain the originally used sequence in upsdrv_shutdown() [networkupstools#2670]
committedinclude/common.h, docs/new-drivers.txt, NEWS.adoc: define common EF_EXIT_FAILURE and EF_EXIT_SUCCESS for set_exit_flag(int) methods [networkupstools#2670]
committeddrivers/*.c: use common EF_EXIT_FAILURE and EF_EXIT_SUCCESS arg values for set_exit_flag(int) methods [networkupstools#2670]
committeddrivers/*.c, drivers/main.h: introduce and use a common handling_upsdrv_shutdown flag to exit or not after upsdrv_shutdown() and individual power-state related INSTCMDs [networkupstools#2670]
committed- committed
- committed
drivers/main.{c,h}, docs: introduce
shutdown.default
INSTCMD concept and upsdrv_shutdown_default() shared method [networkupstools#2670]committed- committed
drivers/main.c: implement INSTCMD "shutdown.default" as a way to call upsdrv_shutdown() in any driver [networkupstools#2670]
committeddrivers/main.c: do_loop_shutdown_commands(): shortcut for "shutdown.default" support [networkupstools#2670]
committeddrivers/main.{c,h}: rename upsdrv_shutdown_default() => upsdrv_shutdown_sdcommands_or_default() less ambiguously [networkupstools#2670]
committeddrivers/main.{c,h}: call upsdrv_shutdown_sdcommands_or_default() not default upsdrv_shutdown() as the implementation of forceshutdown() and "driver.killpower" INSTCMD (e.g. via
drivername -k
) [ne…committeddrivers/main.{c,h}, drivers/dstate.c: introduce main_instcmd_fallback() so drivers might implement their own "shutdown.default" at will [networkupstools#2670]
committeddrivers/main.{c,h}: introduce MAX_SDCOMMANDS_DEPTH for do_loop_shutdown_commands() [networkupstools#2670]
committed- committed
drivers/*.c: simplify upsdrv_shutdown() back, as only "shutdown.default" implementations again [networkupstools#2670]
committeddrivers/main.c: move do_forceshutdown handling to be after upsdrv_initinfo() where we register INSTCMD handlers [networkupstools#2670]
committedRevert "drivers/main.{c,h}, drivers/dstate.c: introduce main_instcmd_fallback() so drivers might implement their own "shutdown.default" at will [networkupstools#2670]"
committeddrivers/main.c: do_loop_shutdown_commands(): handle "shutdown.default" as upsdrv_shutdown() in main loop too [networkupstools#2670]
committed
Commits on Nov 30, 2024
Commits on Dec 1, 2024
Commits on Dec 2, 2024
- authored
drivers/dstate.c: revise logging of "Got INSTCMD, but driver lacks a handler" [networkupstools#2686]
committed- committed
- committed
- committed
drivers/upsdrvquery.c, NEWS.adoc: upsdrvquery_read_timeout(): fix private use of timeval={-1,-1} as select(..., NULL) for indefinite wait [networkupstools#1922, networkupstools#2392, networkupstool…
committed