[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 10/70: sutils: allow multiple entries for the device "none"
From: |
Samuel Thibault |
Subject: |
[hurd] 10/70: sutils: allow multiple entries for the device "none" |
Date: |
Mon, 16 Sep 2013 07:41:35 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit cc96e7a24e8d6ab074ee9023c99cc6ff88fe9d06
Author: Justus Winter <address@hidden>
Date: Fri Jul 5 17:13:31 2013 +0200
sutils: allow multiple entries for the device "none"
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".
---
sutils/fstab.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/sutils/fstab.c b/sutils/fstab.c
index 1492ccd..e2918a6 100644
--- a/sutils/fstab.c
+++ b/sutils/fstab.c
@@ -457,11 +457,19 @@ fs_remount (struct fs *fs)
return err;
}
-/* Returns the FS entry in FSTAB with the device field NAME (there can only
- be one such entry). */
+/* Returns the FS entry in FSTAB with the device field NAME.
+
+ In general there can only be one such entry. This holds not true
+ for virtual file systems that use "none" as device name.
+
+ If name is "none", NULL is returned. This also makes it possible to
+ add more than one entry for the device "none". */
inline struct fs *
fstab_find_device (const struct fstab *fstab, const char *name)
{
+ if (strcmp (name, "none") == 0)
+ return NULL;
+
struct fs *fs;
for (fs = fstab->entries; fs; fs = fs->next)
if (strcmp (fs->mntent.mnt_fsname, name) == 0)
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 44/70: mount: handle -t auto, (continued)
- [hurd] 44/70: mount: handle -t auto, Samuel Thibault, 2013/09/16
- [hurd] 55/70: libdiskfs: add fsys_get_children, Samuel Thibault, 2013/09/16
- [hurd] 18/70: libshouldbeinlibc: Add nullauth.{c,h}, Samuel Thibault, 2013/09/16
- [hurd] 39/70: libnetfs: register libnetfs-based translators as important, Samuel Thibault, 2013/09/16
- [hurd] 51/70: libihash: add HURD_IHASH_ITERATE_ITEMS macro, Samuel Thibault, 2013/09/16
- [hurd] 15/70: Define and use symbolic names for important processes, Samuel Thibault, 2013/09/16
- [hurd] 52/70: libdiskfs: track file name in struct peropen, Samuel Thibault, 2013/09/16
- [hurd] 50/70: proc: Remove unused declaration of zombie_list, Samuel Thibault, 2013/09/16
- [hurd] 31/70: Merge branch 'master-merge2' into master-merge, Samuel Thibault, 2013/09/16
- [hurd] 12/70: umount: add a umount utility, Samuel Thibault, 2013/09/16
- [hurd] 10/70: sutils: allow multiple entries for the device "none",
Samuel Thibault <=
- [hurd] 08/70: mount: implement -O, --test-opts, Samuel Thibault, 2013/09/16
- [hurd] 07/70: mount: add -f and --fake arguments, Samuel Thibault, 2013/09/16
- [hurd] 11/70: sutils: fix the semantic of -t, --types in fstab.c, Samuel Thibault, 2013/09/16
- [hurd] 42/70: trans: register symlink translators as important, Samuel Thibault, 2013/09/16
- [hurd] 33/70: Reserve RPC ID for proc_set_init_task, Samuel Thibault, 2013/09/16
- [hurd] 06/70: mount: fix mount -oremount with one parameter, Samuel Thibault, 2013/09/16
- [hurd] 04/70: utils: escape arguments in remap.sh, Samuel Thibault, 2013/09/16
- [hurd] 30/70: umount: add a umount utility, Samuel Thibault, 2013/09/16
- [hurd] 32/70: Merge branch 'master-merge', Samuel Thibault, 2013/09/16
- [hurd] 28/70: libnetfs: implement file_get_translator_cntl, Samuel Thibault, 2013/09/16