From b3bfba0f3e4afedd98e330e542975db796d298b1 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 30 Apr 2015 10:41:44 -0700 Subject: uhd: Added args arg to print_utility_warning --- host/include/uhd/utils/paths.hpp | 2 +- host/lib/utils/paths.cpp | 6 +++--- 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 } -- cgit v1.2.3