printk is much like printf, but you have to specify a priority message. You can choose from: KERN_NOTICE KERN_DEBUG KERN_INFO KERN_WARNING KERN_ERR KERN_EMERG KERN_ALERT KERN_CRIT So you could do, printk(KERN_INFO, "%d\n", some_struct->your_field); Dave On Fri, 2004-06-11 at 13:10, Cristina Rivera wrote: > Hello everybody, > > I need some help with printk. Well, I'm trying to obtain what is containing > a kernel structure that I've created. It has two fields that are unsigned > long and I need to know if they have the value that the user is passing to > the kernel through a system call. > > I've done printk ( " %d \n", structfield) but it doesn't work. I also have > changed the %d for a %l but it is still not working. > > What's the correct syntax for printing an unsigned long in a structure? > > Thanks in advance. > > Cristina. > > _________________________________________________________________ > Dale rienda suelta a tu tiempo libre. Encuentra mil ideas para exprimir tu > ocio con MSN Entretenimiento. http://entretenimiento.msn.es/ > > > -- > Kernelnewbies: Help each other learn about the Linux kernel. > Archive: http://mail.nl.linux.org/kernelnewbies/ > FAQ: http://kernelnewbies.org/faq/ > > -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/