From 7aa1e5f5c4c82c31273749c8536e493b9b63529a Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Tue, 21 Feb 2017 12:34:49 +0100 Subject: [PATCH] added option in RF UHD for silent stdout --- srslte/lib/rf/rf_uhd_imp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/srslte/lib/rf/rf_uhd_imp.c b/srslte/lib/rf/rf_uhd_imp.c index 0052e801b..d936f4d18 100644 --- a/srslte/lib/rf/rf_uhd_imp.c +++ b/srslte/lib/rf/rf_uhd_imp.c @@ -267,6 +267,7 @@ int rf_uhd_open(char *args, void **h) } handler->devname = NULL; + /* If device type or name not given in args, choose a B200 */ if (args[0]=='\0') { if (find_string(devices_str, "type=b200") && !strstr(args, "recv_frame_size")) { @@ -294,7 +295,11 @@ int rf_uhd_open(char *args, void **h) uhd_string_vector_free(&devices_str); /* Create UHD handler */ - printf("Opening USRP with args: %s\n", args); + if (strstr(args, "silent")) { + rf_uhd_suppress_stdout(NULL); + } else { + printf("Opening USRP with args: %s\n", args); + } uhd_error error = uhd_usrp_make(&handler->usrp, args); if (error) { fprintf(stderr, "Error opening UHD: code %d\n", error);