diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2013-07-11 10:05:07 +0200 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2013-07-11 10:05:07 +0200 |
commit | cd46bb84ea77fbd4c9a97f782efad3af9c3bda08 (patch) | |
tree | c0106793edd80d715b7970263a81b2884838cb9f /src/rename_device.c | |
parent | 7fca13547c8193667b5be0d79c480b7a25f5a61b (diff) | |
download | initscripts-cd46bb84ea77fbd4c9a97f782efad3af9c3bda08.tar initscripts-cd46bb84ea77fbd4c9a97f782efad3af9c3bda08.tar.gz initscripts-cd46bb84ea77fbd4c9a97f782efad3af9c3bda08.tar.bz2 initscripts-cd46bb84ea77fbd4c9a97f782efad3af9c3bda08.tar.xz initscripts-cd46bb84ea77fbd4c9a97f782efad3af9c3bda08.zip |
rename_device: don't wait for lock with lower permissions
When running udevadm test as a normal user, rename_device hang for 20
seconds.
Diffstat (limited to 'src/rename_device.c')
-rw-r--r-- | src/rename_device.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rename_device.c b/src/rename_device.c index c6a99152..8e28154d 100644 --- a/src/rename_device.c +++ b/src/rename_device.c @@ -247,7 +247,9 @@ void take_lock() { write(lockfd,buf,strlen(buf)); close(lockfd); break; - } + } else if (errno == EACCES) + break; + count++; /* If we've slept for 20 seconds, break the lock. */ if (count >= 200) { |