Skip to content

Commit cc49670

Browse files
committed
tlshd: Display errno message
Usually we use tlshd_log_perror() in these case to convert the errno value to an error message. However, here there is more to display than just the name of the failing function. Signed-off-by: Chuck Lever <[email protected]>
1 parent 46d9e84 commit cc49670

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tlshd/keyring.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ int tlshd_keyring_link_session(const char *keyring)
269269

270270
ret = keyctl_link(serial, KEY_SPEC_SESSION_KEYRING);
271271
if (ret < 0) {
272-
tlshd_log_debug("Failed to link keyring %s (%lx) error %d\n",
273-
keyring, serial, errno);
272+
tlshd_log_debug("Failed to link keyring '%s' (%lx): %s\n",
273+
keyring, serial, strerror(errno));
274274
return -1;
275275
}
276276

0 commit comments

Comments
 (0)