mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Factor out system call names from error messages
Instead, put them in via a format placeholder. This reduces the number of distinct translatable messages and also reduces the chances of typos during translation. We already did this for the system call arguments in a number of cases, so this is just the same thing taken a bit further. Discussion: https://www.postgresql.org/message-id/flat/92d6f545-5102-65d8-3c87-489f71ea0a37%40enterprisedb.com
This commit is contained in:
@ -1061,9 +1061,8 @@ WaitEventAdjustEpoll(WaitEventSet *set, WaitEvent *event, int action)
|
||||
if (rc < 0)
|
||||
ereport(ERROR,
|
||||
(errcode_for_socket_access(),
|
||||
/* translator: %s is a syscall name, such as "poll()" */
|
||||
errmsg("%s failed: %m",
|
||||
"epoll_ctl()")));
|
||||
errmsg("%s() failed: %m",
|
||||
"epoll_ctl")));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1231,9 +1230,8 @@ WaitEventAdjustKqueue(WaitEventSet *set, WaitEvent *event, int old_events)
|
||||
else
|
||||
ereport(ERROR,
|
||||
(errcode_for_socket_access(),
|
||||
/* translator: %s is a syscall name, such as "poll()" */
|
||||
errmsg("%s failed: %m",
|
||||
"kevent()")));
|
||||
errmsg("%s() failed: %m",
|
||||
"kevent")));
|
||||
}
|
||||
else if (event->events == WL_POSTMASTER_DEATH &&
|
||||
PostmasterPid != getppid() &&
|
||||
@ -1461,9 +1459,8 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout,
|
||||
waiting = false;
|
||||
ereport(ERROR,
|
||||
(errcode_for_socket_access(),
|
||||
/* translator: %s is a syscall name, such as "poll()" */
|
||||
errmsg("%s failed: %m",
|
||||
"epoll_wait()")));
|
||||
errmsg("%s() failed: %m",
|
||||
"epoll_wait")));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -1614,9 +1611,8 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout,
|
||||
waiting = false;
|
||||
ereport(ERROR,
|
||||
(errcode_for_socket_access(),
|
||||
/* translator: %s is a syscall name, such as "poll()" */
|
||||
errmsg("%s failed: %m",
|
||||
"kevent()")));
|
||||
errmsg("%s() failed: %m",
|
||||
"kevent")));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -1731,9 +1727,8 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout,
|
||||
waiting = false;
|
||||
ereport(ERROR,
|
||||
(errcode_for_socket_access(),
|
||||
/* translator: %s is a syscall name, such as "poll()" */
|
||||
errmsg("%s failed: %m",
|
||||
"poll()")));
|
||||
errmsg("%s() failed: %m",
|
||||
"poll")));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user