summaryrefslogtreecommitdiff
path: root/gdisk.cc
diff options
context:
space:
mode:
authorsrs5694 <srs5694@users.sourceforge.net>2009-12-31 21:20:19 -0500
committersrs5694 <srs5694@users.sourceforge.net>2009-12-31 21:20:19 -0500
commit1d1448a82d62ad32a8d597ed9ade46b4f37d8eb5 (patch)
tree3df9db73abb2e37f66c01e981babaaef0267bbf0 /gdisk.cc
parent247657a5acbb7eb21c336ba84a68b801b7c19be0 (diff)
downloadsgdisk-1d1448a82d62ad32a8d597ed9ade46b4f37d8eb5.tar.gz
Update to version 0.5.2; adds support for Advanced Format disk partition
alignment
Diffstat (limited to 'gdisk.cc')
-rw-r--r--gdisk.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/gdisk.cc b/gdisk.cc
index bfee217..3414d89 100644
--- a/gdisk.cc
+++ b/gdisk.cc
@@ -29,7 +29,7 @@ int main(int argc, char* argv[]) {
int doMore = 1;
char* device = NULL;
- printf("GPT fdisk (gdisk) version 0.5.1-pre3\n\n");
+ printf("GPT fdisk (gdisk) version 0.5.2\n\n");
if (argc == 2) { // basic usage
if (SizesOK()) {
@@ -309,6 +309,10 @@ void ExpertsMenu(char* filename, struct GPTData* theGPT) {
theGPT->SetPartitionGUID(pn, GetGUID());
} else printf("No partitions\n");
break;
+ case 'd': case 'D':
+ printf("The number of logical sectors per physical sector is set to %d.\n",
+ theGPT->GetAlignment());
+ break;
case 'e': case 'E':
printf("Relocating backup data structures to the end of the disk\n");
theGPT->MoveSecondHeaderToEnd();
@@ -320,6 +324,10 @@ void ExpertsMenu(char* filename, struct GPTData* theGPT) {
case 'i': case 'I':
theGPT->ShowDetails();
break;
+ case 'l': case 'L':
+ temp1 = GetNumber(1, 128, 8, "Enter the number of logical sectors in a physical sector on the\ndisk (1-128, default = 8): ");
+ theGPT->SetAlignment(temp1);
+ break;
case 'm': case 'M':
MainMenu(filename, theGPT);
goOn = 0;
@@ -366,9 +374,11 @@ void ExpertsMenu(char* filename, struct GPTData* theGPT) {
void ShowExpertCommands(void) {
printf("a\tset attributes\n");
printf("c\tchange partition GUID\n");
+ printf("d\tdisplay the number of logical sectors per physical sector\n");
printf("e\trelocate backup data structures to the end of the disk\n");
printf("g\tchange disk GUID\n");
printf("i\tshow detailed information on a partition\n");
+ printf("b\tset the number of logical sectors per physical sector\n");
printf("m\treturn to main menu\n");
printf("n\tcreate a new protective MBR\n");
printf("o\tprint protective MBR data\n");