From b3d212f83fc290598d5093f18b019a109015977a Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 11 Feb 2013 11:41:47 +0100 Subject: [PATCH] fdisk: (sun) use yes/no from libfdisk Signed-off-by: Karel Zak --- fdisks/fdisksunlabel.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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; } -- 2.47.2