From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: Shall 'bmp' uncompress automagically?
Date: Tue, 13 Mar 2012 04:57:29 +0100 [thread overview]
Message-ID: <20120313035729.GG444@game.jcrosoft.org> (raw)
In-Reply-To: <20120310221035.GC14564@pengutronix.de>
On 23:10 Sat 10 Mar , Wolfram Sang wrote:
> 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
I prefer the second one
I send a patch to known the type via command
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-03-13 4:09 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 [this message]
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=20120313035729.GG444@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=barebox@lists.infradead.org \
--cc=w.sang@pengutronix.de \
/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