[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 07/12] util/range: make range_list_from_string() accept a sing
From: |
Sven Schnelle |
Subject: |
[PATCH v3 07/12] util/range: make range_list_from_string() accept a single number |
Date: |
Fri, 1 Mar 2024 18:46:04 +0100 |
To use range_list_from_string() as a replacement in the execlog
plugin, make it accept single numbers instead of a range. This
might also be useful for the already present debug_ranges filtering.
Signed-off-by: Sven Schnelle <svens@stackframe.org>
---
util/range.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/util/range.c b/util/range.c
index 8c463995e7..7784c21b12 100644
--- a/util/range.c
+++ b/util/range.c
@@ -154,6 +154,11 @@ static int parse_single_range(const char *r, Error **errp,
range_op = split_single_range(r, &r2);
if (!range_op) {
+ if (!qemu_strtou64(r, &e, 0, &r1val) && *e == '\0') {
+ *lob = r1val;
+ *upb = r1val;
+ return 0;
+ }
error_setg(errp, "Bad range specifier");
return 1;
}
--
2.43.2
- Re: [PATCH v3 01/12] util/log: convert debug_regions to GList, (continued)
[PATCH v3 06/12] util/range: split up range_list_from_string(), Sven Schnelle, 2024/03/01
[PATCH v3 05/12] util/range: use append_new_range() in range_list_from_string(), Sven Schnelle, 2024/03/01
[PATCH v3 02/12] util/log: make qemu_set_dfilter_ranges() take a GList, Sven Schnelle, 2024/03/01
[PATCH v3 03/12] util/range: move range_list_from_string() to range.c, Sven Schnelle, 2024/03/01
[PATCH v3 07/12] util/range: make range_list_from_string() accept a single number,
Sven Schnelle <=
[PATCH v3 08/12] qemu/range: add range_list_contains() function, Sven Schnelle, 2024/03/01
[PATCH v3 04/12] util/range: add range_list_free(), Sven Schnelle, 2024/03/01
[PATCH v3 10/12] plugins: add range list API, Sven Schnelle, 2024/03/01
[PATCH v3 12/12] plugins/execlog: add data address match, Sven Schnelle, 2024/03/01
[PATCH v3 09/12] plugins: add API to print errors, Sven Schnelle, 2024/03/01
[PATCH v3 11/12] plugins/execlog: use range list api, Sven Schnelle, 2024/03/01