diff options
author | Davidlohr Bueso | 2011-08-07 02:10:26 +0200 |
---|---|---|
committer | Karel Zak | 2011-08-08 13:53:46 +0200 |
commit | ff62fc46b4c718e6ad987cad1c95ecabaec7f3af (patch) | |
tree | dc6c57238f99e41ba74f643a259ef7d805433d51 /libmount/src/context.c | |
parent | docs: update exmaple files (diff) | |
download | kernel-qcow2-util-linux-ff62fc46b4c718e6ad987cad1c95ecabaec7f3af.tar.gz kernel-qcow2-util-linux-ff62fc46b4c718e6ad987cad1c95ecabaec7f3af.tar.xz kernel-qcow2-util-linux-ff62fc46b4c718e6ad987cad1c95ecabaec7f3af.zip |
libmount: fix undefined sources
The path resolving function breaks when handling undefined sources
("none") used by pseudo-filesystems. The assertion is causing the
samples/mount program to abort:
dave@offbook:~/projects/util-linux-good/libmount/samples$ ./mount
/dev/sda3 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
lt-mount: cache.c:464: mnt_resolve_path: Assertion `path' failed.
Aborted
/etc/mtab:
/dev/sda3 / ext4 rw,errors=remount-ro,commit=0 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
none /sys sysfs rw,noexec,nosuid,nodev 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
none /sys/kernel/debug debugfs rw 0 0
...
Instead of this assert on NULL we can simply return NULL and let mnt_pretty_path do the work.
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Diffstat (limited to 'libmount/src/context.c')
0 files changed, 0 insertions, 0 deletions