Allow fsck on UUID= and LABEL= devices

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2016-08-01 23:38:55 +02:00
parent d2a5e65862
commit f374f443f4
+4 -2
View File
@@ -93,8 +93,10 @@ static int fsck(int pass)
errno = 0;
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));
continue;
if (!string_match(fs->fs_spec, "UUID=") && !string_match(fs->fs_spec, "LABEL=")) {
_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);