diff options
author | Harald Welte <laforge@netfilter.org> | 2009-12-17 23:10:46 +0100 |
---|---|---|
committer | Harald Welte <laforge@netfilter.org> | 2009-12-17 23:10:46 +0100 |
commit | b1d4c8ed9d2b4ecb76355d71a152c22934c48504 (patch) | |
tree | adc7234f321e78f2ca9046d9d3cfc5933b9c1a29 /openbsc/src/system_information.c | |
parent | 66706812514c4baca743ad3a07e4556d48b6cded (diff) |
logging: introduce log levels at caller site
This introduces a new LOGP() macro together with LOGL_* definition to
support multiple log levels (severities) throughout the codebase.
Please note that the actual logging system does not use them yet,
in this patch we simply introduce the new macros at the caller site.
Diffstat (limited to 'openbsc/src/system_information.c')
-rw-r--r-- | openbsc/src/system_information.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/openbsc/src/system_information.c b/openbsc/src/system_information.c index 644abb432..b404e5151 100644 --- a/openbsc/src/system_information.c +++ b/openbsc/src/system_information.c @@ -45,8 +45,10 @@ static int freq_list_bm0_set_arfcn(u_int8_t *chan_list, unsigned int arfcn) { unsigned int byte, bit; - if (arfcn > 124 || arfcn < 1) + if (arfcn > 124 || arfcn < 1) { + LOGP(DRR, LOGL_ERROR, "Bitmap 0 only supports ARFCN 1...124\n"); return -EINVAL; + } /* the bitmask is from 1..124, not from 0..123 */ arfcn--; @@ -75,11 +77,11 @@ static int freq_list_bmrel_set_arfcn(u_int8_t *chan_list, unsigned int arfcn) return 0; if (arfcn < min_arfcn) { - DEBUGP(DRR, "arfcn(%u) < min(%u)\n", arfcn, min_arfcn); + LOGP(DRR, LOGL_ERROR, "arfcn(%u) < min(%u)\n", arfcn, min_arfcn); return -EINVAL; } if (arfcn > min_arfcn + 111) { - DEBUGP(DRR, "arfcn(%u) > min(%u) + 111\n", arfcn, min_arfcn); + LOGP(DRR, LOGL_ERROR, "arfcn(%u) > min(%u) + 111\n", arfcn, min_arfcn); return -EINVAL; } @@ -127,7 +129,8 @@ static int bitvec2freq_list(u_int8_t *chan_list, struct bitvec *bv, } if ((max - min) > 111) { - DEBUGP(DRR, "min_arfcn=%u, max_arfcn=%u, distance > 111\n", min, max); + LOGP(DRR, LOGL_ERROR, "min_arfcn=%u, max_arfcn=%u, " + "distance > 111\n", min, max); return -EINVAL; } |