aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2015-04-30 10:41:44 -0700
committerMartin Braun <martin.braun@ettus.com>2015-04-30 10:52:40 -0700
commitb3bfba0f3e4afedd98e330e542975db796d298b1 (patch)
treef0a22e44f090bb1f05bcf1c9cab0cf03f5921a7a /host
parentc3b384feb166013bfd31a6f42d5fc4a06341b67e (diff)
downloaduhd-b3bfba0f3e4afedd98e330e542975db796d298b1.tar.gz
uhd-b3bfba0f3e4afedd98e330e542975db796d298b1.tar.bz2
uhd-b3bfba0f3e4afedd98e330e542975db796d298b1.zip
uhd: Added args arg to print_utility_warning
Diffstat (limited to 'host')
-rw-r--r--host/include/uhd/utils/paths.hpp2
-rw-r--r--host/lib/utils/paths.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/host/include/uhd/utils/paths.hpp b/host/include/uhd/utils/paths.hpp
index 8edb87546..aa31fd5a2 100644
--- a/host/include/uhd/utils/paths.hpp
+++ b/host/include/uhd/utils/paths.hpp
@@ -87,7 +87,7 @@ namespace uhd {
* The error string will include the full path to the utility to run.
* \return the message suggesting the use of the named utility.
*/
- UHD_API std::string print_utility_error(std::string name);
+ UHD_API std::string print_utility_error(const std::string &name, const std::string &args="");
} //namespace uhd
#endif /* INCLUDED_UHD_UTILS_PATHS_HPP */
diff --git a/host/lib/utils/paths.cpp b/host/lib/utils/paths.cpp
index f29318ddd..a9c9965c8 100644
--- a/host/lib/utils/paths.cpp
+++ b/host/lib/utils/paths.cpp
@@ -367,10 +367,10 @@ std::string uhd::find_utility(std::string name) {
.string();
}
-std::string uhd::print_utility_error(std::string name){
+std::string uhd::print_utility_error(const std::string &name, const std::string &args){
#ifdef UHD_PLATFORM_WIN32
- return "As an Administrator, please run:\n\n\"" + find_utility(name) + "\"";
+ return "As an Administrator, please run:\n\n\"" + find_utility(name) + args + "\"";
#else
- return "Please run:\n\n \"" + find_utility(name) + "\"";
+ return "Please run:\n\n \"" + find_utility(name) + (args.empty() ? "" : (" " + args)) + "\"";
#endif
}