summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2023-02-26 01:00:00 +0100
committerTobias Geerinckx-Rice <me@tobias.gr>2023-02-26 01:00:07 +0100
commit4ef9a5dd5ec07d2cf4326b65d44a9227d184a56e (patch)
tree878d904cc3f0de7c55a425de57bb608560f3395c /gnu
parent997b93cc4a6deff54ebd854a716cca94095114bf (diff)
downloadguix-4ef9a5dd5ec07d2cf4326b65d44a9227d184a56e.tar.gz
file-systems: Validate 'no-diratime flag.
This follows up on commit c0773455397746b10194bc14c7cef144f4095b65, 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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/build/file-systems.scm1
-rw-r--r--gnu/system/file-systems.scm2
2 files changed, 2 insertions, 1 deletions
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index 66ca22d6ea..36a59f5f5c 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -1123,6 +1123,7 @@ an exception in such cases but perform the nearest sane action."
   "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)))
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index f2eb2e0837..85b00a4a09 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -122,7 +122,7 @@
     ;; 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."