diff options
author | Nicholas Corgan <nick.corgan@ettus.com> | 2012-10-12 12:03:28 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2012-10-12 12:22:42 -0700 |
commit | c7054ce5c79e200bb383025f23bc5be44a9c5258 (patch) | |
tree | 4f8c04b8ce45764442feda9344c0ad6e38954086 /host/utils | |
parent | ce4212049ef1a4599ddbaac46d6d372a1d023b1a (diff) | |
download | uhd-c7054ce5c79e200bb383025f23bc5be44a9c5258.tar.gz uhd-c7054ce5c79e200bb383025f23bc5be44a9c5258.tar.bz2 uhd-c7054ce5c79e200bb383025f23bc5be44a9c5258.zip |
utils: fixed Boost incompatibility bug in usrp_n2xx_simple_net_burner
Diffstat (limited to 'host/utils')
-rw-r--r-- | host/utils/usrp_n2xx_simple_net_burner.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/host/utils/usrp_n2xx_simple_net_burner.cpp b/host/utils/usrp_n2xx_simple_net_burner.cpp index 223021510..abbbf37da 100644 --- a/host/utils/usrp_n2xx_simple_net_burner.cpp +++ b/host/utils/usrp_n2xx_simple_net_burner.cpp @@ -33,6 +33,7 @@ #include "usrp_simple_burner_utils.hpp" #include <uhd/exception.hpp> +#include <uhd/property_tree.hpp> #include <uhd/transport/if_addrs.hpp> #include <uhd/transport/udp_simple.hpp> #include <uhd/utils/byteswap.hpp> @@ -70,12 +71,12 @@ void check_image_file_validity(std::string rev_str, std::string default_fpga_fil if(!does_image_exist(fpga_path)) throw std::runtime_error(str(boost::format("No file at specified FPGA path: %s") % fw_path)); //Check to find rev_str in filename - boost::filesystem::path custom_fpga_path(fpga_path); - if(custom_fpga_path.filename().string().find("fw") != std::string::npos){ + uhd::fs_path custom_fpga_path(fpga_path); + if(custom_fpga_path.leaf().find("fw") != std::string::npos){ throw std::runtime_error(str(boost::format("Invalid FPGA image filename at path: %s\nFilename indicates that this is a firmware image.") % fpga_path)); } - if(custom_fpga_path.filename().string().find(rev_str) == std::string::npos){ + if(custom_fpga_path.leaf().find(rev_str) == std::string::npos){ throw std::runtime_error(str(boost::format("Invalid firmware image filename at path: %s\nFilename must contain '%s' to be considered valid for this model.") % fw_path % rev_str)); } @@ -89,12 +90,12 @@ void check_image_file_validity(std::string rev_str, std::string default_fpga_fil if(!does_image_exist(fw_path)) throw std::runtime_error(str(boost::format("No file at specified firmware path: %s") % fw_path)); //Check to find truncated rev_str in filename - boost::filesystem::path custom_fw_path(fw_path); - if(custom_fw_path.filename().string().find("fpga") != std::string::npos){ + uhd::fs_path custom_fw_path(fw_path); + if(custom_fw_path.leaf().find("fpga") != std::string::npos){ throw std::runtime_error(str(boost::format("Invalid firmware image filename at path: %s\nFilename indicates that this is an FPGA image.") % fw_path)); } - if(custom_fw_path.filename().string().find(erase_tail_copy(rev_str,3)) == std::string::npos){ + if(custom_fw_path.leaf().find(erase_tail_copy(rev_str,3)) == std::string::npos){ throw std::runtime_error(str(boost::format("Invalid firmware image filename at path: %s\nFilename must contain '%s' to be considered valid for this model.") % fw_path % erase_tail_copy(rev_str,3))); } |