ChinaUnix.net
相关文章推荐:

printk KERNEMERG 只能打印一个

printk(KERN_INFO fmt,##arg)语句中的##arg是什么意思啊?在网上找了很久没有得到解析,特来问各位大侠!谢谢!

by luozhao1984 - 驱动开发 - 2010-05-03 22:35:16 阅读(2421) 回复(4)

相关讨论

各位大虾,我问下,在printk 中,格式 %Zu 和 %zu 干什么用的。谢谢

by hongbupt - C/C++ - 2008-04-02 11:32:18 阅读(1073) 回复(1)

今天看ldd2看到printk中的格式字符串中有是%p,不知道是什么意思,请教大家了! ssize_t faulty_read (struct file *filp, char *buf, size_t count, loff_t *pos) { int ret, ret2; char stack_buf[4]; printk(KERN_DEBUG "read: buf %p, count %li\n", buf, (long)count); /* the next line oopses with 2.0, but not with 2.2 and later */ ret = copy_to_user(buf, faulty_buf, count); if (!re...

by zhangjiakouzf - 程序开发 - 2006-01-06 10:39:28 阅读(677) 回复(3)

今天看ldd2看到printk中的格式字符串中有是%p,不知道是什么意思,请教大家了! ssize_t faulty_read (struct file *filp, char *buf, size_t count, loff_t *pos) { int ret, ret2; char stack_buf[4]; printk(KERN_DEBUG "read: buf %p, count %li\n", buf, (long)count); /* the next line oopses with 2.0, but not with 2.2 and later */ ret = copy_to_user(buf, faulty_buf, count); if (!re...

by zhangjiakouzf - Linux环境编程 - 2006-01-06 10:39:28 阅读(1473) 回复(3)

代码如下: struct tvp514x_std_info { unsigned long width; unsigned long height; u8 video_std; struct v4l2_standard standard; }; static struct tvp514x_reg tvp514x_reg_list_default[0x40]; static int tvp514x_s_stream(struct v4l2_subdev *sd, int enable); printk(KERN_EMERG " aaaaaaaaaaaaaaaaaaaaaaa %d \n"); 求助各位,为什么我的printk打印信息在超级终端看不到呢?是不是我打印的位置不对呢?

by mch_kot - 内核源码 - 2011-05-11 22:07:12 阅读(6696) 回复(29)

各位大虾: 小弟最近在学习内核编程, 并且动手修改了函数--kernel/printk.c中的tty_write_message函数: /** * tty_write_message - write a message to a certain tty, not just the console. * * This is used for messages that need to be redirected to a specific tty. * We don't put it into the syslog queue right now maybe in the future if * really needed. */ void tty_write_message(struct tty_struct *...

by daizw - 内核源码 - 2007-10-18 22:24:13 阅读(3158) 回复(11)

我在内核的fork中加个printk("ok");编译没问题,可是运行是进不了系统,请问只要打印字符调试信息,用printk不行吗?要是不行,要打印信息用什么语句。我的是ARM2410上的ARMLinux,其实和Linux样的。

by oldbegger - 内核/嵌入技术 - 2004-10-25 10:39:56 阅读(454) 回复(1)

我在内核的fork中加个printk("ok");编译没问题,可是运行是进不了系统,请问只要打印字符调试信息,用printk不行吗?要是不行,要打印信息用什么语句。我的是ARM2410上的ARMLinux,其实和Linux样的。

by oldbegger - 内核源码 - 2004-10-25 10:39:56 阅读(1178) 回复(1)

本帖最后由 shihyu 于 2012-05-28 22:42 编辑 我trace kernel device 代码, device 挂在list 函数指针 , 所以我把函数指针存再 unsigned long int addr_tmp[436]; list 上共有 436 个.. 所以我用for 打印 for (i = 0; i < 436; i++) { printk(KERN_INFO"addr_tmp"); } 不过实际上打印出来不到100个函数地址~请问是因为printk 不能快速打印吗? 有什么办法可以解决~这问题困扰我很久~ 谢谢

by shihyu - 内核源码 - 2012-10-25 10:12:45 阅读(1575) 回复(2)

printk信息打印 printk是内核态信息打印函数,功能和比准C库的printf类似。 printk还有信息打印级别。 函数原型: int printk(const char *fmt, ...) 需要的头文件: #include linux/kernel.h> 消息打印级别: fmt----消息级别: #define KERN_EMERG "" /* system is unusable */ #define KERN_ALERT "" /* action must be taken immediately */ #define KERN_CRIT "" /* critical conditions */ #define KER...

by chenxibing008 - Linux文档专区 - 2007-12-04 16:43:46 阅读(636) 回复(0)

在编译linux内核时,选择了Show timing information on printks 强制为内核信息增加时间戳 可是我看了printk打印信息,为什么printk不是从0开始的?它开始就从1717xxxx这个8位数开始打印的? 怎么回事?

by song0071000 - 内核源码 - 2014-03-24 11:31:30 阅读(2399) 回复(2)