configfs: add CFGFS_TARGET_MOD macro
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Xiubo Li
5 years ago
63 | 63 |
|
64 | 64 |
#define CFGFS_ROOT "/sys/kernel/config/target"
|
65 | 65 |
#define CFGFS_CORE CFGFS_ROOT"/core"
|
|
66 |
|
|
67 |
#define CFGFS_TARGET_MOD "/sys/module/target_core_user"
|
66 | 68 |
|
67 | 69 |
/* Temporarily limit this to 32M */
|
68 | 70 |
#define VPD_MAX_UNMAP_LBA_COUNT (32 * 1024 * 1024)
|
485 | 485 |
} else {
|
486 | 486 |
tcmu_info("no modules directory '/lib/modules/%s', checking module target_core_user entry in '/sys/modules/'\n",
|
487 | 487 |
u.release);
|
488 | |
ret = stat("/sys/module/target_core_user", &sb);
|
|
488 |
ret = stat(CFGFS_TARGET_MOD, &sb);
|
489 | 489 |
if (!ret) {
|
490 | 490 |
tcmu_dbg("Module target_core_user already loaded\n");
|
491 | 491 |
} else {
|
492 | |
tcmu_err("stat() on '/sys/module/target_core_user' failed: %m\n");
|
|
492 |
tcmu_err("stat() on '%s' failed: %m\n",
|
|
493 |
CFGFS_TARGET_MOD);
|
493 | 494 |
}
|
494 | 495 |
}
|
495 | 496 |
} else {
|