mirror of
https://github.com/sheumann/hush.git
synced 2024-09-12 00:55:11 +00:00
*: s/open3_or_warn/open_or_warn/ where makes sense
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
This commit is contained in:
parent
d3c5ab703b
commit
bec588878b
@ -27,7 +27,7 @@ int fsync_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
|
|
||||||
status = EXIT_SUCCESS;
|
status = EXIT_SUCCESS;
|
||||||
do {
|
do {
|
||||||
int fd = open3_or_warn(*argv, O_NOATIME | O_NOCTTY | O_RDONLY, 0);
|
int fd = open_or_warn(*argv, O_NOATIME | O_NOCTTY | O_RDONLY);
|
||||||
|
|
||||||
if (fd == -1) {
|
if (fd == -1) {
|
||||||
status = EXIT_FAILURE;
|
status = EXIT_FAILURE;
|
||||||
|
@ -123,7 +123,7 @@ static void crondlog(const char *ctl, ...)
|
|||||||
/* Syslog mode: all to syslog (logmode = LOGMODE_SYSLOG), */
|
/* Syslog mode: all to syslog (logmode = LOGMODE_SYSLOG), */
|
||||||
if (!DebugOpt && G.log_filename) {
|
if (!DebugOpt && G.log_filename) {
|
||||||
/* Otherwise (log to file): we reopen log file at every write: */
|
/* Otherwise (log to file): we reopen log file at every write: */
|
||||||
int logfd = open3_or_warn(G.log_filename, O_WRONLY | O_CREAT | O_APPEND, 0666);
|
int logfd = open_or_warn(G.log_filename, O_WRONLY | O_CREAT | O_APPEND);
|
||||||
if (logfd >= 0)
|
if (logfd >= 0)
|
||||||
xmove_fd(logfd, STDERR_FILENO);
|
xmove_fd(logfd, STDERR_FILENO);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user