From b2c97e251bb470e6f967c716081675a96dbde59c Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Mon, 19 Dec 2016 02:13:06 +0100 Subject: procfs: provide magic retry response for /proc/self * hurd/hurd_types.h: Document the magic retry string `pid'. * hurd/paths.h (_HURD_MAGIC): New macro. * procfs/main.c: Remove all code related to faking /proc/self. * procfs/main.h: Likewise. * procfs/rootdir.c: Likewise. Instead, return the magic retry response `pid' for the `self' node. --- hurd/hurd_types.h | 3 +++ hurd/paths.h | 1 + 2 files changed, 4 insertions(+) (limited to 'hurd') diff --git a/hurd/hurd_types.h b/hurd/hurd_types.h index 43411778..2960a294 100644 --- a/hurd/hurd_types.h +++ b/hurd/hurd_types.h @@ -114,6 +114,9 @@ enum retry_type as for FS_RETRY_NORMAL. "/..." means retry "...", but starting from the users root directory. + + "pid/..." means replace `pid' with the PID of the current process in %u + format and then retry as for FS_RETRY_NORMAL. */ }; typedef enum retry_type retry_type; diff --git a/hurd/paths.h b/hurd/paths.h index a13ba9b7..e1b00e90 100644 --- a/hurd/paths.h +++ b/hurd/paths.h @@ -54,6 +54,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #define _HURD_IFSOCK _HURD "ifsock" /* S_IFSOCK */ /* Symbolic names for all non-essential translators. */ +#define _HURD_MAGIC _HURD "magic" #define _HURD_MTAB _HURD "mtab" #endif /* hurd/paths.h */ -- cgit v1.2.3