diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2014-11-11 22:43:22 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2014-11-11 22:43:22 +0100 |
commit | 324c9cdbcd3644a0f8eb467b1ea61b9ff889ae7a (patch) | |
tree | b6fa1321a2e1ecccb1dea57295865556cfa8f61d /procfs | |
parent | cfafc1a905f11da2b856aecea02b8c7e1f95e5dd (diff) |
Make procfs appear in /proc/mounts
d-i needs to be able to check whether /proc is mounted or not.
* procfs/main.c (netfs_get_source): New function.
Diffstat (limited to 'procfs')
-rw-r--r-- | procfs/main.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/procfs/main.c b/procfs/main.c index 54e96823..a620ba1c 100644 --- a/procfs/main.c +++ b/procfs/main.c @@ -259,6 +259,18 @@ netfs_append_args (char **argz, size_t *argz_len) return err; } + +/* The user may define this function. The function must set source to + the source of CRED. The function may return an EOPNOTSUPP to + indicate that the concept of a source device is not applicable. The + default function always returns EOPNOTSUPP. */ +error_t netfs_get_source (struct protid *cred, char *source, size_t source_len) +{ + if (! cred) + return EOPNOTSUPP; + snprintf(source, source_len, "proc"); + return 0; +} error_t root_make_node (struct ps_context *pc, struct node **np) |