]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: (optstr) remove unused function
authorKarel Zak <kzak@redhat.com>
Wed, 24 Aug 2022 18:22:14 +0000 (20:22 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 3 Jan 2023 11:58:42 +0000 (12:58 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/mountP.h
libmount/src/optstr.c

index dac5336b35e51ff7b326cb2715f13ee8927a0b45..8ececbc393c743e9e83547f0f34521e091695adf 100644 (file)
@@ -470,7 +470,6 @@ extern const struct libmnt_optmap *mnt_optmap_get_entry(
                             const struct libmnt_optmap **mapent);
 
 /* optstr.c */
-extern int mnt_optstr_get_uid(const char *optstr, const char *name, uid_t *uid);
 extern int mnt_optstr_remove_option_at(char **optstr, char *begin, char *end);
 
 extern int mnt_buffer_append_option(struct ul_buffer *buf,
index dedebceefa5e729589c1a911333f8ebcd19eec4e..819d1b7c3f7932bb43144348eb2e18f3d86f8470 100644 (file)
@@ -785,37 +785,6 @@ err:
        return rc;
 }
 
-/*
- * Converts value from @optstr addressed by @name to uid.
- *
- * Returns: 0 on success, <0 on error
- */
-int mnt_optstr_get_uid(const char *optstr, const char *name, uid_t *uid)
-{
-       char *value = NULL;
-       size_t valsz = 0;
-       int rc;
-
-       assert(optstr);
-       assert(name);
-       assert(uid);
-
-       rc = mnt_optstr_get_option(optstr, name, &value, &valsz);
-       if (rc != 0)
-               goto fail;
-
-       rc = mnt_parse_uid(value, valsz, uid);
-       if (rc != 0) {
-               rc = -errno;
-               goto fail;
-       }
-
-       return 0;
-fail:
-       DBG(UTILS, ul_debug("failed to convert '%s'= to number [rc=%d]", name, rc));
-       return rc;
-}
-
 /**
  * mnt_match_options:
  * @optstr: options string