mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
o quick hack to get the proc entry registering
This commit is contained in:
parent
e16c478a25
commit
c0068bdd4f
@ -116,6 +116,8 @@ int _process_control(const char *b, const char *e, int minor)
|
||||
const char *wb, *we;
|
||||
char name[64];
|
||||
int create = 0;
|
||||
struct pf_data *pfd;
|
||||
struct proc_dir_entry *pde;
|
||||
|
||||
/*
|
||||
* create <name> [minor]
|
||||
@ -145,6 +147,20 @@ int _process_control(const char *b, const char *e, int minor)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* FIXME: quick hack */
|
||||
pfd = kmalloc(sizeof(*pfd), GFP_KERNEL);
|
||||
|
||||
if (!pfd)
|
||||
return -ENOMEM;
|
||||
pfd->fn = _process_table;
|
||||
pfd->minor = minor;
|
||||
|
||||
if (!(pde = create_proc_entry(name, 0, _proc_dir)))
|
||||
return -ENOMEM;
|
||||
|
||||
pde->write_proc = _line_splitter;
|
||||
pde->data = pfd;
|
||||
|
||||
return dm_create(name, minor);
|
||||
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user