Commit Graph

33 Commits

Author SHA1 Message Date
Jim Meyering
1ce3f3cca5 Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
per change in ../m4/ls-mntd-fs.m4.
(read_filesystem_list): Ignore symbolic links.
2000-07-01 13:35:28 +00:00
Jim Meyering
a1fd5e91ff (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
Avoid warning by casting result to `char *' to remove `const'.
2000-06-29 08:30:03 +00:00
Jim Meyering
86c8226819 move vmp decl back out to the scope where it belongs 2000-06-03 22:09:03 +00:00
Jim Meyering
209099c9d9 Back out last change. Instead, do this...
(read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
member using the same `ignore'-testing code.
2000-06-02 11:20:47 +00:00
Jim Meyering
11c6d21d52 (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
with the `ignore' attribute.  Based on a patch from Mark D. Roth.
2000-05-29 16:23:45 +00:00
Jim Meyering
e511c84abe (read_filesystem_list): Add BeOS support. 2000-05-01 08:03:33 +00:00
Jim Meyering
a197ef9f3c *** empty log message *** 1999-07-26 06:52:28 +00:00
Jim Meyering
8478414c5d update comments 1999-07-20 18:52:05 +00:00
Jim Meyering
bca7546dcd (translate_040_to_space) [MOUNTED_GETMNTENT1]: New function.
(read_filesystem_list) [MOUNTED_GETMNTENT1]: Use it.
1999-07-20 18:41:58 +00:00
Jim Meyering
9d7c2d4f7d (read_filesystem_list) [MOUNTED_GETMNT]: Don't infloop on getmnt(2) returning 0.
Christian von Roques
1998-08-15 03:01:13 +00:00
Jim Meyering
52e2de5780 (read_filesystem_list): Remove all_fs
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-29 03:58:02 +00:00
Jim Meyering
27e780fe97 (xatoi): Ansideclify.
(fstype_to_string): Ansideclify.
1998-07-25 15:00:37 +00:00
Jim Meyering
bb3fca40db (read_filesystem_list) [MOUNTED_GETMNTINFO]: Use fsp_to_string.
(fsp_to_string): Don't xmalloc return value (yet).
1998-07-25 14:54:42 +00:00
Jim Meyering
91c40bd499 (read_filesystem_list): If all_fs is negative, omit non-local filesytems.
From Paul Eggert.
1998-07-25 14:41:04 +00:00
Jim Meyering
1af4f2f11d (read_filesystem_list): Fix more memory leaks on failure.
From Andreas Schwab.
1998-07-18 12:28:31 +00:00
Jim Meyering
8f55e63084 (read_filesystem_list):
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-07-04 00:48:11 +00:00
Jim Meyering
7a314199db (read_filesystem_list):
Plug file descriptor leak on failure.
Report failure if lock file can't be opened for some reason
other than nonexistence.
1998-06-30 14:32:53 +00:00
Jim Meyering
6dda2aaa52 (read_filesystem_list) [MOUNTED_GETMNTENT2]:
Always close stream and file descriptor before returning.
1998-06-30 03:56:57 +00:00
Jim Meyering
1c84606b56 (read_filesystem_list): If SVR4, lock /etc/.mnttab.lock if available,
to avoid race conditions (e.g. with the automounter on Solaris 2.6).

Include <errno.h>, <fcntl.h>, <unistd.h>.
1998-06-30 02:15:43 +00:00
Jim Meyering
aa1c5467ec (fstype_to_string): Guard with #if ! HAVE_F_FSTYPENAME_IN_STATFS. 1998-06-29 17:01:48 +00:00
Jim Meyering
c7af539321 (fsp_to_string): Clean out some crufty #ifdefs
now that we're using the jm_FSTYPENAME autoconf macro.
1998-06-29 01:10:24 +00:00
Jim Meyering
bfbc3ce20c Use #if, not #ifdef with HAVE_ macros 1998-03-15 11:09:10 +00:00
Jim Meyering
d9f1fd86d9 Declare stpcpy only if not defined as macro. 1997-12-25 17:02:25 +00:00
Jim Meyering
4354caa2d4 (read_filesystem_list): Add `|| defined (__OpenBSD__)'
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-28 11:42:29 +00:00
Jim Meyering
90721ff4a4 (read_filesystem_list): Show automount-related
duplicate filesystems only when --all specified.  With suggestions
from Stuart Kemp.
1997-05-24 14:43:21 +00:00
Jim Meyering
1024238089 Indent cpp directives. 1997-05-24 14:42:40 +00:00
Jim Meyering
01839f9f82 remove trailing blanks 1997-01-25 13:50:24 +00:00
Jim Meyering
1751c454c2 (fstype_to_string): Handle fstypes of freebsd.
From Arne Henrik Juul.
1996-10-12 23:21:32 +00:00
Jim Meyering
e8b07e3796 update FSF address in copyright 1996-07-15 03:36:16 +00:00
Jim Meyering
1a34934e94 (read_filesystem_list) [MOUNTED_LISTMNTENT]: New function.
From Johan Danielsson (joda@pdc.kth.se).
1996-05-23 13:04:41 +00:00
Jim Meyering
c25dcdd843 (read_filesystem_list): Cast -1 to dev_t before assignment. 1995-10-05 14:14:45 +00:00
Jim Meyering
deef174caa . 1994-10-08 16:38:01 +00:00
Jim Meyering
14fd34b788 Initial revision 1992-10-31 20:42:48 +00:00