static bool arg_skip = false;
static bool arg_force = false;
-static bool arg_show_progress = false;
static const char *arg_repair = "-a";
static void start_target(const char *target) {
}
#endif
- if (access("/run/systemd/show-status", F_OK) >= 0 || plymouth_running())
- arg_show_progress = true;
}
static int process_progress(int fd, dev_t device_num) {
log_warning_errno(r, "fsck.%s cannot be used for %s: %m", type, device);
}
- if (arg_show_progress)
- if (pipe(progress_pipe) < 0) {
- log_error_errno(errno, "pipe(): %m");
- return EXIT_FAILURE;
- }
+ if (pipe(progress_pipe) < 0) {
+ log_error_errno(errno, "pipe(): %m");
+ return EXIT_FAILURE;
+ }
cmdline[i++] = "/sbin/fsck";
cmdline[i++] = arg_repair;
return r;
m->connection_fd = fd;
- m->console = fopen("/dev/console", "we");
- if (!m->console)
- return log_warning_errno(errno, "Can't connect to /dev/console: %m");
+ if (access("/run/systemd/show-status", F_OK) >= 0) {
+ m->console = fopen("/dev/console", "we");
+ if (!m->console)
+ return log_warning_errno(errno, "Can't connect to /dev/console: %m");
+ }
m->percent = 100;
*ret = m;