ext3代码理解

Arp*_*pit 2 c filesystems struct linux-kernel

struct inode_operations ext3_dir_inode_operations = {
        .create         = ext3_create,
        .lookup         = ext3_lookup,
}
Run Code Online (Sandbox Code Playgroud)

此结构分配给inode结构,并进一步分配给文件系统操作结构.我的问题是这面旗帜是什么.create?我们在结构本身进行分配吗?或者是其他版本的C(C99,C89?)允许这种操作?

我希望我的问题很明确.

caf*_*caf 7

它是C99指定的初始化程序.它相当于,在C89中:

struct inode_operations ext3_dir_inode_operations = { 0 };
ext3_dir_inode_operations.create = ext3_create;
ext3_dir_inode_operations.lookup = ext3_lookup;
Run Code Online (Sandbox Code Playgroud)