return 1;
if (errno != ENOENT)
- log_sys_debug("stat", _hints_file);
+ log_debug("hints_exist errno %d %s", errno, _hints_file);
return 0;
}
return 1;
if (errno != ENOENT)
- log_sys_debug("stat", _nohints_file);
+ log_debug("nohints_exist errno %d %s", errno, _nohints_file);
return 0;
}
return 1;
if (errno != ENOENT)
- log_sys_debug("stat", _newhints_file);
+ log_debug("newhints_exist errno %d %s", errno, _newhints_file);
return 0;
}
FILE *fp;
if (!(fp = fopen(_hints_file, "w"))) {
- log_sys_debug("fopen", _hints_file);
+ log_debug("touch_hints errno %d %s", errno, _hints_file);
return 0;
}
if (fclose(fp))
- log_sys_debug("fclose", _hints_file);
+ log_debug("touch_hints close errno %d %s", errno, _hints_file);
return 1;
}
static void _unlink_nohints(void)
{
if (unlink(_nohints_file))
- log_sys_debug("unlink", _nohints_file);
+ log_debug("unlink_nohints errno %d %s", errno, _nohints_file);
}
static void _unlink_hints(void)
{
if (unlink(_hints_file))
- log_sys_debug("unlink", _hints_file);
+ log_debug("unlink_hints errno %d %s", errno, _hints_file);
}
static void _unlink_newhints(void)
{
if (unlink(_newhints_file))
- log_sys_debug("unlink", _newhints_file);
+ log_debug("unlink_newhints errno %d %s", errno, _newhints_file);
}
static int _clear_hints(struct cmd_context *cmd)
fprintf(fp, "# Created empty by %s pid %d %s", cmd->name, getpid(), ctime(&t));
if (fflush(fp))
- log_debug("clear_hints flush errno %d", errno);
+ log_debug("clear_hints flush errno %d %s", errno, _hints_file);
if (fclose(fp))
- log_debug("clear_hints close errno %d", errno);
+ log_debug("clear_hints close errno %d %s", errno, _hints_file);
return 1;
}
fd = open(_hints_file, O_RDWR);
if (fd < 0) {
- log_sys_debug("open", _hints_file);
+ log_debug("lock_hints open errno %d %s", errno, _hints_file);
return 0;
}
}
if (close(fd))
- log_sys_debug("close", _hints_file);
+ log_debug("lock_hints close errno %d %s", errno, _hints_file);
return 0;
}
}
if (fclose(fp))
- log_sys_debug("fclose", _hints_file);
+ log_debug("read_hint_file close errno %d", errno);
if (!ret)
return 0;
out_close:
if (fclose(fp))
- log_sys_debug("fclose", _hints_file);
+ log_debug("write_hint_file close errno %d", errno);
out_unlock:
/* get_hints() took ex lock before returning with newhints set */