summaryrefslogtreecommitdiff
path: root/gdisk.cc
diff options
context:
space:
mode:
authorsrs5694 <srs5694@users.sourceforge.net>2009-08-20 21:35:25 -0400
committersrs5694 <srs5694@users.sourceforge.net>2009-08-20 21:35:25 -0400
commitc0ca8f877e775a54008b27d92deefdb41bfaea5d (patch)
tree99efc1510662b612904f10733ba89ab4aafb0a9e /gdisk.cc
parent7f244babbe6c792379fa8d812701637e1541e8b7 (diff)
downloadsgdisk-c0ca8f877e775a54008b27d92deefdb41bfaea5d.tar.gz
Added hybrid MBR and destroy-GPT options
Diffstat (limited to 'gdisk.cc')
-rw-r--r--gdisk.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/gdisk.cc b/gdisk.cc
index 7cfb2bf..44f82a8 100644
--- a/gdisk.cc
+++ b/gdisk.cc
@@ -24,7 +24,7 @@ int main(int argc, char* argv[]) {
int doMore = 1;
char* device = NULL;
- printf("GPT fdisk (gdisk) version 0.3.1\n\n");
+ printf("GPT fdisk (gdisk) version 0.3.2\n\n");
if (argc == 2) { // basic usage
if (SizesOK()) {
@@ -88,7 +88,7 @@ int DoCommand(char* filename, struct GPTData* theGPT) {
break;
case 'o': case 'O':
theGPT->ClearGPTData();
-// theGPT->protectiveMBR.MakeProtectiveMBR();
+ theGPT->MakeProtectiveMBR();
// theGPT->BlankPartitions();
break;
case 'p': case 'P':
@@ -192,9 +192,9 @@ int ExpertsMenu(char* filename, struct GPTData* theGPT) {
printf("Enter the disk's unique GUID:\n");
theGPT->SetDiskGUID(GetGUID());
break;
-/* case 'h': case 'H':
+ case 'h': case 'H':
theGPT->MakeHybrid();
- break; */
+ break;
case 'i': case 'I':
theGPT->ShowDetails();
break;
@@ -238,6 +238,12 @@ int ExpertsMenu(char* filename, struct GPTData* theGPT) {
goOn = 0;
} // if
break;
+ case 'z': case 'Z':
+ if (theGPT->DestroyGPT() == 1) {
+ retval = 0;
+ goOn = 0;
+ }
+ break;
default:
ShowExpertCommands();
break;
@@ -254,7 +260,7 @@ void ShowExpertCommands(void) {
printf("e\tload main partition table from disk (rebuilding backup)\n");
printf("f\tchange partition GUID\n");
printf("g\tchange disk GUID\n");
-// printf("h\tmake hybrid MBR\n");
+ printf("h\tmake hybrid MBR\n");
printf("i\tshow detailed information on a partition\n");
printf("k\tsave partition data to a backup file\n");
printf("l\tload partition data from a backup file\n");
@@ -267,4 +273,5 @@ void ShowExpertCommands(void) {
printf("s\tresize partition table\n");
printf("v\tverify disk\n");
printf("w\twrite table to disk and exit\n");
+ printf("z\tDestroy GPT data structures and exit\n");
} // ShowExpertCommands()