From: Wolfgang Denk Date: Tue, 15 Feb 2011 21:46:52 +0100 Subject: [U-Boot] [PATCH v2] unzip: return uncompressed size in `filesize', and print it. In-Reply-To: <1297452051-18532-1-git-send-email-wd@denx.de> References: <1297431070-29533-1-git-send-email-wd@denx.de> <1297452051-18532-1-git-send-email-wd@denx.de> Message-ID: <20110215204652.40EDD1539C5@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 Wolfgang Denk, In message <1297452051-18532-1-git-send-email-wd@denx.de> you wrote: > The unzip command did not provide a way for the caller to get any > information about the uncompressed size. To make it better usable in > scripts, we now store the uncompressed size in the `filesize' > variable, like we do when for example loading a file over the network > or when reading it from a file system. Following that analogy, it is > only consequent to also print the size. > > Signed-off-by: Wolfgang Denk > --- > v2: return early in case of errors, > set 'filesize' only on success. > This also avoids the new 'rc' variable. > Courtesy to Peter Tyser for pointing out. > > common/cmd_mem.c | 10 +++++++++- > 1 files changed, 9 insertions(+), 1 deletions(-) Applied, thanks. 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 Real computer scientists despise the idea of actual hardware. Hard- ware has limitations, software doesn't. It's a real shame that Turing machines are so poor at I/O.