]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: (sgi) rdon't use read_chars() to ask yes/no question
authorKarel Zak <kzak@redhat.com>
Fri, 31 May 2013 09:18:36 +0000 (11:18 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Sep 2013 14:46:58 +0000 (16:46 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisks/fdisksgilabel.c

index 2c4483d22d1f516ed4e15ae8ef6d072ff3283079..df271039f3bb4b613587a63b0a6b111d79a4cfa4 100644 (file)
@@ -1074,13 +1074,14 @@ static int sgi_set_parttype(struct fdisk_context *cxt,
 
        if (((t->type != SGI_TYPE_ENTIRE_DISK) && (t->type != SGI_TYPE_VOLHDR))
            && (sgi_get_start_sector(cxt, i) < 1)) {
-               read_chars(cxt,
-                       _("It is highly recommended that the partition at offset 0\n"
-                         "is of type \"SGI volhdr\", the IRIX system will rely on it to\n"
-                         "retrieve from its directory standalone tools like sash and fx.\n"
-                         "Only the \"SGI volume\" entire disk section may violate this.\n"
-                         "Type YES if you are sure about tagging this partition differently.\n"));
-               if (strcmp (line_ptr, _("YES\n")))
+               int yes = 0;
+               fdisk_ask_yesno(cxt,
+                       _("It is highly recommended that the partition at offset 0 "
+                         "is of type \"SGI volhdr\", the IRIX system will rely on it to "
+                         "retrieve from its directory standalone tools like sash and fx. "
+                         "Only the \"SGI volume\" entire disk section may violate this. "
+                         "Are you sure about tagging this partition differently?"), &yes);
+               if (!yes)
                        return 1;
        }