Boot framework rework (#45)
[lunaix-os.git] / 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 (file)
index 2ddc9b1..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#include <lunaix/fs/iso9660.h>
-#include <lunaix/fs/probe_boot.h>
-#include <lunaix/mm/valloc.h>
-#include <lunaix/syslog.h>
-
-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->ops.read(pos, (void*)volp, ISO9660_READ_OFF, ISO9660_BLKSZ);
-        if (errno < 0) {
-            kprintf(KINFO "failed %xh:%xh, /dev/%s\n",
-                    pos->ident.fn_grp,
-                    pos->ident.unique,
-                    pos->name.value);
-            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 "%xh:%xh, /dev/%s, %s\n",
-                    pos->ident.fn_grp,
-                    pos->ident.unique,
-                    pos->name.value,
-                    (char*)volp->vol_id);
-            break;
-        }
-    }
-
-done:
-    vfree(volp);
-    return pos;
-}
\ No newline at end of file