summaryrefslogtreecommitdiffstats
path: root/main/util-linux/0001-sfdisk-suppress-warning-about-missing-boot-partition.patch
blob: 643c0634969ce2977e968d7a456b1dc6e0bbe7ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 7f7379b7628f5572e752069276f35e4d32ad884d Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 17 Jul 2014 13:37:33 +0000
Subject: [PATCH] sfdisk: suppress warning about missing boot partition with
 --quiet

Many use grub or lilo which does not care about boot partition. It
might also be that sfdisk is used to partition a data disk from a
script, so we hid the warning with --quiet.

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
 disk-utils/sfdisk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c
index b462705..95dbb45 100644
--- a/fdisks/sfdisk.c
+++ b/fdisks/sfdisk.c
@@ -1324,7 +1324,7 @@ partitions_ok(int fd, struct disk_desc *z) {
 		    break;
 		}
 	    }
-	if (pno == -1 || pno >= 4)
+	if (!quiet && (pno == -1 || pno >= 4))
 	    warnx(_("Warning: no primary partition is marked bootable (active)\n"
 		      "This does not matter for LILO, but the DOS MBR will "
 		      "not boot this disk."));
-- 
2.0.1