From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Mon, 15 Jun 2015 09:00:58 -0600 Subject: [U-Boot] [PATCH v2 3/3] common: cmd_part: Error prints on failures In-Reply-To: <1434184697-23410-4-git-send-email-contact@paulk.fr> References: <1434184697-23410-1-git-send-email-contact@paulk.fr> <1434184697-23410-4-git-send-email-contact@paulk.fr> Message-ID: <557EE8AA.9030903@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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.