Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information