diff options
author | Colin Booth <colin@heliocat.net> | 2021-03-08 22:02:06 -0800 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2021-03-10 12:37:04 +0100 |
commit | d5fd7d1ff201db49c10704db0d51cdbb23bc177b (patch) | |
tree | 7923a09978dc2d82656ab70b6e3fdfb493a3edc7 /shutdown | |
parent | c1687e7f431e8ec0bd23a9b616715f43055068ce (diff) | |
download | runit-void-d5fd7d1ff201db49c10704db0d51cdbb23bc177b.tar.gz runit-void-d5fd7d1ff201db49c10704db0d51cdbb23bc177b.tar.xz runit-void-d5fd7d1ff201db49c10704db0d51cdbb23bc177b.zip |
halt: switch __progname tests to use strncmp
The pending change to allow for alternate init power controls requires that the halt binary provided here be somewhat less strict in its argv[0] matching in order to allow for halt, reboot, and poweroff to still function in situations where the binary has been renamed. This switches from strcmp(__progname, "string") to strncmp(__progname, "string", len), where len is the name of the power command sans any suffix. Signed-off-by: Colin Booth <colin@heliocat.net>
Diffstat (limited to 'shutdown')
0 files changed, 0 insertions, 0 deletions