Age | Commit message (Collapse) | Author |
|
too.
|
|
(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.
|
|
|
|
|
|
and don't include <sys/file.h>).
|
|
in comments or local variable names.
|
|
|
|
(ME_DUMMY, ME_REMOTE): Moved here from mountlist.c.
(ME_DUMMY): Count "subfs" as a dummy.
|
|
|
|
a collision on OpenBSD 3.4.
|
|
(errno): Remove decl; we now assume C89 or better.
(xatoi): Remove; replaced by strtoul. Hence device numbers can now
go up to ULONG_MAX.
|
|
All definitions and uses changed.
|
|
|
|
(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.
|
|
|
|
(free): Remove decl.
|
|
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.
|
|
|
|
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.
|
|
|
|
Remove explicit declarations of xmalloc, xrealloc,
and xstrdup. Instead, include "xalloc.h".
|
|
|
|
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.
|
|
(MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
the deprecated MOUNTED symbol is no longer defined in mntent.h.
|
|
per change in ../m4/ls-mntd-fs.m4.
(read_filesystem_list): Ignore symbolic links.
|
|
Avoid warning by casting result to `char *' to remove `const'.
|
|
|
|
(read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
member using the same `ignore'-testing code.
|
|
with the `ignore' attribute. Based on a patch from Mark D. Roth.
|
|
|
|
|
|
|
|
(read_filesystem_list) [MOUNTED_GETMNTENT1]: Use it.
|
|
Christian von Roques
|
|
argument, but put the necessary information into the result so
that the caller can ignore filesystems that he's not
interested in.
From Paul.
|
|
(fstype_to_string): Ansideclify.
|
|
(fsp_to_string): Don't xmalloc return value (yet).
|
|
From Paul Eggert.
|
|
From Andreas Schwab.
|
|
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.
|
|
Plug file descriptor leak on failure.
Report failure if lock file can't be opened for some reason
other than nonexistence.
|
|
Always close stream and file descriptor before returning.
|
|
to avoid race conditions (e.g. with the automounter on Solaris 2.6).
Include <errno.h>, <fcntl.h>, <unistd.h>.
|
|
|
|
now that we're using the jm_FSTYPENAME autoconf macro.
|
|
|
|
|
|
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>
|
|
duplicate filesystems only when --all specified. With suggestions
from Stuart Kemp.
|
|
|