Reminder to self: the bahaviour with "r+", "w+", etc. needs to be fixed.
Grok this trace and you'll remember why:
me@host:src/whefs-9eaac3c869 >./subfs
whdbg(WHEFS_DBG_F_WARNING):whefs_fs.c:706:whefs_open_FILE():
Opening [my.whefs] with 'r+' failed. Trying 'w+'...
whdbg(WHEFS_DBG_F_ERROR):whefs_fs.c:1211:whefs_openfs_stage2():
Error reading the core magic bytes.
subfs: whefs_cache.c:72: whefs_string_db_memcost: Assertion `0 &&
"whio_dev_ioctl_GENERAL_size not behaving as documented!"' failed.
Aborted
ex41609@teu:src/whefs-9eaac3c869 >./wh
whefs-addblocks whefs-cp whefs-ls whefs-mkfs
whefs-rm whefs2c
ex41609@teu:src/whefs-9eaac3c869 >l my.whefs
-rw-rw-r-- 1 ex41609 ex41609 0 Jun 15 14:19 my.whefs
Tip: my.whefs doesn't exist, so is created (with 0 bytes), then
whefs_openfs() tries to read that. This can be worked around by adding a
flag to whefs_fs.c:whefs_open_FILE(), telling it whether or not to try to
create the file (depending on whether we're calling from openfs() or mkfs()).
Original issue reported on code.google.com by sgbeal@googlemail.com on 17 Jun 2009 at 12:32
Original issue reported on code.google.com by
sgbeal@googlemail.com
on 17 Jun 2009 at 12:32