R
Roman Mashak
Hello,
consider the following code snippet:
typedef int (read_proc_t)(char *page, char **start, off_t off,int count,
int *eof, void *data);
struct proc_dir_entry {
unsigned short low_ino;
unsigned short namelen;
...
read_proc_t *read_proc;
write_proc_t *write_proc;
...
}
struct proc_dir_entry *test_entry;
Suppose I succesfully initialized 'test_entry' (it's not NULL). Why can't
I declare the function like this:
test_entry->read_proc = test_proc_read;
static read_proc_t test_proc_read(char *page, char **start, off_t off
int count, int *eof, void *data)
{ ... }
I get an error: `test_proc_read' declared as function returning a
function"
I thought as I declared new type with typedef I can use it?
Thanks for explanations.
consider the following code snippet:
typedef int (read_proc_t)(char *page, char **start, off_t off,int count,
int *eof, void *data);
struct proc_dir_entry {
unsigned short low_ino;
unsigned short namelen;
...
read_proc_t *read_proc;
write_proc_t *write_proc;
...
}
struct proc_dir_entry *test_entry;
Suppose I succesfully initialized 'test_entry' (it's not NULL). Why can't
I declare the function like this:
test_entry->read_proc = test_proc_read;
static read_proc_t test_proc_read(char *page, char **start, off_t off
int count, int *eof, void *data)
{ ... }
I get an error: `test_proc_read' declared as function returning a
function"
I thought as I declared new type with typedef I can use it?
Thanks for explanations.