-
Notifications
You must be signed in to change notification settings - Fork 1.9k
initramfs: fix zpool get argument order #14572
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
Conversation
When using the zfs initramfs scripts on my system, I get various errors at initramfs stage, such as: cannot open '-o': name must begin with a letter My zfs binaries are compiled with musl libc, which may be why this happens. In any case, fix the argument order to make the zpool binary happy, and to match its --help output. Signed-off-by: Daniel Kolesa <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
glibc's getopt does some magic to support non-standard orders. That GNUism got into the code by mistake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this getopt ordering issue.
When using the zfs initramfs scripts on my system, I get various errors at initramfs stage, such as: cannot open '-o': name must begin with a letter My zfs binaries are compiled with musl libc, which may be why this happens. In any case, fix the argument order to make the zpool binary happy, and to match its --help output. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Richard Yao <[email protected]> Signed-off-by: Daniel Kolesa <[email protected]> Closes openzfs#14572
When using the zfs initramfs scripts on my system, I get various errors at initramfs stage, such as: cannot open '-o': name must begin with a letter My zfs binaries are compiled with musl libc, which may be why this happens. In any case, fix the argument order to make the zpool binary happy, and to match its --help output. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Richard Yao <[email protected]> Signed-off-by: Daniel Kolesa <[email protected]> Closes #14572
When using the zfs initramfs scripts on my system, I get various errors at initramfs stage, such as: cannot open '-o': name must begin with a letter My zfs binaries are compiled with musl libc, which may be why this happens. In any case, fix the argument order to make the zpool binary happy, and to match its --help output. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Richard Yao <[email protected]> Signed-off-by: Daniel Kolesa <[email protected]> Closes openzfs#14572
When using the zfs initramfs scripts on my system, I get various errors at initramfs stage, such as: cannot open '-o': name must begin with a letter My zfs binaries are compiled with musl libc, which may be why this happens. In any case, fix the argument order to make the zpool binary happy, and to match its --help output. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Richard Yao <[email protected]> Signed-off-by: Daniel Kolesa <[email protected]> Closes openzfs#14572
Motivation and Context
When using the zfs initramfs scripts on my system, I get various errors at initramfs stage, such as:
My zfs binaries are compiled with musl libc (as a part of the https://chimera-linux.org/ project, which utilizes
initramfs-tools
, and therefore also the supporting scripts here), which may be why this happens. Or maybe it never worked at all, I have no way to test this on a glibc system.Description
Fix the argument order to match the
zpool get
output, and to make my builds happy.How Has This Been Tested?
I rebuilt my initramfs with these changes applied, and there are no more error messages. Since it's a simple change to follow posixly-correct argument order, it will not break any other configurations.
Types of changes
Checklist:
Signed-off-by
.