From 61d9cda7f64e10d8039bf7b6de5ca8068f11e5bb Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 9 Nov 2010 18:44:39 -0800 Subject: usrp-e: check the return code on system call, also removes warnings --- host/lib/usrp/usrp_e/fpga-downloader.cc | 5 +++-- 1 file 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 +#include #include #include @@ -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); } -- cgit v1.2.3