summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2013-10-18 13:52:10 +0200
committerKarel Zak2013-10-23 10:46:10 +0200
commit2d8988bd262c1f0cb32590299c5554d306b5a0e1 (patch)
tree36c527d82b984033a543a3f68d1896284e8020f4
parentfdisk: (gpt) add A,B,R,S expert commands to modify attributes (diff)
downloadkernel-qcow2-util-linux-2d8988bd262c1f0cb32590299c5554d306b5a0e1.tar.gz
kernel-qcow2-util-linux-2d8988bd262c1f0cb32590299c5554d306b5a0e1.tar.xz
kernel-qcow2-util-linux-2d8988bd262c1f0cb32590299c5554d306b5a0e1.zip
fdisk: reorder intro warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--fdisks/fdisk.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c
index 1b96424cc..ca49606a5 100644
--- a/fdisks/fdisk.c
+++ b/fdisks/fdisk.c
@@ -531,19 +531,20 @@ int main(int argc, char **argv)
if (argc-optind != 1)
usage(stderr);
- if (fdisk_context_assign_device(cxt, argv[optind], 0) != 0)
- err(EXIT_FAILURE, _("cannot open %s"), argv[optind]);
-
/* Here starts interactive mode, use fdisk_{warn,info,..} functions */
color_enable(UL_COLOR_GREEN);
fdisk_info(cxt, _("Welcome to fdisk (%s)."), PACKAGE_STRING);
color_disable();
fdisk_info(cxt, _("Changes will remain in memory only, until you decide to write them.\n"
"Be careful before using the write command.\n"));
+
+ if (fdisk_context_assign_device(cxt, argv[optind], 0) != 0)
+ err(EXIT_FAILURE, _("cannot open %s"), argv[optind]);
+
fflush(stdout);
if (!fdisk_dev_has_disklabel(cxt)) {
- fdisk_warnx(cxt, _("Device does not contain a recognized partition table."));
+ fdisk_info(cxt, _("Device does not contain a recognized partition table."));
fdisk_create_disklabel(cxt, NULL);
}