Changeset View
Changeset View
Standalone View
Standalone View
head/stand/common/part.c
Show First 20 Lines • Show All 669 Lines • ▼ Show 20 Lines | #endif | ||||
table = malloc(sizeof(*table)); | table = malloc(sizeof(*table)); | ||||
if (table == NULL) | if (table == NULL) | ||||
goto out; | goto out; | ||||
table->sectors = sectors; | table->sectors = sectors; | ||||
table->sectorsize = sectorsize; | table->sectorsize = sectorsize; | ||||
table->type = PTABLE_NONE; | table->type = PTABLE_NONE; | ||||
STAILQ_INIT(&table->entries); | STAILQ_INIT(&table->entries); | ||||
if (ptable_iso9660read(table, dev, dread) != NULL) { | if (ptable_iso9660read(table, dev, dread) == NULL) { | ||||
if (table->type == PTABLE_ISO9660) | /* Read error. */ | ||||
table = NULL; | |||||
goto out; | goto out; | ||||
} | } else if (table->type == PTABLE_ISO9660) | ||||
goto out; | |||||
#ifdef LOADER_VTOC8_SUPPORT | #ifdef LOADER_VTOC8_SUPPORT | ||||
if (be16dec(buf + offsetof(struct vtoc8, magic)) == VTOC_MAGIC) { | if (be16dec(buf + offsetof(struct vtoc8, magic)) == VTOC_MAGIC) { | ||||
if (ptable_vtoc8read(table, dev, dread) == NULL) { | if (ptable_vtoc8read(table, dev, dread) == NULL) { | ||||
/* Read error. */ | /* Read error. */ | ||||
table = NULL; | table = NULL; | ||||
goto out; | goto out; | ||||
} else if (table->type == PTABLE_VTOC8) | } else if (table->type == PTABLE_VTOC8) | ||||
▲ Show 20 Lines • Show All 255 Lines • Show Last 20 Lines |