Displaying 4 results from an estimated 4 matches for "mnt_sysfs".
Did you mean:
mic_sysfs
2005 Jan 05
1
[PATCH] kinit/kinit.c
...ndef INI_DEBUG
if (pivot_root(".", "old_root") == -1) {
@@ -255,6 +261,8 @@
ret = 2;
goto bail;
}
+ /* the below chdir() is good style after a pivot_root() */
+ chdir("/");
if (mnt_procfs == 1)
umount2("/proc", 0);
@@ -262,18 +270,12 @@
if (mnt_sysfs == 1)
umount2("/sys", 0);
- for (i = 1; i < cmdc; i++) {
- if (strncmp(cmdv[i], "kinit=", 6) == 0) {
- kinit = cmdv[i] + 6;
- }
- }
-
- if (kinit) {
+ if ((kinit = get_arg(cmdc, cmdv, "kinit="))) {
char *s = strrchr(kinit, '/');
if (s) {...
2020 Jun 18
1
[PATCH] Kbuild for klibc and nfsmount: fix multiple definitions
...letions(-)
diff --git a/usr/kinit/kinit.c b/usr/kinit/kinit.c
index 28d29534896f..e2a2439c53ac 100644
--- a/usr/kinit/kinit.c
+++ b/usr/kinit/kinit.c
@@ -15,7 +15,6 @@
#include "run-init.h"
#include "resume.h"
-const char *progname = "kinit";
int mnt_procfs;
int mnt_sysfs;
diff --git a/usr/klibc/getopt_long.c b/usr/klibc/getopt_long.c
index e3d064b0af46..87c0559399e3 100644
--- a/usr/klibc/getopt_long.c
+++ b/usr/klibc/getopt_long.c
@@ -13,8 +13,8 @@
#include <string.h>
#include <getopt.h>
-char *optarg;
-int optind, opterr, optopt;
+extern char *o...
2011 Jul 13
9
[PATCH 0/8] switch_root() enhancements
On a train ride to Bruxelles, brought out my axe and directly attacked
run_init(8). run_init(8) is dead, long live switch_root(8).
The next run on switch_root(8) involves fdopendir,
so another push for the upcoming stdio 1.6 branch.
The following is boot tested with initramfs-tools,
kinit(8) tests would very much be appreciated!?
Michal Suchanek (1):
[klibc] switch_root: Fix single file
2010 Apr 28
1
[PATCH] RFC: Running initscripts from kinit
...e.h>
#include <termios.h>
+#include <dirent.h>
#include "kinit.h"
#include "ipconfig.h"
#include "run-init.h"
#include "resume.h"
+#define INITD "/etc/init.d"
+
const char *progname = "kinit";
int mnt_procfs;
int mnt_sysfs;
@@ -189,6 +193,70 @@ static const char *find_init(const char *root, const char *user)
return path;
}
+static int sort_compare(const void *a, const void *b)
+{
+ return strcmp(a, b);
+}
+
+/* Go through and run all scripts found in /etc/init.d */
+static void do_runscripts()
+{
+ DIR *dir;
+ s...