Commit 9f8b3ee6 authored by jan.koester's avatar jan.koester
Browse files

test

parent 7369b9c3
Loading
Loading
Loading
Loading
+5 −0
Changes for src/iscsi.cpp: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -237,6 +237,11 @@ std::vector<IscsiDevice> iscsiDevices(const Config &cfg) {

bool IscsiServer::start(std::string &err) {
    if (!exists(Target)) {
        // the kernel makes /sys/kernel/config only when it has configfs
        if (!exists(ConfigFs)) {
            err = "this kernel has no configfs (CONFIG_CONFIGFS_FS), so no SCSI target (LIO)";
            return false;
        }
        // configfs mounted? (syslite doesn't do it)
        if (listDir(ConfigFs).empty() && mount("configfs", ConfigFs.c_str(), "configfs", 0, nullptr) != 0 && errno != EBUSY) {
            err = "mounting configfs: " + std::string(strerror(errno));