From: Wolfram Sang <w.sang@pengutronix.de>
To: barebox@lists.infradead.org
Subject: Shall 'bmp' uncompress automagically?
Date: Sat, 10 Mar 2012 23:10:35 +0100 [thread overview]
Message-ID: <20120310221035.GC14564@pengutronix.de> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 700 bytes --]
Hi,
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
?
Regards,
Wolfram
--
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 reply other threads:[~2012-03-10 22:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-10 22:10 Wolfram Sang [this message]
2012-03-13 3:57 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-13 10:23 ` Wolfram Sang
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=20120310221035.GC14564@pengutronix.de \
--to=w.sang@pengutronix.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