From: andreas.willig@rafi.de
To: barebox@lists.infradead.org
Subject: Barebox Enviroment FileSystem
Date: Wed, 8 May 2013 10:27:39 +0200 [thread overview]
Message-ID: <OFAB321AD6.9AFA0E51-ONC1257B65.002D90FB-C1257B65.002E7A38@o0802.rafi.inhouse> (raw)
Hi there
I'm just about to implement direct access to BareBox Env FileSystem from
Windows Embedded Compact 7 launched through BB and it seems to me I met a
bug in the environment code.
File: common/environment.c
Line: 89 (latest revision by 8th of May)
Function: file_save_action
The creation of the File's INODE is done strange:
87 inode = (struct envfs_inode*)data->writep;
88 inode->magic = ENVFS_32(ENVFS_INODE_MAGIC);
89 inode->headerlen = ENVFS_32(PAD4(namelen + sizeof(struct
envfs_inode_end)));
Now the bug / my question is:
Why is the HeaderLen of the Inode created by padded filename + sizeof
inode_end instead of padded filename + sizeof(inode) did i get something
wrong or is this a bug?
envfs_load will not meet this problem since headerlen is not used during
expansion of FS to ram.
An additional question i got btw: Is it intentionally desired that empty
directories are dropped during creation of bin file? The inode_end seems to
support an empty directory entry, but code does not create such entries.
Thanks in advance
Andreas
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2013-05-08 8:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-08 8:27 andreas.willig [this message]
2013-05-08 21:16 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OFAB321AD6.9AFA0E51-ONC1257B65.002D90FB-C1257B65.002E7A38@o0802.rafi.inhouse \
--to=andreas.willig@rafi.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox