summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Hibma <n_hibma@FreeBSD.org>1999-11-24 19:18:57 +0000
committerNick Hibma <n_hibma@FreeBSD.org>1999-11-24 19:18:57 +0000
commita27816e5a5330fef1e562d7e659575244450c6ce (patch)
treecde39a919a137dc5e1eeb5e31b65dc6045c3c0ab
parentd21c76f6ef574abf8421253781c1b1e82c8a6416 (diff)
Notes
-rw-r--r--usr.sbin/usbd/usbd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/usbd/usbd.c b/usr.sbin/usbd/usbd.c
index 33e29f2bda14..f5371ae2cf70 100644
--- a/usr.sbin/usbd/usbd.c
+++ b/usr.sbin/usbd/usbd.c
@@ -611,15 +611,15 @@ find_action(struct usb_device_info *devinfo)
(action->protocol == WILDCARD_INT ||
action->protocol == devinfo->protocol)) {
/* found match !*/
- break;
+ if (verbose)
+ printf("%s: Found action '%s' for %s, %s\n",
+ __progname, action->name,
+ devinfo->product, devinfo->vendor);
+ return(action);
}
}
- if (verbose)
- printf("%s: Found action '%s' for %s, %s\n",
- __progname, action->name,
- devinfo->product, devinfo->vendor);
- return(action);
+ return NULL;
}
void
@@ -695,7 +695,7 @@ execute_command(char *cmd)
} else if (status == 127) {
fprintf(stderr, "%s: Shell failed for '%s'\n",
__progname, cmd);
- } else if (WIFEXITED(status)) {
+ } else if (WIFEXITED(status) && WEXITSTATUS(status)) {
fprintf(stderr, "%s: '%s' returned %d\n",
__progname, cmd, WEXITSTATUS(status));
} else if (WIFSIGNALED(status)) {