From cb76c673eeb84344887715d36d44b799042be5a5 Mon Sep 17 00:00:00 2001 From: srs5694 Date: Thu, 11 Feb 2010 22:22:22 -0500 Subject: 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. --- sgdisk.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sgdisk.cc') 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 { -- cgit v1.2.1