Module Name: src
Committed By: christos
Date: Tue Jun 25 18:06:29 UTC 2019
Modified Files:
src/sys/kern: kern_exec.c
Log Message:
add a comment explaining what this does.
To generate a diff of this commit:
cvs rdiff -u -r1.469 -r1.470 src/sys/kern/kern_exec.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/kern_exec.c
diff -u src/sys/kern/kern_exec.c:1.469 src/sys/kern/kern_exec.c:1.470
--- src/sys/kern/kern_exec.c:1.469 Tue Jun 25 12:58:02 2019
+++ src/sys/kern/kern_exec.c Tue Jun 25 14:06:29 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_exec.c,v 1.469 2019/06/25 16:58:02 maxv Exp $ */
+/* $NetBSD: kern_exec.c,v 1.470 2019/06/25 18:06:29 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.469 2019/06/25 16:58:02 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.470 2019/06/25 18:06:29 christos Exp $");
#include "opt_exec.h"
#include "opt_execfmt.h"
@@ -608,6 +608,12 @@ exec_autoload(void)
#endif
}
+/*
+ * Copy the user or kernel supplied upath to the allocated pathbuffer pbp
+ * making it absolute in the process, by prepending the current working
+ * direct if it is not. If offs is supplied it will contain the offset
+ * where the original supplied copy of upath starts.
+ */
int
exec_makepathbuf(struct lwp *l, const char *upath, enum uio_seg seg,
struct pathbuf **pbp, size_t *offs)