diff options
Diffstat (limited to 'debian/patches/procfs-0003-procfs-implement-proc-N-mounts.patch')
-rw-r--r-- | debian/patches/procfs-0003-procfs-implement-proc-N-mounts.patch | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/debian/patches/procfs-0003-procfs-implement-proc-N-mounts.patch b/debian/patches/procfs-0003-procfs-implement-proc-N-mounts.patch deleted file mode 100644 index 431ec01e..00000000 --- a/debian/patches/procfs-0003-procfs-implement-proc-N-mounts.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 5deac76856050d42d26f08d11a27d13d8de9ed4d Mon Sep 17 00:00:00 2001 -From: Justus Winter <4winter@informatik.uni-hamburg.de> -Date: Fri, 19 Sep 2014 07:54:04 +0200 -Subject: [PATCH 3/7] procfs: implement /proc/N/mounts - -* procfs/process.c (process_gc_mounts): New function. -(process_symlink_make_node): Likewise. -(entries): Use the new functions to provide a symlink to ../mounts. ---- - procfs/process.c | 27 +++++++++++++++++++++++++++ - 1 file changed, 27 insertions(+) - -diff --git a/procfs/process.c b/procfs/process.c -index a9b1a59..f5da0d2 100644 ---- a/procfs/process.c -+++ b/procfs/process.c -@@ -202,6 +202,16 @@ process_file_gc_maps (struct proc_stat *ps, char **contents) - return contents_len; - } - -+static error_t -+process_gc_mounts (void *hook, char **contents, ssize_t *contents_len) -+{ -+#define MOUNTSLINK "../mounts" -+ *contents = MOUNTSLINK; -+ *contents_len = sizeof MOUNTSLINK - 1; -+#undef MOUNTSLINK -+ return 0; -+} -+ - static ssize_t - process_file_gc_stat (struct proc_stat *ps, char **contents) - { -@@ -420,6 +430,14 @@ process_stat_make_node (void *dir_hook, const void *entry_hook) - return np; - } - -+static struct node * -+process_symlink_make_node (void *dir_hook, const void *entry_hook) -+{ -+ struct node *np = procfs_make_node (entry_hook, dir_hook); -+ if (np) -+ procfs_node_chtype (np, S_IFLNK); -+ return np; -+} - - /* Implementation of the process directory per se. */ - -@@ -450,6 +468,15 @@ static struct procfs_dir_entry entries[] = { - }, - }, - { -+ .name = "mounts", -+ .hook = & (struct procfs_node_ops) { -+ .get_contents = process_gc_mounts, -+ }, -+ .ops = { -+ .make_node = process_symlink_make_node, -+ }, -+ }, -+ { - .name = "stat", - .hook = & (struct process_file_desc) { - .get_contents = process_file_gc_stat, --- -2.1.0 - |