[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/6] hurd: add symbolic name for the mtab translator
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 2/6] hurd: add symbolic name for the mtab translator |
Date: |
Sun, 21 Sep 2014 14:59:45 +0200 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Sun 21 Sep 2014 12:12:32 +0200, a écrit :
> * hurd/paths.h (_HURD_MTAB): New macro.
> * procfs/rootdir.c (rootdir_mounts_get_translator): Use the new macro.
> (rootdir_mounts_exists): Likewise.
Ack.
> ---
> hurd/paths.h | 2 ++
> procfs/rootdir.c | 7 ++-----
> 2 files changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/hurd/paths.h b/hurd/paths.h
> index 4877132..92875b2 100644
> --- a/hurd/paths.h
> +++ b/hurd/paths.h
> @@ -52,5 +52,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA
> 02139, USA. */
> #define _HURD_FIFO _HURD "fifo" /* S_IFIFO */
> #define _HURD_IFSOCK _HURD "ifsock" /* S_IFSOCK */
>
> +/* Symbolic names for all non-essential translators. */
> +#define _HURD_MTAB _HURD "mtab"
>
> #endif /* hurd/paths.h */
> diff --git a/procfs/rootdir.c b/procfs/rootdir.c
> index e500c3a..f92e73d 100644
> --- a/procfs/rootdir.c
> +++ b/procfs/rootdir.c
> @@ -408,9 +408,6 @@ rootdir_gc_fakeself (void *hook, char **contents, ssize_t
> *contents_len)
> return 0;
> }
>
> -/* The mtab translator to use by default for the "mounts" node. */
> -#define MTAB_TRANSLATOR "/hurd/mtab"
> -
> static struct node *rootdir_mounts_node;
> static pthread_spinlock_t rootdir_mounts_node_lock =
> PTHREAD_SPINLOCK_INITIALIZER;
> @@ -455,7 +452,7 @@ rootdir_mounts_make_node (void *dir_hook, const void
> *entry_hook)
> static error_t
> rootdir_mounts_get_translator (void *hook, char **argz, size_t *argz_len)
> {
> - static const char const mtab_argz[] = MTAB_TRANSLATOR "\0/";
> + static const char const mtab_argz[] = _HURD_MTAB "\0/";
>
> *argz = malloc (sizeof mtab_argz);
> if (! *argz)
> @@ -471,7 +468,7 @@ rootdir_mounts_exists (void *dir_hook, const void
> *entry_hook)
> {
> static int translator_exists = -1;
> if (translator_exists == -1)
> - translator_exists = access (MTAB_TRANSLATOR, F_OK|X_OK) == 0;
> + translator_exists = access (_HURD_MTAB, F_OK|X_OK) == 0;
> return translator_exists;
> }
>
> --
> 2.1.0
>
--
Samuel
The nice thing about Windows is - It does not just crash, it displays a
dialog box and lets you press 'OK' first.
(Arno Schaefer's .sig)
- [PATCH 1/2] procfs: implement /proc/N/maps, Justus Winter, 2014/09/18
- [PATCH 2/2] procfs: implement /proc/filesystems, Justus Winter, 2014/09/18
- [PATCH 1/6] procfs: implement /proc/N/mounts, Justus Winter, 2014/09/21
- [PATCH 4/6] procfs: generalize the translator linkage code, Justus Winter, 2014/09/21
- Re: [PATCH 4/6] procfs: generalize the translator linkage code, Justus Winter, 2014/09/21
- [PATCH 1/7] procfs: implement /proc/N/maps, Justus Winter, 2014/09/22
- [PATCH 3/7] procfs: implement /proc/N/mounts, Justus Winter, 2014/09/22
- Re: [PATCH 3/7] procfs: implement /proc/N/mounts, Samuel Thibault, 2014/09/28
- [PATCH 4/7] procfs: do not test whether /hurd/mtab exists, Justus Winter, 2014/09/22
- Re: [PATCH 4/7] procfs: do not test whether /hurd/mtab exists, Samuel Thibault, 2014/09/28
- [PATCH 2/7] procfs: implement /proc/filesystems, Justus Winter, 2014/09/22
- Re: [PATCH 2/7] procfs: implement /proc/filesystems, Samuel Thibault, 2014/09/28
- [PATCH 5/7] procfs: generalize the translator linkage code, Justus Winter, 2014/09/22