diff options
author | Petr Uzel | 2011-02-03 15:04:59 +0100 |
---|---|---|
committer | Karel Zak | 2011-02-08 15:22:07 +0100 |
commit | 0ee03a286734a1b10575801fef88903ba8bf17d4 (patch) | |
tree | 60dc582fdaeee02d91d5a940e9e734237aaf94bf /misc-utils | |
parent | uuidd: fix -n usage (diff) | |
download | kernel-qcow2-util-linux-0ee03a286734a1b10575801fef88903ba8bf17d4.tar.gz kernel-qcow2-util-linux-0ee03a286734a1b10575801fef88903ba8bf17d4.tar.xz kernel-qcow2-util-linux-0ee03a286734a1b10575801fef88903ba8bf17d4.zip |
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 <petr.uzel@suse.cz>
Diffstat (limited to 'misc-utils')
-rw-r--r-- | misc-utils/uuidd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/misc-utils/uuidd.c b/misc-utils/uuidd.c index 97caa3300..145e6d0ef 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; |