aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/b200/b200_image_loader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/b200/b200_image_loader.cpp')
-rw-r--r--host/lib/usrp/b200/b200_image_loader.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/host/lib/usrp/b200/b200_image_loader.cpp b/host/lib/usrp/b200/b200_image_loader.cpp
index af79a59fc..4d0f8d937 100644
--- a/host/lib/usrp/b200/b200_image_loader.cpp
+++ b/host/lib/usrp/b200/b200_image_loader.cpp
@@ -46,8 +46,8 @@ static b200_iface::sptr get_b200_iface(const image_loader::image_loader_args_t&
if(dev_handles.size() > 0){
for(usb_device_handle::sptr dev_handle: dev_handles){
if(dev_handle->firmware_loaded()){
- iface = b200_iface::make(usb_control::make(dev_handle,0));
- eeprom = mboard_eeprom_t(*iface, "B200");
+ iface = b200_iface::make(usb_control::make(dev_handle, 0));
+ eeprom = b200_impl::get_mb_eeprom(iface);
if(user_specified){
if(image_loader_args.args.has_key("serial") and
eeprom.get("serial") != image_loader_args.args.get("serial")){
@@ -73,8 +73,10 @@ static b200_iface::sptr get_b200_iface(const image_loader::image_loader_args_t&
std::string err_msg = "Could not resolve given args to a single B2XX device.\n"
"Applicable devices:\n";
- for(usb_device_handle::sptr dev_handle: applicable_dev_handles){
- eeprom = mboard_eeprom_t(*b200_iface::make(usb_control::make(dev_handle,0)), "B200");
+ for (usb_device_handle::sptr dev_handle: applicable_dev_handles) {
+ eeprom = b200_impl::get_mb_eeprom(
+ b200_iface::make(usb_control::make(dev_handle, 0))
+ );
err_msg += str(boost::format(" * %s (serial=%s)\n")
% B2XX_STR_NAMES.get(get_b200_product(dev_handle, mb_eeprom), "B2XX")
% mb_eeprom.get("serial"));
@@ -88,7 +90,7 @@ static b200_iface::sptr get_b200_iface(const image_loader::image_loader_args_t&
// No applicable devices found, return empty sptr so we can exit
iface.reset();
- mb_eeprom = mboard_eeprom_t();
+ mb_eeprom = eeprom;
return iface;
}