diff options
author | Pádraig Brady <P@draigBrady.com> | 2015-04-02 04:18:02 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2015-04-03 14:50:58 +0100 |
commit | 3fb6e360363744462ce15c381f0b116c6fc4ce82 (patch) | |
tree | db4308f25ba1351f75923951bce089548d167283 /m4/ls-mntd-fs.m4 | |
parent | e2e66692cd072a39ce26ecf94117f934008aab24 (diff) | |
download | gnulib-3fb6e360363744462ce15c381f0b116c6fc4ce82.tar.gz |
mountlist: remove dependency on libmount
* lib/mountlist.c (read_file_system_list): Parse /proc/self/mountinfo
directly, rather than depending on libmount, which has many
dependencies due to its dependence on libselinux, as detailed at:
http://lists.gnu.org/archive/html/bug-gnulib/2015-01/msg00063.html
Note we restrict this to __linux__ as that's probably where this
interface will remain. If ever porting, it would be best
to first pull the makedev() wrapper from coreutils to a gnulib module.
Note also we don't add a getline dependency to the mountlist module,
as all Linux versions are sufficient.
Diffstat (limited to 'm4/ls-mntd-fs.m4')
-rw-r--r-- | m4/ls-mntd-fs.m4 | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/m4/ls-mntd-fs.m4 b/m4/ls-mntd-fs.m4 index 59a951e187..7e4aa192a7 100644 --- a/m4/ls-mntd-fs.m4 +++ b/m4/ls-mntd-fs.m4 @@ -1,4 +1,4 @@ -# serial 31 +# serial 32 # How to list mounted file systems. # Copyright (C) 1998-2004, 2006, 2009-2015 Free Software Foundation, Inc. @@ -120,7 +120,7 @@ if test $ac_cv_func_getmntent = yes; then # Determine whether it's the one-argument variant or the two-argument one. if test -z "$ac_list_mounted_fs"; then - # 4.3BSD, SunOS, HP-UX, Dynix, Irix + # GNU/Linux, 4.3BSD, SunOS, HP-UX, Dynix, Irix AC_MSG_CHECKING([for one-argument getmntent function]) AC_CACHE_VAL([fu_cv_sys_mounted_getmntent1], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ @@ -152,25 +152,6 @@ if test $ac_cv_func_getmntent = yes; then of mounted file systems, and that function takes a single argument. (4.3BSD, SunOS, HP-UX, Dynix, Irix)]) AC_CHECK_FUNCS([hasmntopt]) - - AC_ARG_WITH([libmount], - [AS_HELP_STRING([--with-libmount], - [use libmount if available to parse the system mount list.])], - [], - dnl libmount has the advantage of propagating accurate device IDs for - dnl each entry, but the disadvantage of many dependent shared libs - dnl with associated runtime startup overhead and virt mem usage. - [with_libmount=no]) - - # Check for libmount to support /proc/self/mountinfo on Linux - if test "x$with_libmount" != xno; then - AC_CHECK_LIB([mount], [mnt_new_table_from_file], - [AC_DEFINE([MOUNTED_PROC_MOUNTINFO], [1], - [Define if want to use /proc/self/mountinfo on Linux.]) - LIBS="-lmount $LIBS"], - [test -f /proc/self/mountinfo && - AC_MSG_WARN([/proc/self/mountinfo present but libmount missing.])]) - fi fi fi |