va_start(arguments, fmt);
vsnprintf(msg, sizeof(msg), fmt, arguments);
va_end(arguments);
- openlog("init", 0, LOG_USER);
+ openlog(applet_name, 0, LOG_USER);
syslog(LOG_USER|LOG_INFO, msg);
closelog();
}
} else if ((log_fd = device_open(log, O_RDWR|O_NDELAY)) < 0) {
log_fd = -2;
fprintf(stderr, "Bummer, can't write to log on %s!\r\n", log);
- fflush(stderr);
log = NULL;
device = CONSOLE;
}
fprintf(stderr, "Bummer, can't print: ");
va_start(arguments, fmt);
vfprintf(stderr, fmt, arguments);
- fflush(stderr);
va_end(arguments);
}
}
unsigned int result, u, s=10;
if (sysinfo(&info) != 0) {
- perror_msg("Error checking free memory: ");
+ perror_msg("Error checking free memory");
return -1;
}
{
usage("init\n\nInit is the parent of all processes.\n\n"
"This version of init is designed to be run only "
- "by the kernel.\n");
+ "by the kernel.");
}
/* Set up sig handlers -- be sure to
* clear all of these in run() */
argv[0]="init";
if (argc > 1)
- strncpy(argv[1], "\0", strlen(argv[1])+1);
+ argv[1][0]=0;
/* Now run everything that needs to be run */
va_start(arguments, fmt);
vsnprintf(msg, sizeof(msg), fmt, arguments);
va_end(arguments);
- openlog("init", 0, LOG_USER);
+ openlog(applet_name, 0, LOG_USER);
syslog(LOG_USER|LOG_INFO, msg);
closelog();
}
} else if ((log_fd = device_open(log, O_RDWR|O_NDELAY)) < 0) {
log_fd = -2;
fprintf(stderr, "Bummer, can't write to log on %s!\r\n", log);
- fflush(stderr);
log = NULL;
device = CONSOLE;
}
fprintf(stderr, "Bummer, can't print: ");
va_start(arguments, fmt);
vfprintf(stderr, fmt, arguments);
- fflush(stderr);
va_end(arguments);
}
}
unsigned int result, u, s=10;
if (sysinfo(&info) != 0) {
- perror_msg("Error checking free memory: ");
+ perror_msg("Error checking free memory");
return -1;
}
{
usage("init\n\nInit is the parent of all processes.\n\n"
"This version of init is designed to be run only "
- "by the kernel.\n");
+ "by the kernel.");
}
/* Set up sig handlers -- be sure to
* clear all of these in run() */
argv[0]="init";
if (argc > 1)
- strncpy(argv[1], "\0", strlen(argv[1])+1);
+ argv[1][0]=0;
/* Now run everything that needs to be run */