diff options
author | Fabiano Rosas <farosas@suse.de> | 2025-07-16 15:26:47 -0300 |
---|---|---|
committer | Fabiano Rosas <farosas@suse.de> | 2025-07-22 19:39:29 -0300 |
commit | fd1514cbd97bcad5b3dc5d002cab6fee4d7cd45e (patch) | |
tree | 13faa8875bb177854603b5d3869b5d159a536b12 | |
parent | 2251f9ac9261cda05b6b19e9ba329b15d9d89bae (diff) | |
download | qemu-fd1514cbd97bcad5b3dc5d002cab6fee4d7cd45e.zip qemu-fd1514cbd97bcad5b3dc5d002cab6fee4d7cd45e.tar.gz qemu-fd1514cbd97bcad5b3dc5d002cab6fee4d7cd45e.tar.bz2 |
migration: HMP: Fix postcopy latency distribution label
Fix the loop condition to avoid having a label with "1000 us" instead
of "1 ms".
Reported-by: Prasad Pandit <ppandit@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20250716182648.30202-3-farosas@suse.de
Signed-off-by: Fabiano Rosas <farosas@suse.de>
-rw-r--r-- | migration/migration-hmp-cmds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c index bb95488..a8b879c 100644 --- a/migration/migration-hmp-cmds.c +++ b/migration/migration-hmp-cmds.c @@ -57,7 +57,7 @@ static const gchar *format_time_str(uint64_t us) const char *units[] = {"us", "ms", "sec"}; int index = 0; - while (us > 1000 && index + 1 < ARRAY_SIZE(units)) { + while (us >= 1000 && index + 1 < ARRAY_SIZE(units)) { us /= 1000; index++; } |