最新消息:20190717 VPS服务器:Vultr新加坡,WordPress主题:大前端D8,统一介绍入口:关于

fixed -> error: ‘S_IRGUO’ undeclared here (not in a function)

工作和技术 crifan 1408浏览 0评论

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)

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (1)

  1. 齐鲁圈子11年前 (2009-03-22)回复
564 queries in 0.320 seconds, using 19.19MB memory