From 7eac88b639f0143180b6886b788e36356530c2d2 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Mon, 1 Aug 2016 23:51:11 +0200 Subject: [PATCH] Run fsck earlier and print only first 13 chars Run fsck much earlier, as soon as we can in fact. The first 13 characters of the UUID, label or device name should be sufficient to identify the device, without violating max width of 78 chars. Signed-off-by: Joachim Nilsson --- finit.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/finit.c b/finit.c index 8a895cf1..dc7ff5e5 100644 --- a/finit.c +++ b/finit.c @@ -100,7 +100,7 @@ static int fsck(int pass) } snprintf(cmd, sizeof(cmd), "/sbin/fsck -C -a %s", fs->fs_spec); - run_interactive(cmd, "Checking file system %s", fs->fs_spec); + run_interactive(cmd, "Checking filesystem %13.13s", fs->fs_spec); } endfsent(); @@ -222,6 +222,14 @@ int main(int argc, char* argv[]) uev_init(&loop); ctx = &loop; + /* + * Check file filesystems in /etc/fstab + */ + for (int pass = 1; pass < 10; pass++) { + if (fsck(pass)) + break; + } + /* * Mount base file system, kernel is assumed to run devtmpfs for /dev */ @@ -268,14 +276,6 @@ int main(int argc, char* argv[]) #endif run_interactive(SETUP_DEVFS, "Populating device tree"); - /* - * Check file filesystems in /etc/fstab - */ - for (int pass = 1; pass < 10; pass++) { - if (fsck(pass)) - break; - } - /* * Load plugins first, finit.conf may contain references to * features implemented by plugins.