From: Karel Zak Date: Mon, 11 Feb 2013 10:41:47 +0000 (+0100) Subject: fdisk: (sun) use yes/no from libfdisk X-Git-Tag: v2.23-rc1~102 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b3d212f83fc290598d5093f18b019a109015977a;p=thirdparty%2Futil-linux.git fdisk: (sun) use yes/no from libfdisk Signed-off-by: Karel Zak --- diff --git a/fdisks/fdisksunlabel.c b/fdisks/fdisksunlabel.c index bdaa62d7e0..990974808f 100644 --- a/fdisks/fdisksunlabel.c +++ b/fdisks/fdisksunlabel.c @@ -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; }