file-systems: Validate 'no-diratime flag.

This follows up on commit c077345539, and
adds a comment to avoid this in future.

* gnu/system/file-systems.scm (invalid-file-system-flags):
Add 'no-diratime to the list of KNOWN-FLAGS.
This commit is contained in:
Tobias Geerinckx-Rice 2023-02-26 01:00:00 +01:00
parent 997b93cc4a
commit 4ef9a5dd5e
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79
2 changed files with 2 additions and 1 deletions

View file

@ -1123,6 +1123,7 @@ (define (mount-flags->bit-mask flags)
"Return the number suitable for the 'flags' argument of 'mount' that
corresponds to the symbols listed in FLAGS."
(let loop ((flags flags))
;; Note: Keep in sync with invalid-file-system-flags.
(match flags
(('read-only rest ...)
(logior MS_RDONLY (loop rest)))

View file

@ -122,7 +122,7 @@ (define invalid-file-system-flags
;; Note: Keep in sync with 'mount-flags->bit-mask'.
(let ((known-flags '(read-only
bind-mount no-suid no-dev no-exec
no-atime strict-atime lazy-time
no-atime no-diratime strict-atime lazy-time
shared)))
(lambda (flags)
"Return the subset of FLAGS that is invalid."