chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from:
bf37111
)
log: change log_xyz_errno() calls to always return the negative error
author
Lennart Poettering
<lennart@poettering.net>
Fri, 28 Nov 2014 02:10:55 +0000
(
03:10
+0100)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 28 Nov 2014 02:16:56 +0000
(
03:16
+0100)
This enables us to write things like this:
int open_some_file(void) {
fd = open("/dev/foobar", O_RDWR|O_CLOEXEC);
if (fd < 0)
return log_error_errno(errno, "Failed to reboot: %m");
return fd;
}
Which is function that returns -errno on failure, as well as printing an
error message, all in one line.
No differences found