X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/0b6fbe304e14f104a9e8cf43a09bf60709d44207..bffa3430fbbaaad29bec0b5bee9c1f0bfc7fd068:/lunaix-os/kernel/fs/probe_boot.c diff --git a/lunaix-os/kernel/fs/probe_boot.c b/lunaix-os/kernel/fs/probe_boot.c deleted file mode 100644 index 69af61e..0000000 --- a/lunaix-os/kernel/fs/probe_boot.c +++ /dev/null @@ -1,50 +0,0 @@ -#include -#include -#include -#include - -LOG_MODULE("PROBE") - -#define LUNAIX_ID 0x414e554cUL // "LUNA" - -struct device* -probe_boot_medium() -{ - struct device* block_cat = device_getbyname(NULL, "block", 5); - if (!block_cat) { - return NULL; - } - - struct iso_vol_primary* volp = valloc(ISO9660_BLKSZ); - - struct device *pos, *n; - llist_for_each(pos, n, &block_cat->children, siblings) - { - int errno = - pos->read(pos, (void*)volp, ISO9660_READ_OFF, ISO9660_BLKSZ); - if (errno < 0) { - kprintf(KWARN "can not probe %x:%s (%d)\n", - pos->dev_id, - pos->name.value, - errno); - pos = NULL; - goto done; - } - - if (*(u32_t*)volp->header.std_id != ISO_SIGNATURE_LO) { - continue; - } - - if (*(u32_t*)volp->sys_id == LUNAIX_ID) { - kprintf(KINFO "[%x:%s] %s\n", - pos->dev_id, - pos->name.value, - (char*)volp->vol_id); - break; - } - } - -done: - vfree(volp); - return pos; -} \ No newline at end of file