summaryrefslogtreecommitdiff
path: root/sgdisk.cc
diff options
context:
space:
mode:
authorsrs5694 <srs5694@users.sourceforge.net>2010-02-11 22:22:22 -0500
committersrs5694 <srs5694@users.sourceforge.net>2010-02-11 22:22:22 -0500
commitcb76c673eeb84344887715d36d44b799042be5a5 (patch)
treec727bc4a638968b1be3812b567c34bd4c4f76132 /sgdisk.cc
parent6699b01eda84d24bfaf80ad725304fef2b0e1b2a (diff)
downloadsgdisk-cb76c673eeb84344887715d36d44b799042be5a5.tar.gz
A few minor bug fixes; backup function now accepts dd output of MBR,
main header, and main partition table, as well as gdisk-generated backups.
Diffstat (limited to 'sgdisk.cc')
-rw-r--r--sgdisk.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sgdisk.cc b/sgdisk.cc
index e97e57d..9b5ae92 100644
--- a/sgdisk.cc
+++ b/sgdisk.cc
@@ -140,7 +140,7 @@ int main(int argc, char *argv[]) {
saveData = 1;
break;
case 'E':
- cout << theGPT.FindLastAvailable(theGPT.FindFirstInLargest()) << "\n";
+ cout << theGPT.FindLastInFree(theGPT.FindFirstInLargest()) << "\n";
break;
case 'f':
cout << theGPT.FindFirstInLargest() << "\n";
@@ -205,7 +205,7 @@ int main(int argc, char *argv[]) {
case 't':
theGPT.JustLooking(0);
partNum = (int) GetInt(typeCode, 1) - 1;
- sscanf(GetString(typeCode, 2).c_str(), "%ux", &hexCode);
+ sscanf(GetString(typeCode, 2).c_str(), "%x", &hexCode);
if (theGPT.ChangePartType(partNum, hexCode)) {
saveData = 1;
} else {