diff options
author | Nicholas Corgan <nick.corgan@ettus.com> | 2015-08-05 08:46:28 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-08-05 13:04:04 -0700 |
commit | bb62ab84fdad6f7cf18ea55d395dfbd7f11ed79d (patch) | |
tree | ab9bb3a78f10661e12b832c9c341d027463739ba /host/utils | |
parent | c3c9513b9b5f67afe4233659222fdfc5bbb2511c (diff) | |
download | uhd-bb62ab84fdad6f7cf18ea55d395dfbd7f11ed79d.tar.gz uhd-bb62ab84fdad6f7cf18ea55d395dfbd7f11ed79d.tar.bz2 uhd-bb62ab84fdad6f7cf18ea55d395dfbd7f11ed79d.zip |
image_loader: force user to specify device
* On utility level, force user to use --args=type=foo
* In each loader, throw an error if args are ambiguous
Diffstat (limited to 'host/utils')
-rw-r--r-- | host/utils/uhd_image_loader.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/host/utils/uhd_image_loader.cpp b/host/utils/uhd_image_loader.cpp index 39efc8f1e..5ea789ee2 100644 --- a/host/utils/uhd_image_loader.cpp +++ b/host/utils/uhd_image_loader.cpp @@ -91,6 +91,11 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ image_loader_args.firmware_path = vm["fw-path"].as<std::string>(); image_loader_args.fpga_path = vm["fpga-path"].as<std::string>(); + // Force user to specify a device + if(not image_loader_args.args.has_key("type")){ + throw uhd::runtime_error("You must specify a device type."); + } + // Clean up paths, if given if(image_loader_args.firmware_path != ""){ #ifndef UHD_PLATFORM_WIN32 |