From c7054ce5c79e200bb383025f23bc5be44a9c5258 Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Fri, 12 Oct 2012 12:03:28 -0700 Subject: utils: fixed Boost incompatibility bug in usrp_n2xx_simple_net_burner --- host/utils/usrp_n2xx_simple_net_burner.cpp | 13 +++++++------ 1 file 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 +#include #include #include #include @@ -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))); } -- cgit v1.2.3