/* vi: set sw=4 ts=4: */
+/*
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
+ */
+
/*
devfsd implementation for busybox
va_start(ap, fmt);
ret = access ("/dev/log", F_OK);
if (ret == 0) {
- openlog(bb_applet_name, 0, LOG_DAEMON);
+ openlog(applet_name, 0, LOG_DAEMON);
vsyslog( pri , fmt, ap);
/* Man: A trailing newline is added when needed. */
closelog();
if (chdir (mount_point) != 0)
devfsd_perror_msg_and_die(mount_point);
- fd = bb_xopen (".devfsd", O_RDONLY);
+ fd = xopen (".devfsd", O_RDONLY);
if (fcntl (fd, F_SETFD, FD_CLOEXEC) != 0)
devfsd_perror_msg_and_die("FD_CLOEXEC");
if ( print_version || (DEVFSD_PROTOCOL_REVISION_DAEMON != proto_rev) )
{
- bb_printf( "%s v%s\nDaemon %s:\t%d\nKernel-side %s:\t%d\n",
- bb_applet_name,DEVFSD_VERSION,bb_msg_proto_rev,
- DEVFSD_PROTOCOL_REVISION_DAEMON,bb_msg_proto_rev, proto_rev);
+ printf( "%s v%s\nDaemon %s:\t%d\nKernel-side %s:\t%d\n",
+ applet_name,DEVFSD_VERSION,bb_msg_proto_rev,
+ DEVFSD_PROTOCOL_REVISION_DAEMON,bb_msg_proto_rev, proto_rev);
if (DEVFSD_PROTOCOL_REVISION_DAEMON != proto_rev)
bb_error_msg_and_die( "%s mismatch!",bb_msg_proto_rev);
exit(EXIT_SUCCESS); /* -v */
if (sigaction (SIGHUP, &new_action, NULL) != 0 || sigaction (SIGUSR1, &new_action, NULL) != 0 )
devfsd_error_msg_and_die( "sigaction");
- bb_printf("%s v%s started for %s\n",bb_applet_name, DEVFSD_VERSION, mount_point);
+ printf("%s v%s started for %s\n",applet_name, DEVFSD_VERSION, mount_point);
/* Set umask so that mknod(2), open(2) and mkdir(2) have complete control over permissions */
umask (0);
when, name, what,
p[0], p[1], p[2], p[3], p[4], p[5], p[6]);
- i = compare_string_array(options, when );
+ i = index_in_str_array(options, when );
/*"CLEAR_CONFIG"*/
if( i == 0)
goto process_config_line_err;
}
- i = compare_string_array(options, what );
+ i = index_in_str_array(options, what );
switch(i)
{
num_args -= 3;
for (count = 0; count < num_args; ++count)
- new->u.execute.argv[count] = bb_xstrdup (p[count]);
+ new->u.execute.argv[count] = xstrdup (p[count]);
new->u.execute.argv[num_args] = NULL;
break;
if (num_args != 2)
goto process_config_line_err; /* missing path and function in line */
- new->u.copy.source = bb_xstrdup (p[0]);
- new->u.copy.destination = bb_xstrdup (p[1]);
+ new->u.copy.source = xstrdup (p[0]);
+ new->u.copy.destination = xstrdup (p[1]);
break;
case 8: /* IGNORE */
/* FALLTROUGH */
/* Here on error we should do exit(RV_SYS_ERROR), instead we do exit(EXIT_FAILURE) */
hostname[STRING_LENGTH - 1] = '\0';
- /* compare_string_array returns i>=0 */
- i=compare_string_array(field_names, variable);
+ /* index_in_str_array returns i>=0 */
+ i=index_in_str_array(field_names, variable);
if ( i > 6 || i < 0 || (i > 1 && gv_info == NULL))
return (NULL);