aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/misc_utils.cpp
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-08-31 16:45:49 -0700
committerNick Foster <nick@nerdnetworks.org>2010-08-31 16:45:49 -0700
commit0616872e35ac6429c19c2495bf4e378551bdd60e (patch)
tree6116f992f4f6d1f8d701aca6bf1526a85d8bda89 /host/lib/usrp/misc_utils.cpp
parentb96088b692a5c44974919ee36e253b6ea8c51972 (diff)
parent9a3217cbbeb39d677a439fe0982a7ac4d7f251c2 (diff)
downloaduhd-0616872e35ac6429c19c2495bf4e378551bdd60e.tar.gz
uhd-0616872e35ac6429c19c2495bf4e378551bdd60e.tar.bz2
uhd-0616872e35ac6429c19c2495bf4e378551bdd60e.zip
Merge branch 'usrp1' of ettus.sourcerepo.com:ettus/uhdpriv into usrp1
Diffstat (limited to 'host/lib/usrp/misc_utils.cpp')
-rw-r--r--host/lib/usrp/misc_utils.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/host/lib/usrp/misc_utils.cpp b/host/lib/usrp/misc_utils.cpp
index a1664d810..5cfcdc8d3 100644
--- a/host/lib/usrp/misc_utils.cpp
+++ b/host/lib/usrp/misc_utils.cpp
@@ -164,13 +164,22 @@ static void verify_xx_subdev_spec(
//empty db name means select dboard automatically
if (pair.db_name.empty()){
if (dboard_names.size() != 1) throw std::runtime_error(
- "A daughterboard name must be provided for multi-slot boards: " + subdev_spec.to_string()
+ "A daughterboard name must be provided for multi-slot motherboards: " + subdev_spec.to_string()
);
pair.db_name == dboard_names.front();
}
uhd::assert_has(dboard_names, pair.db_name, xx_type + " dboard name");
wax::obj dboard = mboard[named_prop_t(dboard_prop, pair.db_name)];
- uhd::assert_has(dboard[DBOARD_PROP_SUBDEV_NAMES].as<prop_names_t>(), pair.sd_name, xx_type + " subdev name");
+ prop_names_t subdev_names = dboard[DBOARD_PROP_SUBDEV_NAMES].as<prop_names_t>();
+
+ //empty sd name means select the subdev automatically
+ if (pair.sd_name.empty()){
+ if (subdev_names.size() != 1) throw std::runtime_error(
+ "A subdevice name must be provided for multi-subdev daughterboards: " + subdev_spec.to_string()
+ );
+ pair.sd_name == subdev_names.front();
+ }
+ uhd::assert_has(subdev_names, pair.sd_name, xx_type + " subdev name");
}
}catch(const std::exception &e){
throw std::runtime_error(str(boost::format(