From d546e5237c8fecee379b9e83771c228dfe4ea96b051324ef3768d006bdb6fdf2 Mon Sep 17 00:00:00 2001 From: Petr Uzel Date: Tue, 8 Nov 2011 09:41:46 +0000 Subject: [PATCH] add fsck-use-FS-blacklist-for-non-all-mode-too.patch (bnc#728645) OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=105 --- ...se-FS-blacklist-for-non-all-mode-too.patch | 94 +++++++++++++++++++ util-linux.changes | 5 + util-linux.spec | 2 + 3 files changed, 101 insertions(+) create mode 100644 fsck-use-FS-blacklist-for-non-all-mode-too.patch diff --git a/fsck-use-FS-blacklist-for-non-all-mode-too.patch b/fsck-use-FS-blacklist-for-non-all-mode-too.patch new file mode 100644 index 0000000..398e091 --- /dev/null +++ b/fsck-use-FS-blacklist-for-non-all-mode-too.patch @@ -0,0 +1,94 @@ +From e31741980762744352890d37522cbf4dd0ced9c4 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 2 Nov 2011 15:51:45 +0100 +Subject: [PATCH] fsck: use FS blacklist for non-all mode too + +Reported-by: Lennart Poettering +Signed-off-by: Karel Zak +Signed-off-by: Petr Uzel +--- + fsck/fsck.c | 43 +++++++++++++++++++++++++++++++++++++++---- + 1 files changed, 39 insertions(+), 4 deletions(-) + +Index: util-linux-2.20.1/fsck/fsck.c +=================================================================== +--- util-linux-2.20.1.orig/fsck/fsck.c ++++ util-linux-2.20.1/fsck/fsck.c +@@ -57,14 +57,35 @@ + #include "xalloc.h" + + static const char *ignored_types[] = { ++ "9p", ++ "afs", ++ "autofs", ++ "binfmt_misc", ++ "cgroup", ++ "cifs", ++ "cpuset", ++ "debugfs", ++ "devfs", ++ "devpts", ++ "devtmpfs", ++ "dlmfs", ++ "fusectl", ++ "fuse.gvfs-fuse-daemon", ++ "hugetlbfs", + "ignore", + "iso9660", ++ "mqueue" ++ "ncpfs", + "nfs", + "proc", ++ "rpc_pipefs", ++ "securityfs", ++ "smbfs", ++ "spufs", + "sw", + "swap", ++ "sysfs", + "tmpfs", +- "devpts", + NULL + }; + +@@ -953,6 +974,18 @@ static int device_exists(const char *dev + return 1; + } + ++static int ignored_type(const char *fstype) ++{ ++ const char **ip; ++ ++ for(ip = ignored_types; *ip; ip++) { ++ if (strcmp(fstype, *ip) == 0) ++ return 1; ++ } ++ ++ return 0; ++} ++ + /* Check if we should ignore this filesystem. */ + static int ignore(struct fs_info *fs) + { +@@ -1000,8 +1033,8 @@ static int ignore(struct fs_info *fs) + if (!fs_match(fs, &fs_type_compiled)) return 1; + + /* Are we ignoring this type? */ +- for(ip = ignored_types; *ip; ip++) +- if (strcmp(fs->type, *ip) == 0) return 1; ++ if (fs->type && ignored_type(fs->type)) ++ return 1; + + /* Do we really really want to check this fs? */ + for(ip = really_wanted; *ip; ip++) +@@ -1461,7 +1494,9 @@ int main(int argc, char *argv[]) + 0, -1, -1); + if (!fs) + continue; +- } ++ } else if (fs->type && ignored_type(fs->type)) ++ continue; ++ + if (ignore_mounted && is_mounted(fs->device)) + continue; + status |= fsck_device(fs, interactive); diff --git a/util-linux.changes b/util-linux.changes index 13e6a46..bbe4cdd 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 8 09:36:41 UTC 2011 - puzel@suse.com + +- add fsck-use-FS-blacklist-for-non-all-mode-too.patch (bnc#728645) + ------------------------------------------------------------------- Wed Nov 2 09:37:12 UTC 2011 - puzel@suse.com diff --git a/util-linux.spec b/util-linux.spec index 9900642..b025301 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -88,6 +88,7 @@ Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch Patch2: util-linux-2.17.1-mount_losetup_crypto.patch Patch5: util-linux-2.20-libmount-deps.patch Patch6: util-linux-dmesg-fix-printing-of-multibyte-characters.patch +Patch7: fsck-use-FS-blacklist-for-non-all-mode-too.patch ## ## adjtimex @@ -191,6 +192,7 @@ Files to develop applications using the libmount library. %patch2 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 # cd adjtimex-*