int ramlog_syslog_channel(void) { int ret; /* Register the syslog character driver */ ret = register_driver(CONFIG_SYSLOG_DEVPATH, &g_ramlogfops, 0666, &g_sysdev); if (ret < 0) { return ret; } /* Use the RAMLOG as the SYSLOG channel */ return syslog_channel(&g_ramlog_syslog_channel); }
int syslog_dev_channel(void) { int ret; /* Initialize the character driver interface */ ret = syslog_dev_initialize(CONFIG_SYSLOG_DEVPATH, OPEN_FLAGS, OPEN_MODE); if (ret < 0) { return ret; } /* Use the character driver as the SYSLOG channel */ return syslog_channel(&g_syslog_dev_channel); }
int syslog_console_channel(void) { int ret; /* Initialize the character driver interface */ ret = syslog_dev_initialize("/dev/console", OPEN_FLAGS, OPEN_MODE); if (ret < 0) { return ret; } /* Use the character driver as the SYSLOG channel */ return syslog_channel(&g_syslog_console_channel); }