| LKM programming - problem with printk(); Hello,
I've got a problem with printk() function. Im trying to print some buffor char by char like: Code: for(i=0;i<=len;i++)
printk(KERN_ALERT "%c", k_space[i]);
But then i see in /var/log/syslog something like:
Aug 7 11:52:01 dstool kernel: i<1>n<1>s<1>m<1>o<1>d<1><1><1>
Aug 7 11:52:01 dstool kernel: e<1>.<1>o<1><1><1>
With some extra "<1>". Why it appears? When i print k_space as one string i don't have this "<1>". At first i though it was some problem with user space <-> kernel space but it transformed orginall buffor to k_space like: Code: if ((k_space=(char *)kmalloc(len, GFP_KERNEL))==NULL)
return -1;
memcpy_fromfs((void *)k_space, (void *)argv[argc], len);
And it didnt solve the problem. Any ideas what to do with this ? |