#include <sys/mount.h>
#include <unistd.h>
+#include "escape.h"
#include "log.h"
#include "mkfs-util.h"
#include "mount-util.h"
assert(argv);
assert(argv[0]);
+ if (DEBUG_LOGGING) {
+ _cleanup_free_ char *j = quote_command_line(argv, SHELL_ESCAPE_EMPTY);
+ log_debug("Invoking mtools command: %s", strna(j));
+ }
+
r = pidref_safe_fork(
"(mtools)",
FORK_RESET_SIGNALS|FORK_RLIMIT_NOFILE_SAFE|FORK_DEATHSIG_SIGTERM|FORK_LOG|FORK_WAIT|FORK_STDOUT_TO_STDERR|FORK_CLOSE_ALL_FDS,
log_info("Formatting %s as %s", node, fstype);
if (DEBUG_LOGGING) {
- _cleanup_free_ char *j = NULL;
-
- j = strv_join(argv, " ");
+ _cleanup_free_ char *j = quote_command_line(argv, SHELL_ESCAPE_EMPTY);
log_debug("Executing mkfs command: %s", strna(j));
}