From: Libo Chen <clbchenlibo.chen@xxxxxxxxxx> On 2012-11-19 22:29, Serge E. Hallyn wrote:> Quoting Rui Xiang (leo.ruixiang@xxxxxxxxx): >> From: Libo Chen <clbchenlibo.chen@xxxxxxxxxx> >> >> We re-implement printk by additional syslog_ns. >> >> The function include printk, /dev/kmsg, do_syslog and kmsg_dump should be modifyed >> for syslog_ns. Previous identifier *** such as log_first_seq should be replaced >> by syslog_ns->***. >> >> Signed-off-by: Libo Chen <clbchenlibo.chen@xxxxxxxxxx> >> Signed-off-by: Xiang Rui <rui.xiang@xxxxxxxxxx> >> --- ....... >> lockdep_on(); >> @@ -1624,7 +1618,8 @@ EXPORT_SYMBOL(vprintk_emit); >> >> asmlinkage int vprintk(const char *fmt, va_list args) >> { >> - return vprintk_emit(0, -1, NULL, 0, fmt, args); >> + return vprintk_emit(0, -1, NULL, 0, fmt, args, >> + current_syslog_ns()); >> } >> EXPORT_SYMBOL(vprintk); >> >> @@ -1636,7 +1631,8 @@ asmlinkage int printk_emit(int facility, int level, >> int r; >> >> va_start(args, fmt); >> - r = vprintk_emit(facility, level, dict, dictlen, fmt, args); >> + r = vprintk_emit(facility, level, dict, dictlen, fmt, args, >> + current_syslog_ns()); >> va_end(args); >> >> return r; >> @@ -1678,7 +1674,7 @@ asmlinkage int printk(const char *fmt, ...) >> } >> #endif >> va_start(args, fmt); >> - r = vprintk_emit(0, -1, NULL, 0, fmt, args); >> + r = vprintk_emit(0, -1, NULL, 0, fmt, args, current_syslog_ns()); > > Current is meaningless here. The default should be using init_syslog_ns. Thank for your attention. I understand what you mean. printk -> init_syslog_log nsprintk(ns) -> container syslog I think it makes sense. thanks Libo Chen _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/containers