-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
sfdisk return 1 with successfully stop sfdisk #1413
Comments
It uses standard EXIT_ stdlib.h macros:
it means 0 for success. Do you have an example when it returns 1 ? |
We run the sfdisk like below scripts, in ksh:
eval ${a} Thanks, |
The exit code works as expected. The problem is that sfdisk does not write an empty disklabel by default (see man page). You have to specify "label: dos" to force it to write an empty label. Unfortunately, there is a bug and this feature does not work as expected when empty partitions are specified (fixed now). For your use case, you need
|
Thanks for your report! |
Based on code, seems the return value of this command could be 1 for success case.
So, if scripts uses sfdisk command, and need check the result of success, need check 0 and 1 bothly.
That's maby not consistent with general-purpose of return value 1.
Could you help update the man page of sfdisk to let user notice this?
What's your opinion?
Thanks,
Mark
The text was updated successfully, but these errors were encountered: