Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

halt: switch __progname tests to use strncmp #70

Merged
merged 1 commit into from Mar 10, 2021

Commits on Mar 9, 2021

  1. 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>
    heliocat committed Mar 9, 2021
    Copy the full SHA
    2e5f734 View commit details
    Browse the repository at this point in the history