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 (parent:
2f42b0c
)
mount-util: call mount_option_mangle() in mount_verbose()
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Thu, 15 Feb 2018 00:43:02 +0000
(09:43 +0900)
committer
Sven Eden
<yamakuzure@gmx.net>
Wed, 30 May 2018 05:59:01 +0000
(07:59 +0200)
src/basic/mount-util.c
patch
|
blob
|
history
diff --git
a/src/basic/mount-util.c
b/src/basic/mount-util.c
index e7106898bbd9339930197471ed600791a4525a97..4c9b5adff4e2617abe6721c25f80da2c4edf50e9 100644
(file)
--- a/
src/basic/mount-util.c
+++ b/
src/basic/mount-util.c
@@
-817,29
+817,37
@@
int mount_verbose(
unsigned long flags,
const char *options) {
unsigned long flags,
const char *options) {
- _cleanup_free_ char *fl = NULL;
+ _cleanup_free_ char *fl = NULL, *o = NULL;
+ unsigned long f;
+ int r;
+
+ r = mount_option_mangle(options, flags, &f, &o);
+ if (r < 0)
+ return log_full_errno(error_log_level, r,
+ "Failed to mangle mount options %s: %m",
+ strempty(options));
- fl = mount_flags_to_string(f
lags
);
+ fl = mount_flags_to_string(f);
- if ((f
lags
& MS_REMOUNT) && !what && !type)
+ if ((f & MS_REMOUNT) && !what && !type)
log_debug("Remounting %s (%s \"%s\")...",
log_debug("Remounting %s (%s \"%s\")...",
- where, strnull(fl), strempty(o
ptions
));
+ where, strnull(fl), strempty(o));
else if (!what && !type)
log_debug("Mounting %s (%s \"%s\")...",
else if (!what && !type)
log_debug("Mounting %s (%s \"%s\")...",
- where, strnull(fl), strempty(o
ptions
));
- else if ((f
lags
& MS_BIND) && !type)
+ where, strnull(fl), strempty(o));
+ else if ((f & MS_BIND) && !type)
log_debug("Bind-mounting %s on %s (%s \"%s\")...",
log_debug("Bind-mounting %s on %s (%s \"%s\")...",
- what, where, strnull(fl), strempty(o
ptions
));
- else if (f
lags
& MS_MOVE)
+ what, where, strnull(fl), strempty(o));
+ else if (f & MS_MOVE)
log_debug("Moving mount %s → %s (%s \"%s\")...",
log_debug("Moving mount %s → %s (%s \"%s\")...",
- what, where, strnull(fl), strempty(o
ptions
));
+ what, where, strnull(fl), strempty(o));
else
log_debug("Mounting %s on %s (%s \"%s\")...",
else
log_debug("Mounting %s on %s (%s \"%s\")...",
- strna(type), where, strnull(fl), strempty(o
ptions
));
- if (mount(what, where, type, f
lags, options
) < 0)
+ strna(type), where, strnull(fl), strempty(o));
+ if (mount(what, where, type, f
, o
) < 0)
return log_full_errno(error_log_level, errno,
"Failed to mount %s on %s (%s \"%s\"): %m",
return log_full_errno(error_log_level, errno,
"Failed to mount %s on %s (%s \"%s\"): %m",
- strna(type), where, strnull(fl), strempty(o
ptions
));
+ strna(type), where, strnull(fl), strempty(o));
return 0;
}
return 0;
}