From: "sriram neelakandan" <oops2k@rediffmail.com>
To: linux-mtd@lists.infradead.org
Subject: tiny JFFS2 Reader
Date: 10 Aug 2002 16:30:19 -0000 [thread overview]
Message-ID: <20020810163019.19590.qmail@mailFA12.rediffmail.com> (raw)
Hi group,
I am looking for a tiny jffs2 reader that can read a file from a
jffs2 partition..
the code in jffs2reader.c in the MTD utils tar
mtd-20000704.tar.gz (hope this is the latest)
does not have the logic to read beyond the first node of the
file.
basically the following func is called and it doesnt read beyond
the first inode !
--snip--
putblock(char *b, size_t bsize, size_t * rsize,
struct jffs2_raw_inode *n)
{
uLongf dlen = n->dsize;
if (*rsize < n->isize)
bzero(b + *rsize, n->isize - *rsize);
switch (n->compr) {
case JFFS2_COMPR_ZLIB:
uncompress((Bytef *) b + n->offset, &dlen,
(Bytef *) ((char *) n) + sizeof(struct jffs2_raw_inode),
(uLongf) n->csize);
break;
case JFFS2_COMPR_NONE:
memcpy(b + n->offset,
((char *) n) + sizeof(struct jffs2_raw_inode), dlen);
break;
case JFFS2_COMPR_ZERO:
bzero(b + n->offset, dlen);
break;
/* [DYN]RUBIN support required! */
default:
fprintf(stderr, "Unsupported compression method!\n");
exit(EXIT_FAILURE);
}
*rsize = n->isize;
}
How to get the compelete file from the partition? any ideas or is
there any other code.
i looked at the actual JFFS2 kernel code , it uses pretty huge
inode caches which is initted during sys_mount...but i cant
afford to put the MTD & FS code in my tiny bootloader!
TIA
sriram
__________________________________________________________
Give your Company an email address like
ravi @ ravi-exports.com. Sign up for Rediffmail Pro today!
Know more. http://www.rediffmailpro.com/signup/
next reply other threads:[~2002-08-10 16:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-10 16:30 sriram neelakandan [this message]
2002-08-12 6:55 ` tiny JFFS2 Reader Tino Keitel
2002-08-12 7:41 ` Sylvain Meunier
2002-08-12 17:08 ` Russ Dill
-- strict thread matches above, loose matches on Subject: below --
2002-08-12 12:05 Hicks, Jamey
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=20020810163019.19590.qmail@mailFA12.rediffmail.com \
--to=oops2k@rediffmail.com \
--cc=linux-mtd@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