diff options
author | srs5694 <srs5694@users.sourceforge.net> | 2011-09-18 21:12:28 -0400 |
---|---|---|
committer | srs5694 <srs5694@users.sourceforge.net> | 2011-09-18 21:12:28 -0400 |
commit | d1b11e8305621d73ff675af940e7f1f28b639b0d (patch) | |
tree | d7c328769b3015c7737bd07928960d6b92fd4cff /gptcl.cc | |
parent | f502e52912a28bc57d4a88c6f8f2f5efc6da602c (diff) | |
download | sgdisk-d1b11e8305621d73ff675af940e7f1f28b639b0d.tar.gz |
Fixed bug in reading GPTs with encoded header sizes other than 92 bytes.
Diffstat (limited to 'gptcl.cc')
-rw-r--r-- | gptcl.cc | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -51,6 +51,15 @@ void GPTDataCL::LoadBackupFile(string backupFile, int &saveData, int &neverSaveD } // else } // +// Perform the actions specified on the command line. This is necessarily one +// monster of a function! +// Returns values: +// 0 = success +// 1 = too few arguments +// 2 = error when reading partition table +// 3 = non-GPT disk and no -g option +// 4 = unable to save changes +// 8 = disk replication operation (-R) failed int GPTDataCL::DoOptions(int argc, char* argv[]) { GPTData secondDevice; int opt, numOptions = 0, saveData = 0, neverSaveData = 0; @@ -109,7 +118,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { if (argc < 2) { poptPrintUsage(poptCon, stderr, 0); - exit(1); + return 1; } // Do one loop through the options to find the device filename and deal |