ask for help. question about snprintf()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, All.
 
in a kernel modules, i used "snprintf()" to ouput some strings to the terminal.
eg:
...
len = 0;
for (i = 0; i < stat->ent_count; i++) {
p = &stat->ent_stat[i];
len += snprintf((page + len), (count - len), "[%u] : id = %Lu, type = %Lu.\n", \
i, p->rs_id, p->rs_type);
}
...
 
i am sure that "stat->ent_count > 0", "count" is large enough and "page" is a valid pointer. But there is no results on the terminal.
 
so i ask for help, thx everyone.  Best Regards!
 
 
Payphone LIOU 

2008-05-20 

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux