]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libuuid: do not check for EAGAIN after flock()
authorPetr Uzel <petr.uzel@suse.cz>
Wed, 9 Feb 2011 12:14:04 +0000 (13:14 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 9 Feb 2011 13:23:49 +0000 (14:23 +0100)
As per flock() manpage, flock() does not set errno=EAGAIN.

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
shlibs/uuid/src/gen_uuid.c

index 720fda4340f4d5a63a28b4b5fa9be86cdf8bf04f..e567b297f5fd69fc732d09601692aa85ba3718f6 100644 (file)
@@ -333,7 +333,7 @@ static int get_clock(uint32_t *clock_high, uint32_t *clock_low,
        if (state_fd >= 0) {
                rewind(state_f);
                while (flock(state_fd, LOCK_EX) < 0) {
-                       if ((errno == EAGAIN) || (errno == EINTR))
+                       if (errno == EINTR)
                                continue;
                        fclose(state_f);
                        close(state_fd);