[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#51425: file-system: validate flags
From: |
Maxim Cournoyer |
Subject: |
bug#51425: file-system: validate flags |
Date: |
Sat, 30 Oct 2021 22:31:40 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hi Tobias,
Tobias Geerinckx-Rice <me@tobias.gr> writes:
> Maxim,
>
> Maxim Cournoyer 写道:
>> Another thing that is tricky about options is that some of them are
>> only
>> really understood by the 'mount' command line utility, not the
>> 'mount'
>> system call such as used in our init RAM disk (both are thrown
>> together
>> in 'man 8 mount' without an easy way to discern them apart, IIRC).
>
> Aha! Let me introduce you to the only slightly unfortunately named
> ‘man 2 mount’ instead.
Eh, I'm not sure why I hadn't thought about that myself, thank you! It
makes sense after all -- one man page (2) documents the options for the
system call, the other one (8) for the command.
> The way mount(8) lumps both together is… I guess it's user-friendly —
> in a way? — but it leads to this total confusion about what's what.
> Think of flags as literal bit flags, mainly because they are.
Hehe.
> Guix does make the distinction. It's the right call but it leads to a
> brief education moment the first time you encounter both fields.
>
> You're absolutely right that mount options OTOH are arbitrary strings.
> They can't and shouldn't be ‘validated’, but we don't currently
> mandate their stringiness, and should.
Makes sense.
Thank you!
Maxim
bug#51425: file-system: validate flags, Ludovic Courtès, 2021/10/29