create_proc_info_entry

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

 



When I use create_proc_info_entry thusly:

create_proc_info_entry( "foo/bar", 0, 0, show_foo_bar );

The signature of the show_foo_bar function seems required to be:

static int show_foo_bar( char *buffer, char **start, off_t offset, int length )

If I change that whatsoever I get this warning: function declaration
isn't a prototype, when it is called.  Ok, but what if I just want my
proc info entry to display something really static, like say, the
integer 17?

static int show_foo_bar( char *buffer, char **start, off_t offset, int length )
{
 int size;
 size = 17;
 return size;
}

And then I do:

cat /proc/foo/bar
?UU0

But that's not the integer 17.


--
Greg Donald
http://destiney.com/

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[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