diff options
author | Dragos Motrea <Dragos.Motrea@enea.com> | 2017-07-17 14:21:32 +0200 |
---|---|---|
committer | Adrian Calianu <adrian.calianu@enea.com> | 2017-07-19 10:25:43 +0200 |
commit | e0b480da53093f8832a5d6b0a2fd083a9e99c7e8 (patch) | |
tree | 3fd6bd7d2d455cab31e4713aa93d7ac9e19c088d /recipes-enea/bitcalc | |
parent | 4bf7d1abd0e8414a7f096864fa916e3cc705ac11 (diff) | |
download | meta-nfv-access-common-e0b480da53093f8832a5d6b0a2fd083a9e99c7e8.tar.gz |
Upgraded to the latest rt-tools version
Added new recipe for the bitcalc tool. Removed list2mask recipe and updated
the partrt and the count-ticks recipes.
Signed-off-by: Dragos Motrea <Dragos.Motrea@enea.com>
Signed-off-by: Adrian Calianu <adrian.calianu@enea.com>
Diffstat (limited to 'recipes-enea/bitcalc')
3 files changed, 118 insertions, 0 deletions
diff --git a/recipes-enea/bitcalc/bitcalc/0001-bitcalc-resolved-compilation-warnings.patch b/recipes-enea/bitcalc/bitcalc/0001-bitcalc-resolved-compilation-warnings.patch new file mode 100644 index 0000000..d1410cd --- /dev/null +++ b/recipes-enea/bitcalc/bitcalc/0001-bitcalc-resolved-compilation-warnings.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | From 00f03f600f29323cc6fd1c0f484a06d31acfd51d Mon Sep 17 00:00:00 2001 | ||
2 | From: Dragos Motrea <Dragos.Motrea@enea.com> | ||
3 | Date: Thu, 13 Jul 2017 13:55:42 +0200 | ||
4 | Subject: [rt-tools][LXCR-7892][PATCHv1 1/1] bitcalc: resolved compilation | ||
5 | warnings | ||
6 | |||
7 | Two warnings resolved: functions which are candidates for 'pure' attribute and | ||
8 | an uninitialized variable. | ||
9 | |||
10 | Upstream-Status: Submitted | ||
11 | |||
12 | Signed-off-by: Dragos Motrea <Dragos.Motrea@enea.com> | ||
13 | --- | ||
14 | bitcalc/src/bitcalc.c | 2 +- | ||
15 | bitcalc/src/bitmap.h | 4 ++-- | ||
16 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
17 | |||
18 | diff --git a/bitcalc/src/bitcalc.c b/bitcalc/src/bitcalc.c | ||
19 | index bae4c06..8a51628 100644 | ||
20 | --- a/bitcalc/src/bitcalc.c | ||
21 | +++ b/bitcalc/src/bitcalc.c | ||
22 | @@ -54,7 +54,7 @@ static size_t bitmap_stack_depth_max = 0; | ||
23 | |||
24 | static char *bitmap_str(const struct bitmap_t *set) | ||
25 | { | ||
26 | - char *str; | ||
27 | + char *str = NULL; | ||
28 | |||
29 | switch (display_format) { | ||
30 | case format_mask: | ||
31 | diff --git a/bitcalc/src/bitmap.h b/bitcalc/src/bitmap.h | ||
32 | index 17fee3a..5022dac 100644 | ||
33 | --- a/bitcalc/src/bitmap.h | ||
34 | +++ b/bitcalc/src/bitmap.h | ||
35 | @@ -61,10 +61,10 @@ extern struct bitmap_t *bitmap_alloc_from_u32_list(const char *mlist); | ||
36 | */ | ||
37 | |||
38 | /* Return 1 if bit is set in bit mask, 0 otherwise. */ | ||
39 | -extern int bitmap_isset(size_t bit, const struct bitmap_t *set); | ||
40 | +extern int bitmap_isset(size_t bit, const struct bitmap_t *set) __attribute__((pure)); | ||
41 | |||
42 | /* Return the number of bits set in bit mask. */ | ||
43 | -extern size_t bitmap_bit_count(const struct bitmap_t *set); | ||
44 | +extern size_t bitmap_bit_count(const struct bitmap_t *set) __attribute__((pure)); | ||
45 | |||
46 | /* | ||
47 | * Modify bitmap | ||
48 | -- | ||
49 | 2.7.4 | ||
50 | |||
diff --git a/recipes-enea/bitcalc/bitcalc/0001-bitcalc-resolved-memory-leaks.patch b/recipes-enea/bitcalc/bitcalc/0001-bitcalc-resolved-memory-leaks.patch new file mode 100644 index 0000000..39bda0b --- /dev/null +++ b/recipes-enea/bitcalc/bitcalc/0001-bitcalc-resolved-memory-leaks.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From ca0eba026490d8ee29786f80725fb3077dd200a4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dragos Motrea <Dragos.Motrea@enea.com> | ||
3 | Date: Mon, 17 Jul 2017 11:08:41 +0200 | ||
4 | Subject: [rt-tools][LXCR-7893][PATCHv3 1/1] bitcalc: resolved memory leaks | ||
5 | |||
6 | Upstream-status: Submitted | ||
7 | |||
8 | Signed-off-by: Dragos Motrea <Dragos.Motrea@enea.com> | ||
9 | --- | ||
10 | Changes from v2: | ||
11 | - added Upstream-Status | ||
12 | **** | ||
13 | bitcalc/src/bitcalc.c | 1 + | ||
14 | bitcalc/src/bitmap.c | 1 + | ||
15 | 2 files changed, 2 insertions(+) | ||
16 | |||
17 | diff --git a/bitcalc/src/bitcalc.c b/bitcalc/src/bitcalc.c | ||
18 | index 8a51628..196d406 100644 | ||
19 | --- a/bitcalc/src/bitcalc.c | ||
20 | +++ b/bitcalc/src/bitcalc.c | ||
21 | @@ -487,6 +487,7 @@ int main(int argc, char *argv[]) | ||
22 | char *const bitmap = bitmap_str(item); | ||
23 | printf("%s%s", first ? "" : " ", bitmap); | ||
24 | bitmap_free(item); | ||
25 | + free(bitmap); | ||
26 | first = 0; | ||
27 | } | ||
28 | |||
29 | diff --git a/bitcalc/src/bitmap.c b/bitcalc/src/bitmap.c | ||
30 | index 3c60d0b..c29d47c 100644 | ||
31 | --- a/bitcalc/src/bitmap.c | ||
32 | +++ b/bitcalc/src/bitmap.c | ||
33 | @@ -76,6 +76,7 @@ void bitmap_free(struct bitmap_t *set) | ||
34 | { | ||
35 | set->size_u32 = 0; | ||
36 | set->size_bits = 0; | ||
37 | + free(set->map); | ||
38 | free(set); | ||
39 | } | ||
40 | |||
41 | -- | ||
42 | 2.7.4 | ||
43 | |||
diff --git a/recipes-enea/bitcalc/bitcalc_1.0.bb b/recipes-enea/bitcalc/bitcalc_1.0.bb new file mode 100644 index 0000000..e9c677a --- /dev/null +++ b/recipes-enea/bitcalc/bitcalc_1.0.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | SUMMARY = "Translate CPU list to a CPU mask" | ||
2 | DESCRIPTION = "Translate CPU list given on command line to a hexadecimal CPU mask. Can use kernel boot parameters isolcpus or nohz_full as input as well as a list given on command line." | ||
3 | SECTION = "utils" | ||
4 | LICENSE = "BSD" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=b52bab7a403562f36be803f11489f1a4" | ||
6 | |||
7 | PR = "r0" | ||
8 | |||
9 | DEPENDS = "gcc-sanitizers" | ||
10 | RDEPENDS_${PN} = "bash" | ||
11 | |||
12 | FILESEXTRAPATHS_append := "${THISDIR}/${PN}" | ||
13 | |||
14 | SRC_URI = "git://github.com/OpenEneaLinux/rt-tools.git;branch=master \ | ||
15 | file://0001-bitcalc-resolved-compilation-warnings.patch \ | ||
16 | file://0001-bitcalc-resolved-memory-leaks.patch \ | ||
17 | " | ||
18 | |||
19 | SRCREV = "9d4d1ce26b58ada516466c30e53c75c2961d6f0a" | ||
20 | |||
21 | S = "${WORKDIR}/git" | ||
22 | |||
23 | EXTRA_OEMAKE += "'DESTDIR=${D}/usr/bin'" | ||
24 | |||
25 | inherit pkgconfig cmake | ||