mailing list of musl libc
 help / color / mirror / code / Atom feed
From: "Sertonix" <sertonix@posteo.net>
To: <musl@lists.openwall.com>
Subject: [musl] hasmntopt(3) match options instead of substring?
Date: Mon, 03 Feb 2025 23:46:06 +0000	[thread overview]
Message-ID: <D7J7LY9HK54W.1RVKG5JUCLSNT@posteo.net> (raw)

Hi,

people reported issues with mount options not working correctly with
ZFS[1] and someone noticed that it could be related to a behaviour
difference of hasmntopt(3) between musl and glibc.

The manpage[2] mentions that it returns a "substring that matches opt".
Just like musl has implemented it this is just strstr. The problem is
that it will return "atime" as a option found in "noatime" even though
that is probably not what people want.

glibc only accepts matches that match the complete option name.[3]

Would it be possible for musl to only match options as well?
Ideally the wording of hasmntopt(3) would be improved too.

[1]: https://gitlab.alpinelinux.org/alpine/aports/-/issues/12382
[2]: https://man.archlinux.org/man/hasmntopt.3.en
[3]: https://codebrowser.dev/glibc/glibc/misc/mntent_r.c.html#__hasmntopt

             reply	other threads:[~2025-02-03 23:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-03 23:46 Sertonix [this message]
2025-02-09 14:37 ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D7J7LY9HK54W.1RVKG5JUCLSNT@posteo.net \
    --to=sertonix@posteo.net \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).