aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-11-08 14:35:58 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-11-09 13:05:51 +0100
commit636b260ba7ee061e0dfe0989a3f238783c30f284 (patch)
tree03d63c0c5f8f2a251c782290b886fcc785c07d16
parent319389697a7af5e5f664e2594bdae2c5cf3ec325 (diff)
ipaccess-config: Use stderr for debug type messages when using -Gpespin/ipaccess-get
This way only formated output is pinted to stdout when using -G. Related: OS#3624 Change-Id: I257bfc8d82b49a3641be6b6777e472ecf561a21e
-rw-r--r--src/ipaccess/ipaccess-config.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c
index dcaa756..59deb2c 100644
--- a/src/ipaccess/ipaccess-config.c
+++ b/src/ipaccess/ipaccess-config.c
@@ -528,7 +528,7 @@ static void bootstrap_om(struct gsm_bts_trx *trx)
int need_to_set_attr = 0;
int len;
- printf("OML link established using TRX %d\n", trx->nr);
+ fprintf(get_attr ? stderr : stdout, "OML link established using TRX %d\n", trx->nr);
if (get_attr) {
msgb_put_u8(nmsg_get, NM_ATT_IPACC_PRIM_OML_CFG);
@@ -945,9 +945,6 @@ int main(int argc, char **argv)
osmo_init_logging2(tall_ctx_config, &log_info);
bts_model_nanobts_init();
- printf("ipaccess-config (C) 2009-2010 by Harald Welte and others\n");
- printf("This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY\n\n");
-
while (1) {
int c;
unsigned long ul;
@@ -1067,6 +1064,9 @@ int main(int argc, char **argv)
}
};
+ fprintf(get_attr ? stderr : stdout, "ipaccess-config (C) 2009-2010 by Harald Welte and others\n");
+ fprintf(get_attr ? stderr : stdout, "This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY\n\n");
+
if (firmware_analysis) {
analyze_firmware(firmware_analysis);
if (argc == optind) /* Nothing more to do, exit successfully */
@@ -1097,7 +1097,7 @@ int main(int argc, char **argv)
ipac_nwl_init();
- printf("Trying to connect to ip.access BTS %s...\n", bts_ip);
+ fprintf(get_attr ? stderr : stdout, "Trying to connect to ip.access BTS %s...\n", bts_ip);
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;