Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6935463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:06:23+00:00 2026-05-27T12:06:23+00:00

Can someone give me proc_create() example? Earlier they used create_proc_entry() in the kernel but

  • 0

Can someone give me proc_create() example?

Earlier they used create_proc_entry() in the kernel but now they are using proc_create().

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:06:23+00:00Added an answer on May 27, 2026 at 12:06 pm

    This example will create a proc entry which enables reading access. I think you can enable other kinds of access by changing the mode argument passed to the function. I haven’t passed a parent directory because there is no need to. The structure file_operations is where you setup your reading and writing callbacks.

    struct proc_dir_entry *proc_file_entry;
    
    static const struct file_operations proc_file_fops = {
     .owner = THIS_MODULE,
     .open  = open_callback,
     .read  = read_callback,
    };
    
    int __init init_module(void){
      proc_file_entry = proc_create("proc_file_name", 0, NULL, &proc_file_fops);
      if(proc_file_entry == NULL)
       return -ENOMEM;
      return 0;
    }
    

    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

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

can someone give me an example or link to one of using a session
Can someone give me an example of using SSHJ for Public Key Authentication? I
Can someone give me an example of how I would delete a row in
Can someone give an example for finding greatest common divisor algorithm for more than
can someone give me an example of what a calculated control is in ms-access?
Can someone give an example of how thread deadlock can be caused in the
Can someone give me an example of how a child class would access the
Can someone give me an example of the Decorator design pattern in C++ ?
Can someone give me a real life example ( in programming, C#) of needing
Can someone give me a simple example of a AnnotatedTimeLine visualization? All the examples

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.