Age | Commit message (Collapse) | Author |
|
The mount utility on both Linux and FreeBSD allows one to either
specify a whitelist or a blacklist of filesystem types to consider for
--all. Prefixing the list with "no" indicates that the list is a
blacklist. Furthermore, Linux' mount utility ignores a "no" prefix on
any entry in the given list.
Previously the Hurd variant first applied whitelist containing all
positive values given and then filtered the resulting list using all
negative values. But this makes little sense because each entry only
has one value for the filesystem type (mnt_type) and all values are
mutually exclusive.
This patch adjusts the fstab handling code so that our mount utility
behaves like the Linux mount utility. This code is used by both mount
and fsck. The same argumentation applies to fsck as well.
Like implemented in Linux mount, any "no" prefix is ignored to retain
compatibility with the old behavior.
* sutils/fstab.c (fstab_argp_create): Fix semantic of --types.
|
|
Previously it was not possible to add two mount entries with the same
device information to an fstab structure. This is easily fixed by
breaking the assumption, that there is only one possible mount entry
for the "none" device as used by many purely virtual file systems.
* utils/fstab.c (fstab_find_device): Return NULL if name is "none".
|
|
Fix a compiler warning by dropping the const qualifier. It is not
appropriate to qualify pointers to dynamically allocated memory as
const.
* sutils/fstab.c (real_name): Drop const qualifier.
|
|
Fix crash when invoking mount with a pair of parameters which already exists
in fstab
* sutils/fstab.c (fstab_add_mntent): Do not free `mounted_fs' when it is the
same as `fs'.
|
|
For symlinks and non-absolute paths.
* sutils/fstab.c (fstab_find): Also call `fstab_find_device' and
`fstab_find_mount' on path returned by `realpath'.
|
|
* fstab.c (STORE): Only copy when field exists (is non-zero).
Reported by Alexey Dejeka <alexey@comail.ru>.
|
|
|
|
* fstab.c (fstypes_get): Check strdup return for ENOMEM failure.
(fstypes_find_program): New function, #if 0'd out for now.
(fstab_argp, fstab_argp_create, options, parse_opt): New variables
and functions.
* fstab.h: Misc comment fixes.
(struct fstab_argp_params): New type.
(fstab_argp, fstab_argp_create): Declare them.
* fsck.c (options): Remove --fstab/-F, --search-fmts/-S,
--exclude-root/-R, --exclude/-X, --fstype/-t, --all/-A;
all of these are now factored out into fstab_argp.
(main): Remove parsing code for options now in fstab_argp.
Instead, use fstab_argp as an argp_child and use fstab_argp_create
to process the option-parsing results into a struct fstab * to process.
* fstab.c (fstab_read): Undo change of 1999-09-17.
It should not be necessary at all, given 1999-05-23 change, and:
(fstab_find_mount): Do not consider name "ignore" to match any mount.
|
|
* fstab.c (fstab_read): Ignore filesystems with types of ignore,
nfs, or swap.
|
|
* fstab.c (fstypes_get): Don't free PROGRAM twice on ENOENT failure.
|
|
* fstab.c, fstab.h: Add numerous `const' qualifiers.
* fstab.c (fstab_find_mount): Don't count "none" or "-" as matching
any other entry.
|
|
* fstab.c: Rename fsys_remount -> fsys_update in extern decl.
|
|
|
|
file_get_translator_cntl can also return ENXIO for an inactive translator.
|
|
Improve error behavior a bit.
Fill in FSTYPE in the case where we added a new type.
(fs_set_mntent):
Avoid null deferences.
|
|
Use fsys_update instead of fsys_remount.
|
|
|
|
(fs_set_mntent): Don't keep old fsys fields if the mnt_dir is changed.
(fstab_add_mntent): Initialize fields in FS with non-zero values.
(_fs_check_mounted): The root is always mounted.
|
|
If fsys_set_options returns EINVAL, return EOPNOTSUPP instead.
(fs_set_readonly): Use fsys_set_readonly.
(fs_remount): Use fsys_remount.
(fs_readonly): Use fsys_get_readonly.
(_fs_check_mounted): Use file_name_lookup_carefully.
|
|
|