]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: remove unused context variables
authorKarel Zak <kzak@redhat.com>
Fri, 26 Aug 2022 08:25:04 +0000 (10:25 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 3 Jan 2023 11:58:42 +0000 (12:58 +0100)
All replaced by optlist container.

Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/context.c
libmount/src/mountP.h

index 1ca354f83be30875eec81f863c016f44932e02d1..b846a930356b1ca75db23fc78cedee280a00607c 100644 (file)
@@ -154,15 +154,11 @@ int mnt_reset_context(struct libmnt_context *cxt)
        mnt_unref_table(cxt->utab);
 
        free(cxt->helper);
-       free(cxt->orig_user);
 
        cxt->fs = NULL;
        cxt->mountinfo = NULL;
        cxt->utab = NULL;
        cxt->helper = NULL;
-       cxt->orig_user = NULL;
-       cxt->mountflags = 0;
-       cxt->user_mountflags = 0;
        cxt->mountdata = NULL;
        cxt->flags = MNT_FL_DEFAULT;
        cxt->noautofs = 1;
@@ -289,11 +285,6 @@ struct libmnt_context *mnt_copy_context(struct libmnt_context *o)
                goto failed;
        if (strdup_between_structs(n, o, helper))
                goto failed;
-       if (strdup_between_structs(n, o, orig_user))
-               goto failed;
-
-       n->mountflags = o->mountflags;
-       n->mountdata = o->mountdata;
 
        n->map_linux = o->map_linux;
        n->map_userspace = o->map_userspace;
index 51491eb2d710c66c7995c72ecf15a4488075c366..799aeb2036ce7ad77117d60154105b4d8cff9666 100644 (file)
@@ -383,11 +383,8 @@ struct libmnt_context
 
        int     optsmode;       /* fstab optstr mode MNT_OPTSMODE_{AUTO,FORCE,IGNORE} */
 
-       unsigned long   mountflags;     /* final mount(2) flags */
        const void      *mountdata;     /* final mount(2) data, string or binary data */
 
-       unsigned long   user_mountflags;        /* MNT_MS_* (loop=, user=, ...) */
-
        struct libmnt_cache     *cache;         /* paths cache */
        struct libmnt_lock      *lock;          /* utab lock */
        struct libmnt_update    *update;        /* utab update */
@@ -409,8 +406,6 @@ struct libmnt_context
        int     helper_status;  /* helper wait(2) status */
        int     helper_exec_status; /* 1: not called yet, 0: success, <0: -errno */
 
-       char    *orig_user;     /* original (non-fixed) user= option */
-
        pid_t   *children;      /* "mount -a --fork" PIDs */
        int     nchildren;      /* number of children */
        pid_t   pid;            /* 0=parent; PID=child */