fix for checking CLEAN-ness of ramdisk image
. pre-cleanflag ("old") mkfs generates without CLEAN flag, causing boot not working because imgrd disappears after 1st close . fixed sanity check for this situation . disable imgrd disappearing in memory driver so readonly mount succeeds in case it happens anyway
This commit is contained in:
parent
94715d8e54
commit
51de979ed9
2 changed files with 3 additions and 0 deletions
|
@ -526,6 +526,7 @@ PRIVATE int m_block_close(dev_t minor)
|
|||
}
|
||||
openct[minor]--;
|
||||
|
||||
#if 0
|
||||
/* Special case: free initial ramdisk after it's been unmounted once. */
|
||||
if(minor == IMGRD_DEV && openct[minor] == 0 && m_vaddrs[IMGRD_DEV]) {
|
||||
vir_bytes vaddr, vlen;
|
||||
|
@ -547,6 +548,7 @@ PRIVATE int m_block_close(dev_t minor)
|
|||
m_geom[IMGRD_DEV].dv_size= cvul64(0);
|
||||
m_vaddrs[IMGRD_DEV] = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
return(OK);
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@ image: proto.gen mtab rc $(EXTRA)
|
|||
then : ; \
|
||||
else echo "CLEAN sanity check of image failed." ; \
|
||||
echo "(Perhaps install current mkfs and fsck.)" ; \
|
||||
rm -f image; false; \
|
||||
fi
|
||||
|
||||
ahci: ../ahci/ahci
|
||||
|
|
Loading…
Reference in a new issue