From mboxrd@z Thu Jan 1 00:00:00 1970 From: pebolle@tiscali.nl (Paul Bolle) Date: Tue, 09 Dec 2014 10:26:03 +0100 Subject: kobject sample code In-Reply-To: <20141209022056.GA12373@vega.jjdev.com> References: <20141209022056.GA12373@vega.jjdev.com> Message-ID: <1418117163.2058.81.camel@x220> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Mon, 2014-12-08 at 21:20 -0500, John de la Garza wrote: > I'm looking at samples/kobject/kobject-example.c > > at line 39 foo is read: > > sscanf(buf, "%du", &foo); > > foo is an int so why is it read using %du not %d? My reading of lib/vsprintf.c:vsscanf() is that a "%du" format expects "buf" to contain an integer followed by a literal 'u' char. Is that your reading too? Paul Bolle