kernel modules programming: struct proc question

Roman Bogorodskiy bogorodskiy at inbox.ru
Wed Mar 17 10:51:20 PST 2004


 John wrote:

> Also, you might consider using strncmp() to make the code a bit easier to 
> read, i.e.:
> 
> 	if (strncmp(name, "/tmp/", 5) == 0)
> 		printf("open(2): %s by pid %d (%s)\n", name, td->td_proc->p_pid,
> 		    td->td_proc->p_comm);

Thank you very much, it works. 

-Roman Bogorodskiy

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 479 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20040317/db2b74ae/attachment.bin


More information about the freebsd-hackers mailing list