diff options
Diffstat (limited to 'common/cmd_doc.c')
-rw-r--r-- | common/cmd_doc.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/common/cmd_doc.c b/common/cmd_doc.c index 31862cf244..e5db1bc360 100644 --- a/common/cmd_doc.c +++ b/common/cmd_doc.c @@ -861,8 +861,13 @@ static int find_boot_record(struct NFTLrecord *nftl) memcpy(mh, buf, sizeof(struct NFTLMediaHeader)); /* Do some sanity checks on it */ - if (mh->UnitSizeFactor != 0xff) { - puts ("Sorry, we don't support UnitSizeFactor " + if (mh->UnitSizeFactor == 0) { +#ifdef NFTL_DEBUG + puts ("UnitSizeFactor 0x00 detected.\n" + "This violates the spec but we think we know what it means...\n"); +#endif + } else if (mh->UnitSizeFactor != 0xff) { + printf ("Sorry, we don't support UnitSizeFactor " "of != 1 yet.\n"); return -1; } @@ -950,6 +955,8 @@ static void DoC2k_init(struct DiskOnChip* this) /* Ident all the chips present. */ DoC_ScanChips(this); + if ((!this->numchips) || (!this->chips)) + return; nftl = &this->nftl; |