summaryrefslogtreecommitdiff
path: root/lib/mountlist.c
AgeCommit message (Collapse)Author
2006-08-18Add support for NetBSD 3.0.Paul Eggert
* src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field f_fstypename. (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs' has a field f_fstypename. This undoes the 2006-08-15 to src/stat.c. * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h. (ME_DUMMY): Treat "kernfs" as a dummy. (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement. * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for sys/statvfs.h. When getmntinfo was found, check its declaration and set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it. * m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Test also for f_fstypename in struct statvfs.
2006-07-20[ME_REMOTE]: Filter out cifs.Jim Meyering
Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
2006-07-20(ME_REMOTE): Compare strchr's result to NULL, not 0, for better readability.Jim Meyering
2005-11-26(ME_DUMMY): "none" and "proc" file systems are dummiesPaul Eggert
too.
2005-11-26Include <limits.h>.Paul Eggert
(dev_from_mount_options) [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: New function. It no longer assumes "dev=" has the System V meaning on Linux (since it doesn't). It also parses "dev=" more carefully. (read_file_system_list) [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it. MOUNTED_GETMNTENT2 is new here; the code didn't used to look for dev= in that case.
2005-09-22Sync from gnulib.Paul Eggert
2005-07-02Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.Jim Meyering
2005-07-01Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,Jim Meyering
and don't include <sys/file.h>).
2005-06-02Don't use "path" or "filename" to mean "file name"Paul Eggert
in comments or local variable names.
2005-05-14Update FSF postal mail address.Jim Meyering
2005-02-01Include mountlist.h first, to test the interface.Paul Eggert
(ME_DUMMY, ME_REMOTE): Moved here from mountlist.c. (ME_DUMMY): Count "subfs" as a dummy.
2004-10-04Sync from gnulib, to remove dependencies of other modules on unlocked-io.Paul Eggert
2004-08-04(SIZE_MAX): Define after including files, to avoidPaul Eggert
a collision on OpenBSD 3.4.
2004-08-02(read_file_system_list): Accept bool flag, not int.Paul Eggert
(errno): Remove decl; we now assume C89 or better. (xatoi): Remove; replaced by strtoul. Hence device numbers can now go up to ULONG_MAX.
2004-06-30(read_file_system_list): Renamed from read_filesystem_list.Jim Meyering
All definitions and uses changed.
2004-01-29[HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.Jim Meyering
2003-11-01(SIZE_MAX): Define if not defined already.Jim Meyering
(read_filesystem_list): Set and use me_type_malloced. Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or whatever the type happens to be), for brevity and consistency. Check for size calculation overflow on Alphas running OSF/1.
2003-09-17Add comment from Bruno Haible.Jim Meyering
2003-09-10Include <stdlib.h>, <string.h> unconditionally.Jim Meyering
(free): Remove decl.
2003-08-08(read_filesystem_list) [MOUNTED_GETFSSTAT]:Jim Meyering
Use MNT_NOWAIT, rather than MNT_WAIT. Otherwise, `df DIR' could hang on OSF/1 5.1 for DIR on both local and remote file systems. Reported by (and fix confirmed by) Nelson H. F. Beebe.
2003-04-11Remove anachronistic casts of xmalloc, xrealloc, and xcalloc return values.Jim Meyering
2003-03-18(read_filesystem_list) [MOUNTED_VMOUNT]: Detect anyJim Meyering
error from mntctl. Use mntctl's return value to drive the entry-processing loop, since we can't rely on the value of the vmt_length member in the last entry. On some systems doing so could result in an infinite loop. Based in part on a patch from Mike Jetzer.
2002-07-15#undef MNT_IGNORE before defining it, to avoid warning on FreeBSD.Jim Meyering
2001-11-17Include unlocked-io.h after all system headers.Jim Meyering
Remove explicit declarations of xmalloc, xrealloc, and xstrdup. Instead, include "xalloc.h".
2001-11-17Include unlocked-io.h.Jim Meyering
2001-09-30[MOUNTED_GETFSSTAT]:Jim Meyering
Include <sys/ucred.h>, for Apple Darwin. Include sys/mount.h and sys/fs_types.h only if available. (FS_TYPE): Define. (read_filesystem_list): Use FS_TYPE.
2001-09-23Remove useless parentheses in #if directives.Jim Meyering
(MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when the deprecated MOUNTED symbol is no longer defined in mntent.h.
2000-07-01Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,Jim Meyering
per change in ../m4/ls-mntd-fs.m4. (read_filesystem_list): Ignore symbolic links.
2000-06-29(fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:Jim Meyering
Avoid warning by casting result to `char *' to remove `const'.
2000-06-03move vmp decl back out to the scope where it belongsJim Meyering
2000-06-02Back out last change. Instead, do this...Jim Meyering
(read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy member using the same `ignore'-testing code.
2000-05-29(read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mountsJim Meyering
with the `ignore' attribute. Based on a patch from Mark D. Roth.
2000-05-01(read_filesystem_list): Add BeOS support.Jim Meyering
1999-07-26*** empty log message ***Jim Meyering
1999-07-20update commentsJim Meyering
1999-07-20(translate_040_to_space) [MOUNTED_GETMNTENT1]: New function.Jim Meyering
(read_filesystem_list) [MOUNTED_GETMNTENT1]: Use it.
1998-08-15(read_filesystem_list) [MOUNTED_GETMNT]: Don't infloop on getmnt(2) returning 0.Jim Meyering
Christian von Roques
1998-07-29(read_filesystem_list): Remove all_fsJim Meyering
argument, but put the necessary information into the result so that the caller can ignore filesystems that he's not interested in. From Paul.
1998-07-25(xatoi): Ansideclify.Jim Meyering
(fstype_to_string): Ansideclify.
1998-07-25(read_filesystem_list) [MOUNTED_GETMNTINFO]: Use fsp_to_string.Jim Meyering
(fsp_to_string): Don't xmalloc return value (yet).
1998-07-25(read_filesystem_list): If all_fs is negative, omit non-local filesytems.Jim Meyering
From Paul Eggert.
1998-07-18(read_filesystem_list): Fix more memory leaks on failure.Jim Meyering
From Andreas Schwab.
1998-07-04(read_filesystem_list):Jim Meyering
Don't leak memory on failure. Don't create a dummy struct mount_entry entry; use the address-of-the-tail-address method instead. Preserve errno if possible on failure, setting it to 0 if inapplicable. Close file descriptor leak if the F_SETLKW failed. Report an error if SVR4 lock file cannot be opened for some reason other than a nonexistent lock file.
1998-06-30(read_filesystem_list):Jim Meyering
Plug file descriptor leak on failure. Report failure if lock file can't be opened for some reason other than nonexistence.
1998-06-30(read_filesystem_list) [MOUNTED_GETMNTENT2]:Jim Meyering
Always close stream and file descriptor before returning.
1998-06-30(read_filesystem_list): If SVR4, lock /etc/.mnttab.lock if available,Jim Meyering
to avoid race conditions (e.g. with the automounter on Solaris 2.6). Include <errno.h>, <fcntl.h>, <unistd.h>.
1998-06-29(fstype_to_string): Guard with #if ! HAVE_F_FSTYPENAME_IN_STATFS.Jim Meyering
1998-06-29(fsp_to_string): Clean out some crufty #ifdefsJim Meyering
now that we're using the jm_FSTYPENAME autoconf macro.
1998-03-15Use #if, not #ifdef with HAVE_ macrosJim Meyering
1997-12-25Declare stpcpy only if not defined as macro.Jim Meyering