eaf6957cd3
GitOrigin-RevId: 4bb072f0a8b267613c127684e099a70e1f6ff106
33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
|
|
Date: Thu, 1 May 2014 14:10:10 +0200
|
|
Subject: [PATCH] Look for fsck in the right place
|
|
|
|
---
|
|
src/fsck/fsck.c | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c
|
|
index e25c5d5efa..26f4e5669e 100644
|
|
--- a/src/fsck/fsck.c
|
|
+++ b/src/fsck/fsck.c
|
|
@@ -351,6 +351,7 @@ static int run(int argc, char *argv[]) {
|
|
if (r == 0) {
|
|
char dash_c[STRLEN("-C") + DECIMAL_STR_MAX(int) + 1];
|
|
int progress_socket = -1;
|
|
+ _cleanup_free_ char *fsck_name = NULL;
|
|
const char *cmdline[9];
|
|
int i = 0;
|
|
|
|
@@ -371,7 +372,10 @@ static int run(int argc, char *argv[]) {
|
|
} else
|
|
dash_c[0] = 0;
|
|
|
|
- cmdline[i++] = "/sbin/fsck";
|
|
+ r = find_executable("fsck", &fsck_name);
|
|
+ if (r < 0)
|
|
+ return r;
|
|
+ cmdline[i++] = fsck_name;
|
|
cmdline[i++] = arg_repair;
|
|
cmdline[i++] = "-T";
|
|
|