summaryrefslogtreecommitdiffstats
path: root/disk-utils/sfdisk.c
diff options
context:
space:
mode:
authorKarel Zak2014-09-09 13:36:16 +0200
committerKarel Zak2014-10-07 14:55:31 +0200
commitd5bee4bb59b4e78cdc85800b75f15d70def79c4a (patch)
tree129f93b1d4091802ab029a325bf5390d671946b4 /disk-utils/sfdisk.c
parentlibfdisk: return partno when add new partition (diff)
downloadkernel-qcow2-util-linux-d5bee4bb59b4e78cdc85800b75f15d70def79c4a.tar.gz
kernel-qcow2-util-linux-d5bee4bb59b4e78cdc85800b75f15d70def79c4a.tar.xz
kernel-qcow2-util-linux-d5bee4bb59b4e78cdc85800b75f15d70def79c4a.zip
libfdisk: cleanup script size= code
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/sfdisk.c')
-rw-r--r--disk-utils/sfdisk.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c
index 5381d43dc..d9608d770 100644
--- a/disk-utils/sfdisk.c
+++ b/disk-utils/sfdisk.c
@@ -386,10 +386,15 @@ static int command_fdisk(struct sfdisk *sf, int argc, char **argv)
fdisk_script_set_header(dp, "label", label);
- printf(_("\nInput in the following format; absent fields get a default value.\n"
- "<start> <size> <type [uuid, hex or E,S,L,X]> <bootable [-,*]>\n"
- "Usually you only need to specify <start> and <size>\n\n"));
+ fputc('\n', stdout);
+ printf(_("Input in the following format; absent fields get a default value.\n"
+ "<start> <size> <type [uuid, hex or E,S,L,X]> <bootable [-,*]>\n"));
+ fputc('\n', stdout);
+ printf(_("If the size is specified by <number>{K,M,G,T,P,E,Z,Y} then\n"
+ "it's interpreted as size in bytes rather then in sectors.\n"));
+
+ fputc('\n', stdout);
if (!fdisk_has_label(sf->cxt))
printf(_("sfdisk is going to create a new '%s' disk label.\n"
"Use 'label: <name>' before you define a first partition\n"
@@ -416,6 +421,7 @@ static int command_fdisk(struct sfdisk *sf, int argc, char **argv)
rc = fdisk_script_read_line(dp, stdin, buf, sizeof(buf));
if (rc == 1) { /* end of file */
+ printf(_("Done.\n"));
rc = 0;
break;
} else if (rc < 0) {
@@ -455,7 +461,7 @@ static int command_fdisk(struct sfdisk *sf, int argc, char **argv)
} else if (pa) /* error, drop partition from script */
fdisk_table_remove_partition(tb, pa);
} else
- printf(_("OK\n")); /* probably added script header */
+ printf(_("\nScript header accepted.\n"));
} while (1);