char *name;
};
-static struct stor_spec specs[ENUM_MAX] = { { 0, 0, 0, 0, "" }, };
+static struct stor_spec specs[ENUM_MAX] = { { 0, 0, 0, 0, NULL }, };
void dev_stor_init(void)
struct blk_desc *dd;
+ /* Wasn't configured for this type, return 0 directly */
+ if (specs[type].name == NULL)
+ return 0;
+
if (first) {
di->cookie = (void *)blk_get_dev(specs[type].name, 0);
if (di->cookie == NULL)
if (found)
debugf("device found, returning cookie 0x%08x\n",
- (u_int32_t)di->cookie);
+ (u_int32_t)di->cookie);
else
debugf("no device found\n");