summaryrefslogtreecommitdiff
path: root/src/core/mount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-28 02:05:14 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-28 02:18:46 +0100
commite2cc6eca73cd1df8be552d7c23f9ff3d69c06f1e (patch)
tree874e0dac2d1426e44c3e748734cbb297f3feefa8 /src/core/mount.c
parent6c861f0aeff9449ee1201bb56f89861921e41c45 (diff)
log: fix order of log_unit_struct() to match other logging calls
Also, while we are at it, introduce some syntactic sugar for creating ERRNO= and MESSAGE= structured logging fields.
Diffstat (limited to 'src/core/mount.c')
-rw-r--r--src/core/mount.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/core/mount.c b/src/core/mount.c
index 36375f65bc..d34699bca8 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -823,12 +823,12 @@ void warn_if_dir_nonempty(const char *unit, const char* where) {
if (r > 0)
return;
else if (r == 0)
- log_unit_struct(LOG_NOTICE,
- unit,
- "MESSAGE=%s: Directory %s to mount over is not empty, mounting anyway.",
- unit, where,
+ log_unit_struct(unit,
+ LOG_NOTICE,
+ LOG_MESSAGE_ID(SD_MESSAGE_OVERMOUNTING),
+ LOG_MESSAGE("%s: Directory %s to mount over is not empty, mounting anyway.",
+ unit, where),
"WHERE=%s", where,
- MESSAGE_ID(SD_MESSAGE_OVERMOUNTING),
NULL);
else
log_unit_warning(unit,
@@ -840,12 +840,12 @@ static int fail_if_symlink(const char *unit, const char* where) {
assert(where);
if (is_symlink(where) > 0) {
- log_unit_struct(LOG_WARNING,
- unit,
- "MESSAGE=%s: Mount on symlink %s not allowed.",
- unit, where,
+ log_unit_struct(unit,
+ LOG_ERR,
+ LOG_MESSAGE_ID(SD_MESSAGE_OVERMOUNTING),
+ LOG_MESSAGE("%s: Mount on symlink %s not allowed.",
+ unit, where),
"WHERE=%s", where,
- MESSAGE_ID(SD_MESSAGE_OVERMOUNTING),
NULL);
return -ELOOP;