From: Karel Zak Date: Wed, 24 Aug 2022 18:22:14 +0000 (+0200) Subject: libmount: (optstr) remove unused function X-Git-Tag: v2.39-rc1~282 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a8c8293b0f1fcc36d083704838d945dec0dcc908;p=thirdparty%2Futil-linux.git libmount: (optstr) remove unused function Signed-off-by: Karel Zak --- diff --git a/libmount/src/mountP.h b/libmount/src/mountP.h index dac5336b35..8ececbc393 100644 --- a/libmount/src/mountP.h +++ b/libmount/src/mountP.h @@ -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, diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c index dedebceefa..819d1b7c3f 100644 --- a/libmount/src/optstr.c +++ b/libmount/src/optstr.c @@ -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