Google
  Web www.spinics.net

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 

[Newbies FAQ]     [Kernel List]     [Site Home]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Rubini]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Networking]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]     [DDR & Rambus]     [UNIX Filesystems]     [Linux Resources]

Add to Google Powered by Linux