Discussion:
cat a /proc entry
ratheesh kannoth
2012-11-21 04:04:09 UTC
Permalink
Hi,

is there size limit on the buffer content as i am using "cat" command
( so ,not allocating any buffer in userspace, so not doing any
copy_to_user from kernel; simply doing sprintf(buffer, %s , data )
from kernel for a big data )

-Ratheesh
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Celelibi
2012-11-21 13:36:57 UTC
Permalink
Post by ratheesh kannoth
Hi,
is there size limit on the buffer content as i am using "cat" command
( so ,not allocating any buffer in userspace, so not doing any
copy_to_user from kernel; simply doing sprintf(buffer, %s , data )
from kernel for a big data )
-Ratheesh
Hello,

I'm not sure to understand your problem.
Do you write userland or kernelland code?
If you write kernel code, why don't you just use the API behind the
/proc file system?
If you write userland code, what is your problem with the buffer
allocation? You can allocate a buffer as big as your memroy allows it.


Celelibi
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Loading...