static Bool
FileLockIsLockedMandatory(ConstUnicode lockFile, // IN:
- int *err) // OUT:
+ int *err) // OUT/OPT:
{
int access;
FileIOResult result;
} else if (result == FILEIO_FILE_NOT_FOUND) {
return FALSE; // no lock file means unlocked
} else {
- *err = FileMapErrorToErrno(__FUNCTION__, Err_Errno());
+ if (err != NULL) {
+ *err = FileMapErrorToErrno(__FUNCTION__, Err_Errno());
+ }
return FALSE;
}
static Bool
FileLockIsLockedPortable(ConstUnicode lockDir, // IN:
- int *err) // OUT:
+ int *err) // OUT/OPT:
{
uint32 i;
int numEntries;
* If the lock directory doesn't exist, we should not count this
* as an error. This is expected if the file isn't locked.
*/
+
if (err != NULL) {
*err = errno;
}
+
return FALSE;
}
Bool
FileLockIsLocked(ConstUnicode pathName, // IN:
- int *err) // OUT:
+ int *err) // OUT/OPT:
{
Unicode lockBase = Unicode_Append(pathName, FILELOCK_SUFFIX);
Bool isLocked;