File util-linux-fsck-C_fd.patch of Package util-linux

From d1bba731c6ca1918d03f2a8c144b51f9a8607fda Mon Sep 17 00:00:00 2001
From: Stanislav Brabec <sbrabec@suse.cz>
Date: Tue, 24 Mar 2015 21:01:10 +0100
Subject: [PATCH] fsck: fix fsck -C {fd} parsing

Both fsck(8) and fsck --help documents progress bar redirection as
-C {fd}

This did not work, and only -C{fd} and "-C {fd}" worked.

Signed-off-by: Karel Zak <kzak@redhat.com>
---
 disk-utils/fsck.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: util-linux-2.25/disk-utils/fsck.c
===================================================================
--- util-linux-2.25.orig/disk-utils/fsck.c
+++ util-linux-2.25/disk-utils/fsck.c
@@ -1466,7 +1466,7 @@ static void parse_argv(int argc, char *a
 						goto next_arg;
 				} else if ((i+1) < argc &&
 					   !strncmp(argv[i+1], "-", 1) == 0) {
-					progress_fd = string_to_int(argv[i]);
+					progress_fd = string_to_int(argv[i+1]);
 					if (progress_fd < 0)
 						progress_fd = 0;
 					else {
openSUSE Build Service is sponsored by