]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: don't treat "none" differently
authorDave Reisner <d@falconindy.com>
Fri, 2 Mar 2012 03:47:00 +0000 (22:47 -0500)
committerKarel Zak <kzak@redhat.com>
Fri, 2 Mar 2012 08:48:23 +0000 (09:48 +0100)
commitd0ce7c07e66f4e458d290083fdcf62218d151883
tree2e3fc835ccd1edb0e218f27e6dcf839f9981b6e0
parenteac83fbcf6476f82aca86fe9b69f60c3a9a43d92
libmount: don't treat "none" differently

This causes more problems than it solves. In the latest edition:

  # mount -t proc none foo
  mount: foo: mount failed: Invalid argument

A check for source and target fails in mnt_context_apply_fstab()
because, even though they were indeed specified on the cmdline,
__mnt_fs_set_source_ptr() altered this and NULL'd out the source.

If you're able to mount this device via other means, other tools start
reporting oddities, such as mount's output:

  (null) on /foo type proc (rw,relatime)

or findmnt:

  TARGET      SOURCE FSTYPE OPTIONS
  /foo               proc   rw,relatime

Simply treat "none" like any other source when passed in.

[kzak@redhat.com: - don't translate NULL to "none" in mnt_fs_set_source()]

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/fs.c
libmount/src/tab.c
libmount/src/tab_parse.c