summaryrefslogtreecommitdiffstats
path: root/shlibs/mount/src/tab_diff.c
diff options
context:
space:
mode:
authorKarel Zak2011-04-27 17:17:16 +0200
committerKarel Zak2011-04-27 17:17:16 +0200
commit0983b5f7e67c23c553d7c14ac8d1788b1dc19890 (patch)
tree34bc64d782070609c4d98a3328a6c1acfb39bbce /shlibs/mount/src/tab_diff.c
parentlib: [tt.c] support fixed width and multiple tt_print_table() calls (diff)
downloadkernel-qcow2-util-linux-0983b5f7e67c23c553d7c14ac8d1788b1dc19890.tar.gz
kernel-qcow2-util-linux-0983b5f7e67c23c553d7c14ac8d1788b1dc19890.tar.xz
kernel-qcow2-util-linux-0983b5f7e67c23c553d7c14ac8d1788b1dc19890.zip
libmount: minor fix to mnt_tabdiff_*
- tabdiff has to support NULL fs->source - disable some debug messages Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/mount/src/tab_diff.c')
-rw-r--r--shlibs/mount/src/tab_diff.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/shlibs/mount/src/tab_diff.c b/shlibs/mount/src/tab_diff.c
index 12b2f7742..d1a17bcb9 100644
--- a/shlibs/mount/src/tab_diff.c
+++ b/shlibs/mount/src/tab_diff.c
@@ -190,7 +190,6 @@ static struct tabdiff_entry *tabdiff_get_mount(struct libmnt_tabdiff *df,
struct list_head *p;
assert(df);
- assert(src);
list_for_each(p, &df->changes) {
struct tabdiff_entry *de;
@@ -202,7 +201,9 @@ static struct tabdiff_entry *tabdiff_get_mount(struct libmnt_tabdiff *df,
const char *s = mnt_fs_get_source(de->new_fs);
- if (s && strcmp(s, src) == 0)
+ if (s == NULL && src == NULL)
+ return de;
+ if (s && src && strcmp(s, src) == 0)
return de;
}
}