commit | de3549a23456a4bfd2584e3566a2a97a0c0f82c1 | [log] [tgz] |
---|---|---|
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | Wed Nov 17 06:34:48 2021 +0300 |
committer | fixeria <vyanitskiy@sysmocom.de> | Thu Nov 18 13:11:20 2021 +0000 |
tree | 78b432ace71ae54e3c2d6d1b411292a11bad2269 | |
parent | 2768246e7a368b7b74f16fe9db8c8a5ce02c6c88 [diff] |
bitvec_read_field(): indicate errors using errno This function returns an *unsigned* integer (uint64_t), so returning a negative value on error is a bad idea. A negative value turns into a huge positive value, what was demonstrated in the bitvec_test: bitvec_read_field(idx=512, len=16) => ffffffffffffffea bitvec_read_field(idx=0, len=65) => ffffffffffffffea bitvec_read_field(idx=64, len=16) => ffffffffffffffea The 0xffffffffffffffea above is basically: (uint64_t) -EINVAL, or (uint64_t) -22 + 1, or 0xffffffffffffffff - 0x16 + 1. Let's make use of the errno in order to indicate an error to the caller. Change-Id: I2cc734caa3365d03c2ae2b3f2cd9544933c25e9e Related: OS#4388
This repository contains a set of C-language libraries that form the core infrastructure of many Osmocom Open Source Mobile Communications projects.
Historically, a lot of this code was developed as part of the OpenBSC project, but which are of a more generic nature and thus useful to (at least) other programs that we develop in the sphere of Free Software / Open Source mobile communications.
There is no clear scope of it. We simply move all shared code between the various Osmocom projects in this library to avoid code duplication.
The libosmocore.git repository build multiple libraries:
The official homepage of the project is https://osmocom.org/projects/libosmocore/wiki/Libosmocore
You can clone from the official libosmocore.git repository using
git clone git://git.osmocom.org/libosmocore.git
There is a cgit interface at https://git.osmocom.org/libosmocore/
Doxygen-generated API documentation is generated during the build process, but also available online for each of the sub-libraries at https://ftp.osmocom.org/api/latest/libosmocore/
Discussions related to libosmocore are happening on the openbsc@lists.osmocom.org mailing list, please see https://lists.osmocom.org/mailman/listinfo/openbsc for subscription options and the list archive.
Please observe the Osmocom Mailing List Rules when posting.
Our coding standards are described at https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards
We us a gerrit based patch submission/review process for managing contributions. Please see https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit for more details
The current patch queue for libosmocore can be seen at https://gerrit.osmocom.org/#/q/project:libosmocore+status:open