Propagate return value from get_clock() through __uuid_generate_time(). Signed-off-by: Petr Uzel <petr.uzel@xxxxxxx> --- shlibs/uuid/src/gen_uuid.c | 6 ++++-- shlibs/uuid/src/uuidd.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/shlibs/uuid/src/gen_uuid.c b/shlibs/uuid/src/gen_uuid.c index 535903c..6bd1f1d 100644 --- a/shlibs/uuid/src/gen_uuid.c +++ b/shlibs/uuid/src/gen_uuid.c @@ -566,12 +566,13 @@ static int get_uuid_via_daemon(int op, uuid_t out, int *num) } #endif -void __uuid_generate_time(uuid_t out, int *num) +int __uuid_generate_time(uuid_t out, int *num) { static unsigned char node_id[6]; static int has_init = 0; struct uuid uu; uint32_t clock_mid; + int ret; if (!has_init) { if (get_node_id(node_id) <= 0) { @@ -585,12 +586,13 @@ void __uuid_generate_time(uuid_t out, int *num) } has_init = 1; } - get_clock(&clock_mid, &uu.time_low, &uu.clock_seq, num); + ret = get_clock(&clock_mid, &uu.time_low, &uu.clock_seq, num); uu.clock_seq |= 0x8000; uu.time_mid = (uint16_t) clock_mid; uu.time_hi_and_version = ((clock_mid >> 16) & 0x0FFF) | 0x1000; memcpy(uu.node, node_id, 6); uuid_pack(&uu, out); + return ret; } void uuid_generate_time(uuid_t out) diff --git a/shlibs/uuid/src/uuidd.h b/shlibs/uuid/src/uuidd.h index fe3b93c..27b79c2 100644 --- a/shlibs/uuid/src/uuidd.h +++ b/shlibs/uuid/src/uuidd.h @@ -48,7 +48,7 @@ #define UUIDD_OP_BULK_RANDOM_UUID 5 #define UUIDD_MAX_OP UUIDD_OP_BULK_RANDOM_UUID -extern void __uuid_generate_time(uuid_t out, int *num); +extern int __uuid_generate_time(uuid_t out, int *num); extern void __uuid_generate_random(uuid_t out, int *num); #endif /* _UUID_UUID_H */ -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html