Can someone give me proc_create() example?
Earlier they used create_proc_entry() in the kernel but now they are using proc_create().
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This example will create a proc entry which enables reading access. I think you can enable other kinds of access by changing the
modeargument passed to the function. I haven’t passed a parent directory because there is no need to. The structurefile_operationsis where you setup your reading and writing callbacks.You can check this example for more details: https://www.linux.com/learn/linux-training/37985-the-kernel-newbie-corner-kernel-debugging-using-proc-qsequenceq-files-part-1