From: Wolfgang Denk Date: Tue, 25 Mar 2008 01:07:44 +0100 Subject: [U-Boot-Users] [PATCH] USB Storage, add meaningful return value In-Reply-To: Your message of "Tue, 25 Mar 2008 10:19:20 +1100." <47E836F8.6090702@magtech.com.au> Message-ID: <20080325000744.4CC59248BE@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 Aras, in message <47E836F8.6090702@magtech.com.au> you wrote: > > This patch changes the "usb storage" command to return success iff it > finds a USB storage device, otherwise it returns error. Thanks. I appreciate your contribution, but please fix the coding style: > @@ -196,9 +196,13 @@ > for (i = 0; i < usb_max_devs; i++) { There is probably a { missing before this line (as this is not a single-line statement). > printf (" Device %d: ", i); > dev_print(&usb_dev_desc[i]); > + return 0; > } > else > + { ...and then this should read } else { 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 The explanation requiring the fewest assumptions is the most likely to be correct. -- William of Occam