when I practice according to LLD3, meet an error:
error: ‘S_IRGUO’ undeclared here (not in a function)
for these lines:
static char *whom = "world ~~~";
static int howmany = 1;
module_param(howmany, int, S_IRGUO);
module_param(whom, charp, S_IRGUO);
so google and baidu, both not find the answer,
but in the end to deep into source code /linux/stat.h
find it is:
#define S_IRWXUGO (S_IRWXU|S_IRWXG|S_IRWXO)
#define S_IALLUGO (S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO)
#define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH)
#define S_IWUGO (S_IWUSR|S_IWGRP|S_IWOTH)
#define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH)
so, this error is also my mis-type !!!
it should be:
module_param(howmany, int, S_IRUGO);
module_param(whom, charp, S_IRUGO);
转载请注明:在路上 » fixed -> error: ‘S_IRGUO’ undeclared here (not in a function)