Re: Shall 'bmp' uncompress automagically?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox


[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux