[U-Boot] [PATCH v2 3/3] common: cmd_part: Error prints on failures

Paul Kocialkowski contact at paulk.fr
Mon Jun 15 21:25:55 CEST 2015


Le lundi 15 juin 2015 à 09:00 -0600, Stephen Warren a écrit :
> On 06/13/2015 02:38 AM, Paul Kocialkowski wrote:
> > When a failure occurs when selecting the device or partition, the user should be
> > notified through an error print.
> 
> > diff --git a/common/cmd_part.c b/common/cmd_part.c
> 
> > @@ -38,8 +38,10 @@ static int do_part_uuid(int argc, char * const argv[])
> >   		return CMD_RET_USAGE;
> >
> >   	part = get_device_and_partition(argv[0], argv[1], &dev_desc, &info, 0);
> > -	if (part < 0)
> > +	if (part < 0) {
> > +		error("Invalid device and/or partition\n");
> 
> A very quick look at the implementation of get_device_and_partition() 
> (and all the other relevant functions for this patch) implies the 
> implementation already prints an error message. If you found a case 
> where that isn't true, I think those functions should be fixed, not all 
> their callers.

You're right, I'll just drop that patch from the series.

Thanks!

-- 
Paul Kocialkowski, Replicant developer

Replicant is a fully free Android distribution running on several
devices, a free software mobile operating system putting the emphasis on
freedom and privacy/security.

Website: http://www.replicant.us/
Blog: http://blog.replicant.us/
Wiki/tracker/forums: http://redmine.replicant.us/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150615/ead80138/attachment.sig>


More information about the U-Boot mailing list