todo: modpost undefined errors
This commit is contained in:
@@ -40,7 +40,7 @@ typedef gid_t kgid_t;
|
||||
struct procfs_entry {
|
||||
char *name;
|
||||
mode_t mode;
|
||||
const struct file_operations *fops;
|
||||
const struct proc_ops *fops;
|
||||
};
|
||||
|
||||
#define NOD(NAME, MODE, FOP) { \
|
||||
@@ -58,8 +58,8 @@ struct procfs_entry {
|
||||
static const struct procfs_entry tid_entry_stuff[];
|
||||
static const struct procfs_entry pid_entry_stuff[];
|
||||
static const struct procfs_entry base_entry_stuff[];
|
||||
static const struct file_operations mckernel_forward_ro;
|
||||
static const struct file_operations mckernel_forward;
|
||||
static const struct proc_ops mckernel_forward_ro;
|
||||
static const struct proc_ops mckernel_forward;
|
||||
|
||||
static ssize_t mckernel_procfs_read(struct file *file, char __user *buf,
|
||||
size_t nbytes, loff_t *ppos);
|
||||
@@ -84,7 +84,7 @@ struct procfs_list_entry {
|
||||
* file.
|
||||
*/
|
||||
LIST_HEAD(procfs_file_list);
|
||||
DEFINE_SEMAPHORE(procfs_file_list_lock);
|
||||
DEFINE_SEMAPHORE(procfs_file_list_lock, 1);
|
||||
|
||||
static char *
|
||||
getpath(struct procfs_list_entry *e, char *buf, int bufsize)
|
||||
@@ -183,10 +183,10 @@ add_procfs_entry(struct procfs_list_entry *parent, const char *name, int mode,
|
||||
pde = proc_symlink(name, parent_pde, (char *)opaque);
|
||||
}
|
||||
else {
|
||||
const struct file_operations *fop;
|
||||
const struct proc_ops *fop;
|
||||
|
||||
if(opaque)
|
||||
fop = (const struct file_operations *)opaque;
|
||||
fop = (const struct proc_ops *)opaque;
|
||||
else if(mode & S_IWUSR)
|
||||
fop = &mckernel_forward;
|
||||
else
|
||||
@@ -509,7 +509,7 @@ static ssize_t __mckernel_procfs_read_write(
|
||||
struct proc_dir_entry *dp = PDE(inode);
|
||||
struct procfs_list_entry *e = dp->data;
|
||||
#else
|
||||
struct procfs_list_entry *e = PDE_DATA(inode);
|
||||
struct procfs_list_entry *e = pde_data(inode);
|
||||
#endif
|
||||
loff_t offset = *ppos;
|
||||
char pathbuf[PROCFS_NAME_MAX];
|
||||
@@ -770,16 +770,16 @@ int procfsm_packet_handler(void *os, int msg, int pid, unsigned long arg,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct file_operations mckernel_forward_ro = {
|
||||
.llseek = mckernel_procfs_lseek,
|
||||
.read = mckernel_procfs_read,
|
||||
.write = NULL,
|
||||
static const struct proc_ops mckernel_forward_ro = {
|
||||
.proc_lseek = mckernel_procfs_lseek,
|
||||
.proc_read = mckernel_procfs_read,
|
||||
.proc_write = NULL,
|
||||
};
|
||||
|
||||
static const struct file_operations mckernel_forward = {
|
||||
.llseek = mckernel_procfs_lseek,
|
||||
.read = mckernel_procfs_read,
|
||||
.write = mckernel_procfs_write,
|
||||
static const struct proc_ops mckernel_forward = {
|
||||
.proc_lseek = mckernel_procfs_lseek,
|
||||
.proc_read = mckernel_procfs_read,
|
||||
.proc_write = mckernel_procfs_write,
|
||||
};
|
||||
|
||||
#define PA_NULL (-1L)
|
||||
@@ -812,7 +812,7 @@ static int mckernel_procfs_buff_open(struct inode *inode, struct file *file)
|
||||
struct proc_dir_entry *dp = PDE(inode);
|
||||
struct procfs_list_entry *e = dp->data;
|
||||
#else
|
||||
struct procfs_list_entry *e = PDE_DATA(inode);
|
||||
struct procfs_list_entry *e = pde_data(inode);
|
||||
#endif
|
||||
|
||||
os = osnum_to_os(e->osnum);
|
||||
@@ -1071,12 +1071,12 @@ rep:
|
||||
return l;
|
||||
}
|
||||
|
||||
static const struct file_operations mckernel_buff_io = {
|
||||
.llseek = mckernel_procfs_lseek,
|
||||
.read = mckernel_procfs_buff_read,
|
||||
.write = NULL,
|
||||
.open = mckernel_procfs_buff_open,
|
||||
.release = mckernel_procfs_buff_release,
|
||||
static const struct proc_ops mckernel_buff_io = {
|
||||
.proc_lseek = mckernel_procfs_lseek,
|
||||
.proc_read = mckernel_procfs_buff_read,
|
||||
.proc_write = NULL,
|
||||
.proc_open = mckernel_procfs_buff_open,
|
||||
.proc_release = mckernel_procfs_buff_release,
|
||||
};
|
||||
|
||||
static const struct procfs_entry tid_entry_stuff[] = {
|
||||
|
||||
Reference in New Issue
Block a user