Sanrome
Sanrome

Reputation: 13

Search proc_dir_entry by name

I need to get pointer to proc_dir_entry by it's name (path).

I see in the Linux source that proc entries are in double-linked list

struct proc_dir_entry {
    .....
    struct proc_dir_entry *next, *parent, *subdir;

So, I could probably loop over the list.

Is there any ready solution for it or should I do myself?

Upvotes: 1

Views: 694

Answers (1)

adobriyan
adobriyan

Reputation: 2662

This code exists but definitely not exported. See xlate_proc_name at fs/proc/generic.c.

Upvotes: 1

Related Questions