aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2011-05-07 12:12:48 +0200
committerPablo Neira Ayuso <pablo@gnumonks.org>2011-05-07 12:58:59 +0200
commitc0d17f22663ba78f1620043316ac7d374ff45b86 (patch)
tree3d374c0934694dd5cac6afc5991ffa5968869157 /openbsc/src/libbsc
parentdfb342c19af19b60350849f40d1be5e8f7a530a5 (diff)
src: use namespace prefix osmo_* for misc utils
Summary of changes: s/bcd2char/osmo_bcd2char/g s/char2bcd/osmo_char2bcd/g s/hexparse/osmo_hexparse/g s/hexdump/osmo_hexdump/g s/hexdump_nospc/osmo_hexdump_nospc/g s/ubit_dump/osmo_ubit_dump/g s/static_assert/osmo_static_assert/g
Diffstat (limited to 'openbsc/src/libbsc')
-rw-r--r--openbsc/src/libbsc/abis_nm.c4
-rw-r--r--openbsc/src/libbsc/abis_om2000.c2
-rw-r--r--openbsc/src/libbsc/bsc_init.c2
-rw-r--r--openbsc/src/libbsc/bsc_vty.c4
-rw-r--r--openbsc/src/libbsc/gsm_04_08_utils.c2
-rw-r--r--openbsc/src/libbsc/system_information.c18
6 files changed, 16 insertions, 16 deletions
diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c
index 6ca45f7d7..0d122c697 100644
--- a/openbsc/src/libbsc/abis_nm.c
+++ b/openbsc/src/libbsc/abis_nm.c
@@ -934,7 +934,7 @@ static int abis_nm_rx_sw_act_req(struct msgb *mb)
DEBUGP(DNM, "SW config not found! Can't continue.\n");
return -EINVAL;
} else {
- DEBUGP(DNM, "Found SW config: %s\n", hexdump(sw_config, sw_config_len));
+ DEBUGP(DNM, "Found SW config: %s\n", osmo_hexdump(sw_config, sw_config_len));
}
/* Use the first SW_DESCR present in SW config */
@@ -1325,7 +1325,7 @@ static int sw_load_segment(struct abis_nm_sw *sw)
len = strlen(line_buf)+2;
break;
case GSM_BTS_TYPE_NANOBTS: {
- static_assert(sizeof(seg_buf) >= IPACC_SEGMENT_SIZE, buffer_big_enough);
+ osmo_static_assert(sizeof(seg_buf) >= IPACC_SEGMENT_SIZE, buffer_big_enough);
len = read(sw->fd, &seg_buf, IPACC_SEGMENT_SIZE);
if (len < 0) {
perror("read failed");
diff --git a/openbsc/src/libbsc/abis_om2000.c b/openbsc/src/libbsc/abis_om2000.c
index 19d204212..fd3cf1fe3 100644
--- a/openbsc/src/libbsc/abis_om2000.c
+++ b/openbsc/src/libbsc/abis_om2000.c
@@ -1492,7 +1492,7 @@ int abis_om2k_rcvmsg(struct msgb *msg)
DEBUGP(DNM, "Rx MO=%s %s (%s)\n", om2k_mo_name(&o2h->mo),
get_value_string(om2k_msgcode_vals, msg_type),
- hexdump(msg->l2h, msgb_l2len(msg)));
+ osmo_hexdump(msg->l2h, msgb_l2len(msg)));
switch (msg_type) {
case OM2K_MSGT_CAL_TIME_REQ:
diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c
index 8e62dacc0..c173c626d 100644
--- a/openbsc/src/libbsc/bsc_init.c
+++ b/openbsc/src/libbsc/bsc_init.c
@@ -102,7 +102,7 @@ static int generate_and_rsl_si(struct gsm_bts_trx *trx, enum osmo_sysinfo_type i
}
DEBUGP(DRR, "SI%s: %s\n", gsm_sitype_name(i),
- hexdump(GSM_BTS_SI(bts, i), GSM_MACBLOCK_LEN));
+ osmo_hexdump(GSM_BTS_SI(bts, i), GSM_MACBLOCK_LEN));
switch (i) {
case SYSINFO_TYPE_5:
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index 4cd027f09..12f9ffd9f 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -495,7 +495,7 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
get_value_string(osmo_sitype_strs, i), VTY_NEWLINE);
vty_out(vty, " system-information %s static %s%s",
get_value_string(osmo_sitype_strs, i),
- hexdump_nospc(bts->si_buf[i], sizeof(bts->si_buf[i])),
+ osmo_osmo_hexdump_nospc(bts->si_buf[i], sizeof(bts->si_buf[i])),
VTY_NEWLINE);
}
}
@@ -2171,7 +2171,7 @@ DEFUN(cfg_bts_si_static, cfg_bts_si_static_cmd,
memset(bts->si_buf[type], 0x2b, sizeof(bts->si_buf[type]));
/* Parse the user-specified SI in hex format, [partially] overwriting padding */
- rc = hexparse(argv[1], bts->si_buf[type], sizeof(bts->si_buf[0]));
+ rc = osmo_hexparse(argv[1], bts->si_buf[type], sizeof(bts->si_buf[0]));
if (rc < 0 || rc > sizeof(bts->si_buf[0])) {
vty_out(vty, "Error parsing HEXSTRING%s", VTY_NEWLINE);
return CMD_WARNING;
diff --git a/openbsc/src/libbsc/gsm_04_08_utils.c b/openbsc/src/libbsc/gsm_04_08_utils.c
index 7599cea0b..4d8bdc604 100644
--- a/openbsc/src/libbsc/gsm_04_08_utils.c
+++ b/openbsc/src/libbsc/gsm_04_08_utils.c
@@ -134,7 +134,7 @@ static const enum gsm_chreq_reason_t reason_by_chreq[] = {
};
/* verify that the two tables match */
-static_assert(sizeof(ctype_by_chreq) ==
+osmo_static_assert(sizeof(ctype_by_chreq) ==
sizeof(((struct gsm_network *) NULL)->ctype_by_chreq), assert_size);
/*
diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c
index 3291bff10..926a490c7 100644
--- a/openbsc/src/libbsc/system_information.c
+++ b/openbsc/src/libbsc/system_information.c
@@ -39,18 +39,18 @@
/* verify the sizes of the system information type structs */
/* rest octets are not part of the struct */
-static_assert(sizeof(struct gsm48_system_information_type_header) == 3, _si_header_size);
-static_assert(sizeof(struct gsm48_rach_control) == 3, _si_rach_control);
-static_assert(sizeof(struct gsm48_system_information_type_1) == 22, _si1_size);
-static_assert(sizeof(struct gsm48_system_information_type_2) == 23, _si2_size);
-static_assert(sizeof(struct gsm48_system_information_type_3) == 19, _si3_size);
-static_assert(sizeof(struct gsm48_system_information_type_4) == 13, _si4_size);
+osmo_static_assert(sizeof(struct gsm48_system_information_type_header) == 3, _si_header_size);
+osmo_static_assert(sizeof(struct gsm48_rach_control) == 3, _si_rach_control);
+osmo_static_assert(sizeof(struct gsm48_system_information_type_1) == 22, _si1_size);
+osmo_static_assert(sizeof(struct gsm48_system_information_type_2) == 23, _si2_size);
+osmo_static_assert(sizeof(struct gsm48_system_information_type_3) == 19, _si3_size);
+osmo_static_assert(sizeof(struct gsm48_system_information_type_4) == 13, _si4_size);
/* bs11 forgot the l2 len, 0-6 rest octets */
-static_assert(sizeof(struct gsm48_system_information_type_5) == 18, _si5_size);
-static_assert(sizeof(struct gsm48_system_information_type_6) == 11, _si6_size);
+osmo_static_assert(sizeof(struct gsm48_system_information_type_5) == 18, _si5_size);
+osmo_static_assert(sizeof(struct gsm48_system_information_type_6) == 11, _si6_size);
-static_assert(sizeof(struct gsm48_system_information_type_13) == 3, _si13_size);
+osmo_static_assert(sizeof(struct gsm48_system_information_type_13) == 3, _si13_size);
/* Frequency Lists as per TS 04.08 10.5.2.13 */