<LDD3> 中文版 勘误+学习笔记 page 79
没钱买英文原版的了~300RMB...伤不起啊~中文版和英文的pdf同时在看。
第一遍已经过去了,现在是第二遍。把书中有误的地方一点点整理出来,对LDD3有兴趣,且C 有一定基础的viewer,欢迎通过邮箱联系,交流讨论:
jasonleaster@gmail.com(私人邮箱 非诚勿扰)
--------------------------------------------------------------------Cut line ------------------------------------------------------------------
勘误:八个日志级别字符串的定义在3.13的内核里面已经不再 include/linux/kernel.h 里面了!
在新的header file里面——include/linux/kern_levels.h
#ifndef __KERN_LEVELS_H__
#define __KERN_LEVELS_H__
#define KERN_SOH "\001" /* ASCII Start Of Header */
#define KERN_SOH_ASCII '\001'
#define KERN_EMERG <span style="white-space:pre"> </span>KERN_SOH "0" /* system is unusable */
#define KERN_ALERT <span style="white-space:pre"> </span>KERN_SOH "1" /* action must be taken immediately */
#define KERN_CRIT <span style="white-space:pre"> </span>KERN_SOH "2" /* critical conditions */
#define KERN_ERR <span style="white-space:pre"> </span>KERN_SOH "3" /* error conditions */
#define KERN_WARNING KERN_SOH "4" /* warning conditions */
#define KERN_NOTICE<span style="white-space:pre"> </span> KERN_SOH "5" /* normal but significant condition */
#define KERN_INFO <span style="white-space:pre"> </span>KERN_SOH "6" /* informational */
#define KERN_DEBUG <span style="white-space:pre"> </span>KERN_SOH "7" /* debug-level messages */
#define KERN_DEFAULT KERN_SOH "d" /* the default kernel loglevel */
/*
* Annotation for a "continued" line of log printout (only done after a
* line that had no enclosing \n). Only to be used by core/arch code
* during early bootup (a continued line is not SMP-safe otherwise).
*/
#define KERN_CONT ""
#endif
KERN_SOH