Fixed the error message in lockit() when it fails to create tmp file.
authorMarcin Cieslak <saper@saper.info>
Tue, 10 Feb 2015 14:18:05 +0000 (14:18 +0000)
committerPhilipp Takacs <philipp@bureaucracy.de>
Wed, 11 Mar 2015 22:53:36 +0000 (23:53 +0100)
sbr/lock_file.c

index d15c939..b1879b3 100644 (file)
@@ -429,8 +429,10 @@ lockit(struct lockinfo *li)
        curlock = li->curlock;
        tmplock = li->tmplock;
 
-       if ((fd = mkstemp(tmplock)) == -1)
+       if ((fd = mkstemp(tmplock)) == -1) {
+               advise(NULL, "unable to create temporary file in %s", tmplock);
                return -1;
+       }
 
 #if 0
        /* write our process id into lock file */