Shall 'bmp' uncompress automagically?

Wolfram Sang w.sang at pengutronix.de
Sat Mar 10 17:10:35 EST 2012


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/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/barebox/attachments/20120310/3d6be2ba/attachment.sig>


More information about the barebox mailing list