From: Wolfgang Denk Date: Wed, 10 Dec 2008 09:25:48 +0100 Subject: [U-Boot] [PATCH] easylogo: add optional gzip support In-Reply-To: <1228882838-14437-1-git-send-email-vapier@gentoo.org> References: <1228882838-14437-1-git-send-email-vapier@gentoo.org> Message-ID: <20081210082548.CDC8A834B020@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Mike Frysinger, In message <1228882838-14437-1-git-send-email-vapier@gentoo.org> you wrote: > Some images can be quite large, so add an option to compress the image data > with gzip in the U-Boot image. Then at runtime, the board can decompress it > with the normal zlib functions. Good idea. > + FILE *gz; > + > + sprintf (str, "%s.gz", filename); Lenght checking? > + sprintf (app, "gzip > %s", str); Lenght checking? > + gz = popen (app, "w"); Erorr checking? > + fwrite (image->data, image->size, 1, gz); Erorr checking? > + pclose (gz); Erorr checking? And so on... Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de There is is no reason for any individual to have a computer in their home. -- Ken Olsen (President of Digital Equipment Corporation), Convention of the World Future Society, in Boston, 1977