From: Wolfram Sang <w.sang@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: Shall 'bmp' uncompress automagically?
Date: Tue, 13 Mar 2012 11:23:09 +0100 [thread overview]
Message-ID: <20120313102309.GB2488@pengutronix.de> (raw)
In-Reply-To: <20120313035729.GG444@game.jcrosoft.org>
[-- Attachment #1.1: Type: text/plain, Size: 791 bytes --]
> > since we have 'file_detect_type' in barebox, we could use it to automagically
> > uncompress BMP files. Pseudo-code:
> >
> > if (file_detect_type(bmp) != BMP) {
> > /* No BMP? Try to depack stream */
> > ret = uncompress(bmp, unpacked_bmp);
> > if (ret < 0 || file_detect_type(unpacked_bmp) != BMP)
> > return -ENOBMP;
> > }
> >
> > Is something like this wanted? Or shall this be done entirely via scripts?
> >
> > if [ $file is somehow detected as compressed ]
> > uncompress $file /bmp
> > bmp /bmp
> > rm /bmp
> > else
> > bmp $file
> > fi
> I prefer the second one
Care to explain why?
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-03-13 10:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-10 22:10 Wolfram Sang
2012-03-13 3:57 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-13 10:23 ` Wolfram Sang [this message]
2012-03-13 17:16 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-23 9:46 ` Wolfram Sang
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=20120313102309.GB2488@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=plagnioj@jcrosoft.com \
/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