]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: (sun) use yes/no from libfdisk
authorKarel Zak <kzak@redhat.com>
Mon, 11 Feb 2013 10:41:47 +0000 (11:41 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 11 Mar 2013 12:00:56 +0000 (13:00 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisks/fdisksunlabel.c

index bdaa62d7e0764c2ef31951e4018103fb6c67a352..990974808f1c2bba2283945ea9496e0da0b7b742 100644 (file)
@@ -863,13 +863,15 @@ static int sun_set_parttype(
        info = &sunlabel->vtoc.infos[i];
 
        if (t->type == SUN_TAG_LINUX_SWAP && !part->start_cylinder) {
-           read_chars(cxt,
+           int yes, rc;
+           rc = fdisk_ask_yesno(cxt,
              _("It is highly recommended that the partition at offset 0\n"
              "is UFS, EXT2FS filesystem or SunOS swap. Putting Linux swap\n"
              "there may destroy your partition table and bootblock.\n"
-             "Type YES if you're very sure you would like that partition\n"
-             "tagged with 82 (Linux swap): "));
-           if (strcmp (line_ptr, _("YES\n")))
+             "Are you sure you want to tag the partition as Linux swap?"), &yes);
+           if (rc)
+                   return rc;
+           if (!yes)
                    return 1;
        }