mirror of
https://github.com/troglobit/finit.git
synced 2026-11-08 16:11:10 +00:00
Allow fsck on UUID= and LABEL= devices
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
d2a5e65862
commit
f374f443f4
1 file changed
+4
-2
@@ -93,8 +93,10 @@ static int fsck(int pass)
|
|||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
if (stat(fs->fs_spec, &st) || !S_ISBLK(st.st_mode)) {
|
if (stat(fs->fs_spec, &st) || !S_ISBLK(st.st_mode)) {
|
||||||
_d("Cannot fsck %s, not a block device: %s", fs->fs_spec, strerror(errno));
|
if (!string_match(fs->fs_spec, "UUID=") && !string_match(fs->fs_spec, "LABEL=")) {
|
||||||
continue;
|
_d("Cannot fsck %s, not a block device: %s", fs->fs_spec, strerror(errno));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(cmd, sizeof(cmd), "/sbin/fsck -C -a %s", fs->fs_spec);
|
snprintf(cmd, sizeof(cmd), "/sbin/fsck -C -a %s", fs->fs_spec);
|
||||||
|
|||||||
Reference in new issue
Block a user