[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/6] trans/mtab: ignore translators that do not implement fil
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 3/6] trans/mtab: ignore translators that do not implement file_get_source |
Date: |
Tue, 25 Feb 2014 00:28:18 -0500 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Tue 11 Feb 2014 17:13:09 +0100, a écrit :
> Previously, the mtab translator would guess the source of a filesystem
> translator from its last argument. This made all kinds of
> non-filesystem translators appear in /proc/mounts, causing severe
> problems due to umount --all removing vital passive translator
> records.
>
> Fix this by ignoring all translators that do not explicitly implement
> file_get_source.
Ack.
> * trans/mtab.c (mtab_populate): Ignore translators that do not
> implement file_get_source.
> ---
> trans/mtab.c | 19 ++++++-------------
> 1 file changed, 6 insertions(+), 13 deletions(-)
>
> diff --git a/trans/mtab.c b/trans/mtab.c
> index 9a2c5a6..744c435 100644
> --- a/trans/mtab.c
> +++ b/trans/mtab.c
> @@ -423,19 +423,12 @@ mtab_populate (struct mtab *mtab, const char *path, int
> insecure)
> string_t source;
> err = file_get_source (node, source);
> if (err)
> - {
> - if (err == EOPNOTSUPP)
> - {
> - /* Guess based on the last argument. */
> - err = map_device_to_path (argv[count - 1], &src);
> - if (err)
> - goto errout;
> - }
> - else
> - goto errout;
> - }
> - else
> - src = source;
> + goto errout;
> +
> + /* Guess based on the last argument. */
> + err = map_device_to_path (source, &src);
> + if (err)
> + goto errout;
>
> entry_len = asprintf (&entry, "%s %s %s %s 0 0\n", src, path, type,
> options? options: MNTOPT_DEFAULTS);
> --
> 1.8.5.2
>
--
Samuel
Who wants to remember that escape-x-alt-control-left shift-b puts you into
super-edit-debug-compile mode?
(Discussion in comp.os.linux.misc on the intuitiveness of commands, especially
Emacs.)
- fix the get-children and get-source procedures, Justus Winter, 2014/02/11
- [PATCH 2/6] nfs: implement netfs_get_source, Justus Winter, 2014/02/11
- [PATCH 3/6] trans/mtab: ignore translators that do not implement file_get_source, Justus Winter, 2014/02/11
- Re: [PATCH 3/6] trans/mtab: ignore translators that do not implement file_get_source,
Samuel Thibault <=
- [PATCH 4/6] tmpfs: set diskfs_disk_name to "none", Justus Winter, 2014/02/11
- [PATCH 5/6] trans/mtab: do not map unknown source strings to "none", Justus Winter, 2014/02/11
- [PATCH 6/6] New RPCs, fix build, Justus Winter, 2014/02/11
- [PATCH 1/6] hurd: fix the get-children and get-source procedures, Justus Winter, 2014/02/11
- [PATCH 1/3] libdiskfs: fix typo, Justus Winter, 2014/02/12