summaryrefslogtreecommitdiff
path: root/lib/mountlist.c
Commit message (Collapse)AuthorAgeFilesLines
* mountlist: Remove support for Cray with UNICOS 9.Bruno Haible2018-10-181-35/+0
| | | | | | * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't define MOUNTED_LISTMNTENT. * lib/mountlist.c: Remove MOUNTED_LISTMNTENT case.
* fsusage, mountlist, getloadavg, getgroups: Remove support for Ultrix.Bruno Haible2018-10-181-34/+0
| | | | | | | | | | | | | | * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't define STAT_STATFS2_FS_DATA. * lib/fsusage.c: Remove STAT_STATFS2_FS_DATA case. * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't define MOUNTED_GETMNT. * lib/mountlist.c: Remove MOUNTED_GETMNT case. * lib/getloadavg.c (decstation): Remove definition and case. * m4/getgroups.m4 (AC_FUNC_GETGROUPS): Mention NeXTstep, not Ultrix. * lib/getgroups.c: Likewise. * doc/posix-functions/getgroups.texi: Likewise. * lib/time.in.h: Update comments.
* fsusage, mountlist, getloadavg: Remove support for Dynix/ptx.Bruno Haible2018-10-181-5/+2
| | | | | | | | | | | * lib/fsusage.c: Remove _SEQUENT_ case. * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Update comments. * lib/mountlist.c: Don't test for MNTTABNAME. * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Don't test for libseq. (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't test for MNTTABNAME. * lib/getloadavg.c: Remove _SEQUENT_ and sequent cases. * lib/stat-size.h: Don't mention the Sequent bug. * doc/posix-functions/utime.texi: Don't mention the Dynix bug.
* fsusage, mountlist: Remove support for DolphinOS (an SVR3 variant).Bruno Haible2018-10-181-30/+1
| | | | | | * lib/fsusage.c: Remove DOLPHIN case. * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Update comments. * lib/mountlist.c: Remove MOUNTED_GETMNTTBL case.
* mountlist: Remove support for SVR2.Bruno Haible2018-10-181-14/+2
| | | | | | | | | Reported by Andrew Borodin <aborodin@vmail.ru> in <https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00101.html>. * lib/mountlist.c: Remove MOUNTED_FREAD case. * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't define MOUNTED_FREAD.
* mountlist: Improve support for Solaris in 64-bit mode.Bruno Haible2018-10-121-3/+53
| | | | | | | | | Reported by David Wood <David.Wood@deshaw.com> in <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=6816>. * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): On Solaris 8 or newer, define MOUNTED_GETEXTMNTENT instead of MOUNTED_GETMNTENT2. * lib/mountlist.c: Add code for MOUNTED_GETEXTMNTENT case.
* mountlist: Add support for Minix.Bruno Haible2018-10-121-2/+2
| | | | | | | | | Reported by Assaf Gordon in <https://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00074.html>. * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use AC_CHECK_FUNCS to check for 'getmntinfo'. * lib/mountlist.c: Update comments.
* mountlist: Modernize platform lists.Bruno Haible2018-10-111-30/+32
| | | | | | * m4/ls-mntd-fs.m4: Clarify which MOUNTED_* symbol applies to which platforms, deemphasizing the obsolete ones. * lib/mountlist.c: Likewise.
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* mountlist: include sysmacros.h for glibcEric Blake2016-09-151-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Fedora rawhide (glibc 2.25), './gnulib-tool --test mountlist' reports: ../../gllib/mountlist.c: In function 'read_file_system_list': ../../gllib/mountlist.c:534:13: warning: '__makedev_from_sys_types' is deprecated: In the GNU C Library, `makedev' is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use `makedev', include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro `makedev', you should #undef it after including <sys/types.h>. [-Wdeprecated-declarations] me->me_dev = makedev (devmaj, devmin); ^~ In file included from /usr/include/features.h:397:0, from /usr/include/sys/types.h:25, from ./sys/types.h:28, from ../../gllib/mountlist.h:23, from ../../gllib/mountlist.c:20: /usr/include/sys/sysmacros.h:89:1: note: declared here __SYSMACROS_DEFINE_MAKEDEV (__SYSMACROS_FST_IMPL_TEMPL) ^ Fix it by including the right headers. We also need a fix to autoconf's AC_HEADER_MAJOR, but that's a separate patch. * m4/mountlist.m4 (gl_PREREQ_MOUTLIST_EXTRA): Include AC_HEADER_MAJOR. * lib/mountlist.c (includes): Use correct headers. Signed-off-by: Eric Blake <eblake@redhat.com>
* mountlist: recognize autofs-mounted remote file systems, tooKamil Dudka2016-02-191-2/+4
| | | | | | Originally reported at: https://bugzilla.redhat.com/1309247 * lib/mountlist.c (ME_REMOTE): Return true if a file system is named "-hosts" because it is used by autofs to mount remote file systems.
* readdir_r: now obsolescentPaul Eggert2016-02-081-0/+2
| | | | | * doc/posix-functions/readdir_r.texi (readdir_r): Now obsolescent. * lib/mountlist.c (read_file_system_list): Add a FIXME.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* mountlist: clean up of variable duplicationAndrew Borodin2015-09-271-1/+0
| | | | | * lib/mountlist.c (read_file_system_list) [MOUNTED_LISTMNTENT]: the 'me' variable is already declared above. Remove it here.
* mountlist: add me_mntroot field on Linux machinesDave Chiluk2015-09-081-3/+22
| | | | | | | | | | * lib/mountlist.c (read_file_system_list): Populate me_mntroot in mount_entry so Linux machines based on /proc/self/mountinfo can distinguish between bind mounts and original mounts. In reality bind mounts aren't treated differently than mountroot=/ mounts by the kernel, but the user often wants these bind mounts distinguished. * lib/mountlist.h (struct mount_entry): Add me_mntroot element. More details at https://pad.lv/1432871
* mountlist: avoid an unused-label warning on OS XJim Meyering2015-06-281-1/+1
| | | | | | * lib/mountlist.c (read_file_system_list) [MOUNTED_GETMNTINFO]: Building on OS X, I saw a warning about the "free_then_fail" label being unused. Give it the _GL_UNUSED_LABEL attribute.
* acl-permissions: more porting to AIXPaul Eggert2015-06-051-3/+5
| | | | | | | | | | * lib/file-has-acl.c (file_has_acl) [HAVE_STATACL]: * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: * lib/set-permissions.c (set_acls) [HAVE_ACLX_GET && ACL_AIX_WIP]: Add cast for AIX, whose system calls are declared to accept char * even though the arguments are really char const *. * lib/mountlist.c (read_file_system_list) [MOUNTED_VMOUNT]: Rework types to pacify xlc.
* mountlist: remove dependency on libmountPádraig Brady2015-04-031-28/+100
| | | | | | | | | | | | * 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.
* glob, etc.: port to MSVC v18 on MS-Windows 8.1Paul Eggert2015-02-241-2/+6
| | | | | | | | * lib/dirent--.h (GNULIB_defined_opendir): * lib/dirent.in.h (GNULIB_defined_opendir) (GNULIB_defined_closedir): * lib/getcwd.c, lib/glob.c, lib/mountlist.c (opendir, closedir): #undef only if Gnulib defined it.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* mountlist: don't use libmount to decide on dummy/remotePádraig Brady2014-10-301-6/+13
| | | | | | | | | | * lib/mountlist.c (read_file_system_list): Don't use the libmount routines to determine whether a file system is dummy or remote, as they're not currently compatible. For example the remoteness is determined on file system type (for which the list seems incomplete), rather than simply checking for a ':' in the device name. Also libmount currently determines that 'tmpfs' is a dummy file system even though it has associated storage.
* mountlist: use /proc/self/mountinfo when availableFridolin Pokorny2014-09-091-20/+62
| | | | | | | | | | | | | | Use libmount to propagate device IDs provided by Linux in /proc/self/mountinfo. This will give more accurate output when using df in chroot'ed environments as the device IDs are not determined by stat() which may be inaccurate within the chroot. * lib/mountlist.c (read_file_system_list): Use the libmount routines from util-linux to parse "/proc/self/mountinfo" or fall back to standard getmntent() processing. * m4/ls-mntd-fs.m4: Check for libmount only when 1-argument getmntent() is used, as is the case on GNU/Linux. * DEPENDENCIES: Mention the optional util-linux dependency.
* mountlist: avoid hasmntopt const type warning on solarisBen Walton2014-06-061-1/+7
| | | | | | | | | * lib/mountlist.c: Solaris defines the OPT param of hasmntopt() with char * instead of const char *. Passing the constant string "ignore" generates a compiler warning. For Solaris cast MNT_IGNORE to avoid the warning. Signed-off-by: Ben Walton <bdwalton@gmail.com>
* fchdir: port 'open' and 'close' redefinitions to AIX 7.1Paul Eggert2014-05-221-5/+0
| | | | | | | | | | | | | | | * lib/chown.c, lib/clean-temp.c, lib/copy-file.c, lib/execute.c: * lib/fsusage.c, lib/gc-gnulib.c, lib/javacomp.c, lib/mountlist.c: * lib/openat-proc.c, lib/pagealign_alloc.c, lib/progreloc.c: * lib/spawn-pipe.c: Do not #undef 'open' and 'close'. AIX 7 does '#define open open64' and then 'int open64(const char *, int, ...);', which means the declaration for 'open' gets lost if we later '#undef open'. Discovered while building grep pretest 2.18.151-1c770 on AIX 7.1, where the compilation reported the non-fatal error "In function 'openat_proc_name' ... warning: implicit declaration of function 'open'". In this case the error is relatively harmless, but in other cases it might not be so minor.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* mountlist: fix resource leak with MOUNTED_INTERIX_STATVFSAndrew Borodin2013-10-071-0/+1
| | | | | | | * lib/mountlist.c (read_file_system_list): fix leak of directory streams in case of #ifdef MOUNTED_INTERIX_STATVFS. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* mountlist: add support for deallocating returned list entriesPádraig Brady2013-07-091-5/+12
| | | | | | | | * lib/mountlist.c (free_mount_entry): A new exported function to deallocate a mount list entry. * lib/mountlist.h: Declare the new function. (read_file_system_list): Refactor to use the new deallocation function. Suggested by Anton Ovchinnikov.
* mountlist: port to HP NonStopPaul Eggert2013-02-191-1/+5
| | | | | | | Reported by Joachim Schmitz in <http://lists.gnu.org/archive/html/bug-gnulib/2013-02/msg00084.html>. * lib/mountlist.c (hasmntopt) [!HAVE_HASMNTOPT]: New function. (MNT_IGNORE) [MNTOPT_IGNORE]: Use it.
* mountlist: don't consider "devtmpfs" as dummyPádraig Brady2013-01-281-1/+0
| | | | | * lib/mountlist.c (ME_DUMMY_0): Remove "devtmpfs" as there is storage associcated with it.
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* mountlist: recognize more "dummy" file systemsEric Wong2012-12-151-0/+10
| | | | | | | | | | | | | * lib/mountlist.c (ME_DUMMY_0): Add these dummy FS names to the list: - "debugfs" virtual filesystem for kernel debugging - "devpts" PTY slave filesystem - "devtmpfs" device filesystem on top of tmpfs/ramfs - "fusectl" control filesystem for FUSE - "mqueue" enumerates POSIX message queues - "rpc_pipefs" kernel <-> userspace bridge for NFS - "sysfs" is for exporting kernel objects - "devfs" device filesystem for Linux 2.4 and FreeBSD
* mountlist.c: fix a compilation failureJim Meyering2012-11-071-1/+1
| | | | | * lib/mountlist.c (read_file_system_list): Fix a compilation failure I introduced while transforming commit v0.0-7683-g613bcb6
* mountlist: do not classify a bind-mounted dir entry as "dummy"Andrew Warshall2012-11-041-10/+21
| | | | | | | | * lib/mountlist.c (ME_DUMMY_0): Rename from ME_DUMMY, but omit the "none"-testing clause. (ME_DUMMY) [MOUNTED_GETMNTENT1]: New macro to encapsulate the exception for bind-mounted directories. Copyright-paperwork-exempt: Yes
* In commentary, do not use ` to quote.Paul Eggert2012-01-051-3/+3
|
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* mountlist: clean up code formattingJim Meyering2011-01-201-20/+22
| | | | | | | * lib/mountlist.c (read_file_system_list): Split a long line, correct bracing style, use NULL in place of "(struct statfs *)0", don't parenthesize return value, add spaces around "=" and after ";-in-for-stmt".
* mountlist: add support for InterixMarkus Duft2011-01-201-0/+44
| | | | | | | * lib/mountlist.c (read_file_system_list) [MOUNTED_INTERIX_STATVFS]: Apply statvfs to all entries of /dev/fs. * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for statvfs, and if found, AC_DEFINE MOUNTED_INTERIX_STATVFS.
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-1/+1
| | | | Run the new "make update-copyright" rule.
* mountlist: tweak previous commitEric Blake2010-12-291-1/+2
| | | | | | | * lib/mountlist.c (me_remote): Guarantee trailing backslash. Reported by Paul Eggert. Signed-off-by: Eric Blake <eblake@redhat.com>
* mountlist: fix local drive detection on cygwinEric Blake2010-12-291-0/+24
| | | | | | | * lib/mountlist.c (ME_REMOTE) [__CYGWIN__]: Provide implementation that works for cygwin. Signed-off-by: Eric Blake <eblake@redhat.com>
* removing useless parentheses in cpp #define directivesJim Meyering2010-02-021-1/+1
| | | | | | | | For motivation, see commit c0221df4, "define STREQ(a,b) consistently, removing useless parentheses" * lib/memcmp.c (CMP_LT_OR_GT): Remove useless parentheses. * lib/mountlist.c (MNT_IGNORE): Likewise. * lib/trim.h (trim, trim_trailing, trim_leading): Likewise.
* update nearly all FSF copyright year lists to include 2010Jim Meyering2010-01-011-1/+1
| | | | | Use the same procedure as for 2009, outlined in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
* update nearly all FSF copyright year lists to include 2009Jim Meyering2009-12-291-1/+1
| | | | | | | | | | | | | | | | | | The files named by the following are exempted: grep -v '^#' config/srclist.txt|grep -v '^$' \ | while read src dst; do test -f "$dst" && { echo "$dst"; continue; } test -d "$dst" || continue echo "$dst"/$(basename "$src") done > exempt git ls-files tests/unictype >> exempt In the remaining files, convert to all-interval notation if - there is already at least one year interval like 2000-2003 - the file is maintained by me - the file is in lib/uni*/, where that style already prevails Otherwise, use update-copyright's default.
* Use spaces for indentation, not tabs.Bruno Haible2009-12-101-236/+236
|
* avoid gcc warnings about unused macro definitionsJim Meyering2009-03-121-4/+1
| | | | | | | | | | | | * lib/readtokens.c (STREQ): Remove unused definition. * lib/xmalloc.c (SIZE_MAX): Likewise. * lib/openat-die.c (N_): Likewise. * lib/mountlist.c (SIZE_MAX): Remove definition. Instead, include <stdint.h>. * lib/readutmp.c: Likewise. * modules/readutmp (Depends-on): Add stdint. * modules/mountlist (Depends-on): Add stdint. * lib/userspec.c (ISDIGIT): Move definition into #if block where used.
* still avoid unused-parameter warnings, but do it cleanlyJim Meyering2009-02-051-18/+5
| | | | | | | | * lib/fsusage.c (UNUSED_PARAM): Remove definition. (get_fs_usage): Cast to void instead. * lib/mountlist.c (UNUSED_PARAM): Remove definition. (dev_from_mount_options, read_file_system_list): Cast to void. Prompted by Bruno Haible.
* avoid misc. warningsJim Meyering2009-02-041-6/+18
| | | | | | | | | | * lib/fsusage.c (UNUSED_PARAM): Define. (get_fs_usage): Mark parameter "disk" as unused. * lib/getugroups.c (getgrent): Use "void" in prototype. * lib/mountlist.c: Mark unused parameters. (read_file_system_list): Declare a local with "const". * lib/nanosleep.c (getnow): Declare static. * lib/strftime.c: Include strftime.h, for declaration of nstrftime.
* Change copyright notice from GPLv2+ to GPLv3+.Bruno Haible2007-10-071-5/+4
|