#define DEFAULT_LOG_LEVEL L_NOTICE
-enum {
- L_CRIT,
- L_WARNING,
- L_NOTICE,
- L_INFO,
- L_DEBUG
-};
-
static int log_level = DEFAULT_LOG_LEVEL;
static const int log_class[] = {
[L_CRIT] = LOG_CRIT,
retry:
read_len = len = read(fd->fd, buf, maxlen);
- if (len <= 0) {
- if (errno == EINTR)
+ if (len < 0) {
+ if (errno == EAGAIN)
goto retry;
goto out;
- }
+ } else if (len == 0)
+ goto out;
+
proc->log_buf_ofs += len;
cur = buf;
static void netifd_do_reload(struct uloop_timeout *timeout)
{
- config_init_interfaces(NULL);
+ config_init_all();
}
static struct uloop_timeout main_timer;
return 1;
}
- config_init_interfaces(NULL);
+ config_init_all();
uloop_run();
netifd_kill_processes();