[systemd-devel] [PATCH 06/12] Support cancellation of fsck in progress

Lennart Poettering lennart at poettering.net
Wed Jan 28 12:25:31 PST 2015


On Wed, 28.01.15 14:22, Didier Roche (didrocks at ubuntu.com) wrote:

>  src/fsck/fsck.c   | 29 +++++++++++++++++++++--------
>  src/fsckd/fsckd.c | 43 +++++++++++++++++++++++++++++++++++++++++++
>  src/fsckd/fsckd.h |  5 +++++
>  3 files changed, 69 insertions(+), 8 deletions(-)
> 
> diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c
> index f5dd546..0b42e3b 100644
> --- a/src/fsck/fsck.c
> +++ b/src/fsck/fsck.c
> @@ -47,6 +47,8 @@
>  static bool arg_skip = false;
>  static bool arg_force = false;
>  static const char *arg_repair = "-a";
> +static pid_t fsck_pid;
> +static bool cancel_requested = false;

Please do not introduce new global variables unnecessarily. We try to
keep variables locally, and keep the global state at a minimum. An
exception is mostly the command line args, which by their nature are
global anyway...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list