summaryrefslogtreecommitdiffstats
path: root/abs/core/util-linux/0001-sfdisk-don-t-be-silent-when-list-non-existing-device.patch
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2016-12-15 20:53:53 (GMT)
committerBritney Fransen <brfransen@gmail.com>2016-12-15 20:53:53 (GMT)
commit02c29713e636d105e63fe2286fdd673a57573eea (patch)
treece91af604a0b92e61f00bb68edc9ae7c10bf7516 /abs/core/util-linux/0001-sfdisk-don-t-be-silent-when-list-non-existing-device.patch
parentfca162ce703a757f1b23106065851b574428315f (diff)
downloadlinhes_pkgbuild-02c29713e636d105e63fe2286fdd673a57573eea.zip
linhes_pkgbuild-02c29713e636d105e63fe2286fdd673a57573eea.tar.gz
linhes_pkgbuild-02c29713e636d105e63fe2286fdd673a57573eea.tar.bz2
util-linux: update to 2.29
Diffstat (limited to 'abs/core/util-linux/0001-sfdisk-don-t-be-silent-when-list-non-existing-device.patch')
-rw-r--r--abs/core/util-linux/0001-sfdisk-don-t-be-silent-when-list-non-existing-device.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/abs/core/util-linux/0001-sfdisk-don-t-be-silent-when-list-non-existing-device.patch b/abs/core/util-linux/0001-sfdisk-don-t-be-silent-when-list-non-existing-device.patch
new file mode 100644
index 0000000..4b088bb
--- /dev/null
+++ b/abs/core/util-linux/0001-sfdisk-don-t-be-silent-when-list-non-existing-device.patch
@@ -0,0 +1,70 @@
+From fed304837f60b626f6198663990e76e506f89063 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@redhat.com>
+Date: Tue, 29 Nov 2016 15:58:18 +0100
+Subject: [PATCH] sfdisk: don't be silent when list non-existing device
+
+Addresses: https://github.com/karelzak/util-linux/issues/376
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+ disk-utils/sfdisk.c | 16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c
+index 52f2a6d..0f69d65 100644
+--- a/disk-utils/sfdisk.c
++++ b/disk-utils/sfdisk.c
+@@ -560,6 +560,7 @@ static int write_changes(struct sfdisk *sf)
+ */
+ static int command_list_partitions(struct sfdisk *sf, int argc, char **argv)
+ {
++ int fail = 0;
+ fdisk_enable_listonly(sf->cxt, 1);
+
+ if (argc) {
+@@ -568,13 +569,14 @@ static int command_list_partitions(struct sfdisk *sf, int argc, char **argv)
+ for (i = 0; i < argc; i++) {
+ if (ct)
+ fputs("\n\n", stdout);
+- if (print_device_pt(sf->cxt, argv[i], 0, sf->verify) == 0)
+- ct++;
++ if (print_device_pt(sf->cxt, argv[i], 1, sf->verify) != 0)
++ fail++;
++ ct++;
+ }
+ } else
+ print_all_devices_pt(sf->cxt, sf->verify);
+
+- return 0;
++ return fail;
+ }
+
+ /*
+@@ -582,6 +584,7 @@ static int command_list_partitions(struct sfdisk *sf, int argc, char **argv)
+ */
+ static int command_list_freespace(struct sfdisk *sf, int argc, char **argv)
+ {
++ int fail = 0;
+ fdisk_enable_listonly(sf->cxt, 1);
+
+ if (argc) {
+@@ -590,13 +593,14 @@ static int command_list_freespace(struct sfdisk *sf, int argc, char **argv)
+ for (i = 0; i < argc; i++) {
+ if (ct)
+ fputs("\n\n", stdout);
+- if (print_device_freespace(sf->cxt, argv[i], 0) == 0)
+- ct++;
++ if (print_device_freespace(sf->cxt, argv[i], 1) != 0)
++ fail++;
++ ct++;
+ }
+ } else
+ print_all_devices_freespace(sf->cxt);
+
+- return 0;
++ return fail;
+ }
+
+ /*
+--
+2.10.2
+