From 0ee03a286734a1b10575801fef88903ba8bf17d4 Mon Sep 17 00:00:00 2001 From: Petr Uzel Date: Thu, 3 Feb 2011 15:04:59 +0100 Subject: [PATCH] uuidd: correctly report number of generated subsequent UUIDs Before this change, "uuidd -t -n 1" reported "6fd0672e-2f9b-11e0-b9c8-000feae00cb0 and subsequent 1 UUIDs". That is two subsequent UUIDs, which is not correct. Signed-off-by: Petr Uzel --- misc-utils/uuidd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc-utils/uuidd.c b/misc-utils/uuidd.c index 97caa33001..145e6d0efb 100644 --- a/misc-utils/uuidd.c +++ b/misc-utils/uuidd.c @@ -369,7 +369,7 @@ static void server_loop(const char *socket_path, const char *pidfile_path, if (debug) { uuid_unparse(uu, str); printf(_("Generated time UUID %s and %d " - "following\n"), str, num); + "following\n"), str, num - 1); } memcpy(reply_buf, uu, sizeof(uu)); reply_len = sizeof(uu); @@ -505,7 +505,7 @@ int main(int argc, char **argv) uuid_unparse((unsigned char *) buf, str); - printf(_("%s and subsequent %d UUIDs\n"), str, num); + printf(_("%s and subsequent %d UUIDs\n"), str, num - 1); } else { printf(_("List of UUIDs:\n")); cp = buf + 4; -- 2.47.3