Manpage documentation for exit status 3 is not clear
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gdisk (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
Package: gdisk
Bin: sgdisk
gdisk:
Installed: 0.8.1-1build1
Candidate: 0.8.1-1build1
Version table:
*** 0.8.1-1build1 0
500 http://
100 /var/lib/
System:
Description: Ubuntu 12.04 LTS
Release: 12.04
As described here http://
.TP
.B 3
Non\-GPT disk detected and no \fI\-g\fR option
But if we run:
sgdisk -b ~/test.dump /dev/sda ; echo $?
where sda has MBR, no GPT, we get ec = 0.
Here is example of fix:
https:/
(need "saveData = 1;" in case 'b' for check condition and return 3 worked then)
Also there fix of make errors, when compiling on ubuntu precise (#include <unistd.h> in diskio-unix.cc) - I don't know, maybe it's not necessary in upstream, i just couldn't build bin file without it
Could this be fixed in gdisk?
We have this problem in precise, but in newer packages problem exists too.
Thank you for taking the time to report this bug and helping to make Ubuntu better.
It isn't clear to me from the manpage that you linked that the behaviour is documented to do what you expect. Has this been reported upstream? It isn't a good idea to change behaviour on Ubuntu from all the other distributions that run sgdisk, so ideally this would be fixed upstream first so the intent is clear.
If upstream have committed a fix, then we can look into whether it is a bugfix that should be applied to existing stable Ubuntu releases, or if it is not suitable and should go into the Ubuntu development release only.
If upstream have not committed a fix, then I'm not sure it's a good idea for Ubuntu to diverge on this behaviour.