I want to know how to check existence and read files (may be with C linux kernel functions) /proc/mtd and /proc/partitions in my program developped in C (for OpenWrt), without using fopen,fread,... functions?
thanks in advance for your help
To determine whether a file exists you could try getting the file's stats (creation time, protections, etc.). That would not require you to open or read the file's contents. The error code would tell you whether you simply didn't have permission to perform the action or whether the file didn't exist.
As for reading without any of the standard open and read functions, why?! Don't try to reinvent the wheel.