From: Markus Armbruster Date: Fri, 1 Jul 2016 11:47:49 +0000 (+0200) Subject: log: Permit -dfilter 0..0xffffffffffffffff X-Git-Tag: qemu-xen-4.8.0-rc1~143^2~14 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=58eeb83cc7c445f167c951493deddf45621d66bb;p=qemu-xen.git log: Permit -dfilter 0..0xffffffffffffffff Works fine since the previous commit fixed the underlying range data type. Of course it filters out nothing, but so does 0..1,2..0xffffffffffffffff, and we don't bother rejecting that either. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- diff --git a/tests/test-logging.c b/tests/test-logging.c index b6fa94ee35..cdf13c6ba5 100644 --- a/tests/test-logging.c +++ b/tests/test-logging.c @@ -73,8 +73,9 @@ static void test_parse_range(void) g_assert_false(qemu_log_in_addr_range(UINT64_MAX - 1)); qemu_set_dfilter_ranges("0..0xffffffffffffffff", &err); - error_free_or_abort(&err); - + g_assert(qemu_log_in_addr_range(0)); + g_assert(qemu_log_in_addr_range(UINT64_MAX)); + qemu_set_dfilter_ranges("2..1", &err); error_free_or_abort(&err); diff --git a/util/log.c b/util/log.c index 4da635c8c9..b6c75b1102 100644 --- a/util/log.c +++ b/util/log.c @@ -204,7 +204,7 @@ void qemu_set_dfilter_ranges(const char *filter_spec, Error **errp) default: g_assert_not_reached(); } - if (lob > upb || (lob == 0 && upb == UINT64_MAX)) { + if (lob > upb) { error_setg(errp, "Invalid range"); goto out; }