r3122 - trunk/src/host/dfu-util/src
werner at sita.openmoko.org
werner at sita.openmoko.org
Mon Oct 8 18:38:08 CEST 2007
Author: werner
Date: 2007-10-08 18:38:02 +0200 (Mon, 08 Oct 2007)
New Revision: 3122
Modified:
trunk/src/host/dfu-util/src/main.c
Log:
main.c (main): don't invoke resolve_device_path unless we need to resolve a
path name (zero return code caused confusion)
Modified: trunk/src/host/dfu-util/src/main.c
===================================================================
--- trunk/src/host/dfu-util/src/main.c 2007-10-08 16:06:32 UTC (rev 3121)
+++ trunk/src/host/dfu-util/src/main.c 2007-10-08 16:38:02 UTC (rev 3122)
@@ -331,9 +331,6 @@
{
int res;
- if (!(dif->flags & DFU_IFF_PATH))
- return 0;
-
res = usb_path2devnum(dif->path);
if (res < 0)
return -EINVAL;
@@ -616,17 +613,20 @@
if (usb_find_devices() < 2)
printf("not at least 2 device changes found ?!?\n");
- ret = resolve_device_path(dif);
- if (ret < 0) {
- fprintf(stderr,
- "internal error: cannot re-parse `%s'\n",
- dif->path);
- abort();
+ if (dif->flags & DFU_IFF_PATH) {
+ ret = resolve_device_path(dif);
+ if (ret < 0) {
+ fprintf(stderr,
+ "internal error: cannot re-parse `%s'\n",
+ dif->path);
+ abort();
+ }
+ if (!ret) {
+ fprintf(stderr,
+ "Can't resolve path after RESET?\n");
+ exit(1);
+ }
}
- if (!ret) {
- fprintf(stderr, "Can't resolve path after RESET?\n");
- exit(1);
- }
num_devs = count_dfu_devices(dif);
if (num_devs == 0) {
More information about the commitlog
mailing list