Author: justin
Date: 2006-05-09 14:24:56 -0600 (Tue, 09 May 2006)
New Revision: 1543
Modified:
branches/6.1.1/initramfs/init.c
Log:
Reverted init.c change (r1387) from 6.1.1 branch.
Modified: branches/6.1.1/initramfs/init.c
===================================================================
--- branches/6.1.1/initramfs/init.c 2006-05-09 20:23:01 UTC (rev 1542)
+++ branches/6.1.1/initramfs/init.c 2006-05-09 20:24:56 UTC (rev 1543)
@@ -25,7 +25,6 @@
int main(int argc, char * argv[], char * envp[])
{
- char **cmd = malloc( sizeof(char *) * (argc+1) );
int i, fd, ffd;
struct loop_info loopinfo;
@@ -148,15 +147,10 @@
/* We're done! Pass control to sysvinit. */
printf("Starting init...\n");
- cmd[0] = malloc( sizeof(char) * 11);
- cmd[0] = strncpy(cmd[0], "/sbin/init", 11);
+ i = execve("/sbin/init", argv, envp);
+ if (i<0)
+ printf("Failed to start init: %s :(\n", strerror(errno));
- for (i=1; i <= argc; i++) {
- cmd[i] = argv[i];
- }
- i = execve(cmd[0], cmd, envp);
- printf("Failed to start init: %s :(\n", strerror(errno));
-
return(0);
}
--
http://linuxfromscratch.org/mailman/listinfo/livecd
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page