aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-11-09 18:44:39 -0800
committerJosh Blum <josh@joshknows.com>2010-11-09 18:44:39 -0800
commit61d9cda7f64e10d8039bf7b6de5ca8068f11e5bb (patch)
tree7d3242d2a00f7e9aee0da9eabd548bd6873e082b /host
parent3bca8c492514564a065e34d3284cb468873fcc8c (diff)
downloaduhd-61d9cda7f64e10d8039bf7b6de5ca8068f11e5bb.tar.gz
uhd-61d9cda7f64e10d8039bf7b6de5ca8068f11e5bb.tar.bz2
uhd-61d9cda7f64e10d8039bf7b6de5ca8068f11e5bb.zip
usrp-e: check the return code on system call, also removes warnings
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/usrp_e/fpga-downloader.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp_e/fpga-downloader.cc b/host/lib/usrp/usrp_e/fpga-downloader.cc
index 5fd2c8dd0..4dc537919 100644
--- a/host/lib/usrp/usrp_e/fpga-downloader.cc
+++ b/host/lib/usrp/usrp_e/fpga-downloader.cc
@@ -16,6 +16,7 @@
//
#include <uhd/config.hpp>
+#include <uhd/utils/assert.hpp>
#include <iostream>
#include <sstream>
@@ -259,7 +260,7 @@ void usrp_e_load_fpga(const std::string &bin_file){
std::cout << "Loading FPGA image: " << bin_file << "... " << std::flush;
- system("/sbin/rmmod usrp_e");
+ UHD_ASSERT_THROW(std::system("/sbin/rmmod usrp_e") == 0);
prepare_fpga_for_configuration(gpio_prog_b, gpio_init_b);
@@ -267,7 +268,7 @@ void usrp_e_load_fpga(const std::string &bin_file){
send_file_to_fpga(bin_file, gpio_init_b, gpio_done);
- system("/sbin/modprobe usrp_e");
+ UHD_ASSERT_THROW(std::system("/sbin/modprobe usrp_e") == 0);
}