aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/subdev_spec.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-08-05 17:33:57 -0700
committerJosh Blum <josh@joshknows.com>2010-08-06 12:15:05 -0700
commit187fe9d3e7353021d89da38b687ee8729a060ccd (patch)
tree93a8a9a165a9f2ba14af2c0833cbe4e62c5e933c /host/lib/usrp/subdev_spec.cpp
parent5ec42578fa9f69e92ae935c16717957a6ea66324 (diff)
downloaduhd-187fe9d3e7353021d89da38b687ee8729a060ccd.tar.gz
uhd-187fe9d3e7353021d89da38b687ee8729a060ccd.tar.bz2
uhd-187fe9d3e7353021d89da38b687ee8729a060ccd.zip
usrp: tweaks to subdev spec printing
Diffstat (limited to 'host/lib/usrp/subdev_spec.cpp')
-rw-r--r--host/lib/usrp/subdev_spec.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/host/lib/usrp/subdev_spec.cpp b/host/lib/usrp/subdev_spec.cpp
index cca5c36b8..0f00e2f74 100644
--- a/host/lib/usrp/subdev_spec.cpp
+++ b/host/lib/usrp/subdev_spec.cpp
@@ -56,9 +56,13 @@ std::string subdev_spec_t::to_pp_string(void) const{
size_t count = 0;
ss << "Subdevice Specification:" << std::endl;
BOOST_FOREACH(const subdev_spec_pair_t &pair, *this){
+ std::string db_name = pair.db_name;
+ if (db_name == "") db_name = "0";
+ std::string sd_name = pair.sd_name;
+ if (sd_name == "") sd_name = "0";
ss << boost::format(
" Channel %d: Daughterboard %s, Subdevice %s"
- ) % (count++) % pair.db_name % pair.sd_name << std::endl;
+ ) % (count++) % db_name % sd_name << std::endl;
}
return ss.str();
}