This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch andyp-fsck_cx
in repository gfs2-utils.
commit 21a0c1a65db3f61f95cf5eaabeb964fa92b513c1
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Mon Aug 1 08:50:58 2022 +0100
fsck.gfs2: Move the global force_check into fsck_options
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/fsck/fsck.h | 1 +
gfs2/fsck/main.c | 7 +++----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gfs2/fsck/fsck.h b/gfs2/fsck/fsck.h
index 603149b2..306a4ec1 100644
--- a/gfs2/fsck/fsck.h
+++ b/gfs2/fsck/fsck.h
@@ -147,6 +147,7 @@ struct fsck_options {
unsigned int no:1;
unsigned int query:1;
unsigned int preen:1;
+ unsigned int force:1;
};
extern struct fsck_options opts;
diff --git a/gfs2/fsck/main.c b/gfs2/fsck/main.c
index 0b5d2398..47f9c287 100644
--- a/gfs2/fsck/main.c
+++ b/gfs2/fsck/main.c
@@ -38,7 +38,6 @@ int dups_found = 0, dups_found_first = 0;
int sb_fixed = 0;
int print_level = MSG_NOTICE;
-static int force_check = 0;
static const char *pass_name = "";
static void usage(char *name)
@@ -70,7 +69,7 @@ static int read_cmdline(int argc, char **argv, struct fsck_options
*gopts)
gopts->yes = 1;
break;
case 'f':
- force_check = 1;
+ gopts->force = 1;
break;
case 'h':
usage(argv[0]);
@@ -326,10 +325,10 @@ int main(int argc, char **argv)
exit(error);
setbuf(stdout, NULL);
log_notice( _("Initializing fsck\n"));
- if ((error = initialize(&cx, force_check, opts.preen, &all_clean)))
+ if ((error = initialize(&cx, opts.force, opts.preen, &all_clean)))
exit(error);
- if (!force_check && all_clean && opts.preen) {
+ if (!opts.force && all_clean && opts.preen) {
log_err( _("%s: clean.\n"), opts.device);
destroy(&cx);
exit(FSCK_OK);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.