diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2009-12-23 07:26:57 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2009-12-23 07:26:57 +0100 |
commit | e7ff91342e02cd1cd5af9dfbf7c822f55b228b4b (patch) | |
tree | 886e0f976410dab330b7201551f1d6c082089f14 /openbsc/src/abis_nm.c | |
parent | 004e055cfd9cd49fe4fb2b71aa16d08fecf189c8 (diff) |
[sw_load] For the nanoBTS just open the firmware
* The two version strings are not in an easy to parse header
and from my trace it appears like the whole file is sent
to the BTS. So just open the firmware file..
Diffstat (limited to 'openbsc/src/abis_nm.c')
-rw-r--r-- | openbsc/src/abis_nm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/openbsc/src/abis_nm.c b/openbsc/src/abis_nm.c index bb7248be7..64b87b570 100644 --- a/openbsc/src/abis_nm.c +++ b/openbsc/src/abis_nm.c @@ -1372,6 +1372,17 @@ static int sw_open_file(struct abis_nm_sw *sw, const char *fname) /* rewind to start of file */ rewind(sw->stream); break; + case GSM_BTS_TYPE_NANOBTS: + sw->stream = fdopen(sw->fd, "r"); + if (!sw->stream) { + perror("fdopen"); + return -1; + } + + /* TODO: extract that from the filename or content */ + sw->file_id_len = 0; + sw->file_version_len = 0; + break; default: /* We don't know how to treat them yet */ close(sw->fd); |