* [PATCH] Output information about device look up failure.
@ 2020-01-21 22:10 Nikita Ermakov
2020-01-22 12:05 ` Wolfgang Denk
0 siblings, 1 reply; 2+ messages in thread
From: Nikita Ermakov @ 2020-01-21 22:10 UTC (permalink / raw)
To: u-boot
In the case of error while device look up (e.g. wrong interface type
was specified) put a message about it even if debug was not enable.
Signed-off-by: Nikita Ermakov <coffe92@gmail.com>
---
disk/part.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/disk/part.c b/disk/part.c
index 8982ef3bae..280e3e4f42 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -513,7 +513,10 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
/* Look up the device */
dev = blk_get_device_by_str(ifname, dev_str, dev_desc);
if (dev < 0)
+ {
+ printf("** Look up for the device %s %s failed **\n", ifname, dev_str);
goto cleanup;
+ }
/* Convert partition ID string to number */
if (!part_str || !*part_str) {
--
2.24.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] Output information about device look up failure.
2020-01-21 22:10 [PATCH] Output information about device look up failure Nikita Ermakov
@ 2020-01-22 12:05 ` Wolfgang Denk
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2020-01-22 12:05 UTC (permalink / raw)
To: u-boot
Dear Nikita,
In message <20200121221005.9303-1-coffe92@gmail.com> you wrote:
> In the case of error while device look up (e.g. wrong interface type
> was specified) put a message about it even if debug was not enable.
>
> Signed-off-by: Nikita Ermakov <coffe92@gmail.com>
> ---
> disk/part.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/disk/part.c b/disk/part.c
> index 8982ef3bae..280e3e4f42 100644
> --- a/disk/part.c
> +++ b/disk/part.c
> @@ -513,7 +513,10 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
> /* Look up the device */
> dev = blk_get_device_by_str(ifname, dev_str, dev_desc);
> if (dev < 0)
> + {
> + printf("** Look up for the device %s %s failed **\n", ifname, dev_str);
> goto cleanup;
> + }
Please see my other patch instead.
You are using incorrect brace style, and I think your error message
is a bit misleading - "look up failed" sounds like some internal
error, the reason of which is still unclear. We should instead say
clearly the the given device type is not supported/known in the
given configuration.
Thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
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
That's the thing about people who think they hate computers. What
they really hate is lousy programmers.
- Larry Niven and Jerry Pournelle in "Oath of Fealty"
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-22 12:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-21 22:10 [PATCH] Output information about device look up failure Nikita Ermakov
2020-01-22 12:05 ` Wolfgang Denk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.