【问题标题】:send uevent from fs/ext4 driver从 fs/ext4 驱动程序发送 uevent
【发布时间】:2017-06-21 16:30:16
【问题描述】:

看fs/ext4/super.c,我看到了这个函数

static void ext4_handle_error(struct super_block *sb)

如果我想在 ext4_handle_error 函数中使用 uevent 发送一个 uevent,我需要一个 kobj

int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, char *envp_ext[])

问题:有没有办法从 super_block *sb 中获取 *kobj?

【问题讨论】:

    标签: linux-kernel linux-device-driver ext4


    【解决方案1】:

    struct ext4_sb_info *sbi = EXT4_SB(sb); sbi->s_kobj;这样好吗?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-09-19
      • 2014-05-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-20
      • 1970-01-01
      相关资源
      最近更新 更多