util-linux/libmount
Alban Crequy 18a52a5094 libmount: (mountinfo) parse empty strings in source
The source of a mount in /proc/self/mountinfo can unfortunately be an
empty string. Before this patch, 'mount' and 'mountpoint' fail as
following:

  $ sudo mount -t tmpfs "" /tmp/bb
  $ mount
  mount: /proc/self/mountinfo: parse error at line 64 -- ignored
  $ mountpoint /tmp/bb
  /tmp/bb is not a mountpoint

This patch fixes the parsing. It is unfortunately more complex because
sscanf() does not handle fields with empty strings easily.

Other projects have their own parser for mountinfo and have similar
issues. I know of runc and runtime-tools (I'll send a patch for those
two) but there are probably others.

Signed-off-by: Alban Crequy <alban@kinvolk.io>
2018-07-10 13:48:38 +02:00
..
docs libmount: add support for switching namespaces 2018-06-11 15:49:48 +02:00
python libmount: fix Python get_propagation 2017-09-21 23:18:32 +02:00
src libmount: (mountinfo) parse empty strings in source 2018-07-10 13:48:38 +02:00
COPYING COPYING: fix grammar of referring phrase, and indicate location better 2013-10-08 15:38:39 +02:00
Makemodule.am build-sys: add pylibmount 2013-08-19 14:57:21 +02:00
mount.pc.in build-sys: use top-level directory for libmount rather than shlibs/mount 2011-06-09 21:59:52 +02:00