aboutsummaryrefslogtreecommitdiffstats
path: root/host/apps/omap_debug/usrp-e-debug-pins.c
diff options
context:
space:
mode:
authorPhilip Balister <philip@balister.org>2010-05-07 19:23:58 +0000
committerroot <root@usrp1-e.lan>2010-05-07 19:25:42 +0000
commitb47920906bd1b0480bbcd8427b2d703889cb78e3 (patch)
tree42b01435ff59407af1fe0684b30414355637cf21 /host/apps/omap_debug/usrp-e-debug-pins.c
parent272b08ce9a66b3ba1b9dc91922afff410145231f (diff)
downloaduhd-b47920906bd1b0480bbcd8427b2d703889cb78e3.tar.gz
uhd-b47920906bd1b0480bbcd8427b2d703889cb78e3.tar.bz2
uhd-b47920906bd1b0480bbcd8427b2d703889cb78e3.zip
Print an error and exit if open fails for some programs.
Diffstat (limited to 'host/apps/omap_debug/usrp-e-debug-pins.c')
-rw-r--r--host/apps/omap_debug/usrp-e-debug-pins.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/host/apps/omap_debug/usrp-e-debug-pins.c b/host/apps/omap_debug/usrp-e-debug-pins.c
index d4e3f5223..d18bbf990 100644
--- a/host/apps/omap_debug/usrp-e-debug-pins.c
+++ b/host/apps/omap_debug/usrp-e-debug-pins.c
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
fp = open("/dev/usrp_e0", O_RDWR);
printf("fp = %d\n", fp);
+ if (fp < 0) {
+ perror("Open failed");
+ return -1;
+ }
if (strcmp(argv[1], "0") == 0) {
printf("Selected 0 based on %s\n", argv[1]);