mirror of
https://github.com/systemd/systemd.git
synced 2024-10-26 08:55:40 +03:00
Merge d95b6887f6
into f7078de515
This commit is contained in:
commit
c74ba829e2
@ -519,6 +519,21 @@ SPDX-License-Identifier: LGPL-2.1-or-later
|
|||||||
return log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to read ...");
|
return log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to read ...");
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- If the error shall be ignored rather than propagated, insert ", ignoring"
|
||||||
|
at the end:
|
||||||
|
|
||||||
|
```c
|
||||||
|
r = parse(...);
|
||||||
|
if (r < 0)
|
||||||
|
log_debug_errno(r, "Failed to parse ..., ignoring: %m");
|
||||||
|
else
|
||||||
|
parsed = r;
|
||||||
|
```
|
||||||
|
|
||||||
|
- Insert a period at the end of the log message if no errno shall be logged.
|
||||||
|
Bus errors however should not end with a period, because they are passed to
|
||||||
|
the client where the message could be embedded within other texts.
|
||||||
|
|
||||||
## Memory Allocation
|
## Memory Allocation
|
||||||
|
|
||||||
- Always check OOM. There is no excuse. In program code, you can use
|
- Always check OOM. There is no excuse. In program code, you can use
|
||||||
|
Loading…
Reference in New Issue
Block a user