<LDD3> 中文版 勘误+学习笔记 page 79

<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


这里的Start of header和数据通信有关系~
KERN_SOH






  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值