mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Shall 'bmp' uncompress automagically?
@ 2012-03-10 22:10 Wolfram Sang
  2012-03-13  3:57 ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2012-03-10 22:10 UTC (permalink / raw)
  To: barebox


[-- 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-23  9:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-10 22:10 Shall 'bmp' uncompress automagically? Wolfram Sang
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox