Displaying 3 results from an estimated 3 matches for "init_argc".
Did you mean:
init_argv
2006 May 10
1
[patch] kinit cmdline handling change
...1; a < argc && v < vmax; a++) {
- if ( cmdv )
- cmdv[v] = argv[a];
- v++;
- }
-
if ( cmdv )
cmdv[v] = NULL;
@@ -252,11 +252,6 @@
gettimeofday(&now, NULL);
srand48(now.tv_usec ^ (now.tv_sec << 24));
- /* Default parameters for anything init-like we execute */
- init_argc = argc;
- init_argv = alloca((argc+1)*sizeof(char *));
- memcpy(init_argv, argv, (argc+1)*sizeof(char *));
-
if ((fd = open("/dev/console", O_RDWR)) != -1) {
dup2(fd, STDIN_FILENO);
dup2(fd, STDOUT_FILENO);
@@ -293,6 +288,11 @@
goto bail;
}
+ /* Default parameters for anythi...
2005 Jan 05
1
[PATCH] kinit/kinit.c
A patch for a few more hiccups and trivialities in kinit.c:
* The check_path() calls check for "/root" and "/old_root" - I believe
that should be "/root" and "/root/old_root".
* chdir("/") is recommended after pivot_root()
* init_argv[0] isn't set properly to the basename pointed to by char *s
- this fix also eliminates six lines of
2010 Apr 28
1
[PATCH] RFC: Running initscripts from kinit
...cript */
+ for (i = 0; i < used_count; i++) {
+ sprintf(buf, "%s/%s", INITD, names[i]);
+ system(buf);
+ }
+out:
+ for (i = 0; i < used_count; i++)
+ free(names[i]);
+ free(names);
+ closedir(dir);
+}
+
/* This is the argc and argv we pass to init */
const char *init_path;
int init_argc;
@@ -288,6 +356,8 @@ int main(int argc, char *argv[])
check_path("/root");
do_mounts(cmdc, cmdv);
+ do_runscripts();
+
if (mnt_procfs) {
umount2("/proc", 0);
mnt_procfs = 0;
--
1.7.0.1