summaryrefslogtreecommitdiff
path: root/lib/mountlist.c
AgeCommit message (Collapse)Author
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
1997-05-28(read_filesystem_list): Add `|| defined (__OpenBSD__)'Jim Meyering
to the NetBSD #if so OpenBSD also uses the f_fstypename member. (fstype_to_string): Add `&& !defined (__OpenBSD__)' to the NetBSD #if expression to exclude this function definition. OpenBSD 2.1 beta doesn't need it. Patch from Hugh Daniel <hugh@ecotone.xanadu.com>
1997-05-24(read_filesystem_list): Show automount-relatedJim Meyering
duplicate filesystems only when --all specified. With suggestions from Stuart Kemp.
1997-05-24Indent cpp directives.Jim Meyering
1997-01-25remove trailing blanksJim Meyering
1996-10-12(fstype_to_string): Handle fstypes of freebsd.Jim Meyering
From Arne Henrik Juul.
1996-07-15update FSF address in copyrightJim Meyering
1996-05-23(read_filesystem_list) [MOUNTED_LISTMNTENT]: New function.Jim Meyering
From Johan Danielsson (joda@pdc.kth.se).
1995-10-05(read_filesystem_list): Cast -1 to dev_t before assignment.Jim Meyering
1994-10-08.Jim Meyering
1992-10-31Initial revisionJim Meyering