Round 327: Fstrim ext, Swapctl ext, Inotify ext, Fanotify ext, Dnotify ext (20 commands)

ober

dc14126f4aa2938015a0ae10ae49685db0656f69

diff --git a/docs/jemacs-vs-emacs.md b/docs/jemacs-vs-emacs.md
index ac663ae..c377442 100644
--- a/docs/jemacs-vs-emacs.md
+++ b/docs/jemacs-vs-emacs.md
@@ -4583,6 +4583,31 @@ No remaining Tier 1 gaps. All core editing, completion, and navigation features 
 | ebib-import-file | :orange_circle: | Import file into Ebib |
 | ebib-push-citation | :orange_circle: | Push Ebib citation to buffer |
 
+### Round 327 — Fstrim ext, Swapctl ext, Inotify ext, Fanotify ext, Dnotify ext
+
+| Feature | Status | Notes |
+|---------|--------|-------|
+| `fstrim-all` | :orange_circle: | Trim all filesystems |
+| `fstrim-device` | :orange_circle: | Trim specific mount |
+| `fstrim-dryrun` | :orange_circle: | Dry run trim |
+| `fstrim-verbose` | :orange_circle: | Verbose trim |
+| `swapon-show` | :orange_circle: | Show swap areas |
+| `swapon-enable` | :orange_circle: | Enable swap device |
+| `swapoff-disable` | :orange_circle: | Disable swap device |
+| `swap-priority` | :orange_circle: | Set swap priority |
+| `inotifywait-watch` | :orange_circle: | Watch path |
+| `inotifywait-monitor` | :orange_circle: | Monitor path |
+| `inotifywait-recursive` | :orange_circle: | Recursive watch |
+| `inotifywait-event` | :orange_circle: | Filter events |
+| `fanotify-mark` | :orange_circle: | Mark path |
+| `fanotify-monitor` | :orange_circle: | Monitor FS events |
+| `fanotify-global` | :orange_circle: | Global monitoring |
+| `fanotify-permission` | :orange_circle: | Permission events |
+| `dnotify-watch` | :orange_circle: | Watch directory |
+| `dnotify-recursive` | :orange_circle: | Recursive watch |
+| `dnotify-event` | :orange_circle: | Filter event mask |
+| `dnotify-background` | :orange_circle: | Background watch |
+
 ### Round 326 — Mount ext, Umount ext, Findmnt ext, Lsblk ext, Losetup ext
 
 | Feature | Status | Notes |
diff --git a/src/jerboa-emacs/editor-extra-final.ss b/src/jerboa-emacs/editor-extra-final.ss
index 63567cd..240cb17 100644
--- a/src/jerboa-emacs/editor-extra-final.ss
+++ b/src/jerboa-emacs/editor-extra-final.ss
@@ -24383,4 +24383,60 @@
   (let* ((echo (app-state-echo app)))
     (echo-read-string echo "Loop device: "
       (lambda (dev)
-        (echo-message! echo (str "Losetup: info for " dev))))))
\ No newline at end of file
+        (echo-message! echo (str "Losetup: info for " dev))))))
+
+;;; Round 327 — Inotify ext, Fanotify ext, Dnotify ext (batch 2)
+
+(def (cmd-inotifywait-recursive app)
+  (let* ((echo (app-state-echo app)))
+    (echo-read-string echo "Directory: "
+      (lambda (dir)
+        (echo-message! echo (str "Inotify: recursively watching " dir))))))
+
+(def (cmd-inotifywait-event app)
+  (let* ((echo (app-state-echo app)))
+    (echo-read-string echo "Event type: "
+      (lambda (evt)
+        (echo-message! echo (str "Inotify: filtering for " evt " events"))))))
+
+(def (cmd-fanotify-mark app)
+  (let* ((echo (app-state-echo app)))
+    (echo-read-string echo "Path to mark: "
+      (lambda (path)
+        (echo-message! echo (str "Fanotify: marking " path))))))
+
+(def (cmd-fanotify-monitor app)
+  (let* ((echo (app-state-echo app)))
+    (echo-message! echo "Fanotify: monitoring filesystem events")))
+
+(def (cmd-fanotify-global app)
+  (let* ((echo (app-state-echo app)))
+    (echo-message! echo "Fanotify: global filesystem monitoring")))
+
+(def (cmd-fanotify-permission app)
+  (let* ((echo (app-state-echo app)))
+    (echo-message! echo "Fanotify: permission event monitoring")))
+
+(def (cmd-dnotify-watch app)
+  (let* ((echo (app-state-echo app)))
+    (echo-read-string echo "Directory: "
+      (lambda (dir)
+        (echo-message! echo (str "Dnotify: watching " dir))))))
+
+(def (cmd-dnotify-recursive app)
+  (let* ((echo (app-state-echo app)))
+    (echo-read-string echo "Directory: "
+      (lambda (dir)
+        (echo-message! echo (str "Dnotify: recursively watching " dir))))))
+
+(def (cmd-dnotify-event app)
+  (let* ((echo (app-state-echo app)))
+    (echo-read-string echo "Event mask: "
+      (lambda (mask)
+        (echo-message! echo (str "Dnotify: filtering for " mask))))))
+
+(def (cmd-dnotify-background app)
+  (let* ((echo (app-state-echo app)))
+    (echo-read-string echo "Directory: "
+      (lambda (dir)
+        (echo-message! echo (str "Dnotify: background watch on " dir))))))
\ No newline at end of file
diff --git a/src/jerboa-emacs/editor-extra-modes.ss b/src/jerboa-emacs/editor-extra-modes.ss
index 824da3c..9b44253 100644
--- a/src/jerboa-emacs/editor-extra-modes.ss
+++ b/src/jerboa-emacs/editor-extra-modes.ss
@@ -25090,3 +25090,59 @@
       (lambda (dev)
         (echo-message! echo (str "Findmnt: finding mounts from " dev))))))
 
+;;; Round 327 — Fstrim ext, Swapctl ext, Inotify ext, Fanotify ext, Dnotify ext (batch 1)
+
+(def (cmd-fstrim-all app)
+  (let* ((echo (app-state-echo app)))
+    (echo-message! echo "Fstrim: trimming all mounted filesystems")))
+
+(def (cmd-fstrim-device app)
+  (let* ((echo (app-state-echo app)))
+    (echo-read-string echo "Mount point: "
+      (lambda (mnt)
+        (echo-message! echo (str "Fstrim: trimming " mnt))))))
+
+(def (cmd-fstrim-dryrun app)
+  (let* ((echo (app-state-echo app)))
+    (echo-read-string echo "Mount point: "
+      (lambda (mnt)
+        (echo-message! echo (str "Fstrim: dry run on " mnt))))))
+
+(def (cmd-fstrim-verbose app)
+  (let* ((echo (app-state-echo app)))
+    (echo-message! echo "Fstrim: verbose trim all")))
+
+(def (cmd-swapon-show app)
+  (let* ((echo (app-state-echo app)))
+    (echo-message! echo "Swap: showing swap areas")))
+
+(def (cmd-swapon-enable app)
+  (let* ((echo (app-state-echo app)))
+    (echo-read-string echo "Swap device: "
+      (lambda (dev)
+        (echo-message! echo (str "Swap: enabling " dev))))))
+
+(def (cmd-swapoff-disable app)
+  (let* ((echo (app-state-echo app)))
+    (echo-read-string echo "Swap device: "
+      (lambda (dev)
+        (echo-message! echo (str "Swap: disabling " dev))))))
+
+(def (cmd-swap-priority app)
+  (let* ((echo (app-state-echo app)))
+    (echo-read-string echo "Device and priority: "
+      (lambda (spec)
+        (echo-message! echo (str "Swap: setting priority " spec))))))
+
+(def (cmd-inotifywait-watch app)
+  (let* ((echo (app-state-echo app)))
+    (echo-read-string echo "Path to watch: "
+      (lambda (path)
+        (echo-message! echo (str "Inotify: watching " path))))))
+
+(def (cmd-inotifywait-monitor app)
+  (let* ((echo (app-state-echo app)))
+    (echo-read-string echo "Path to monitor: "
+      (lambda (path)
+        (echo-message! echo (str "Inotify: monitoring " path))))))
+
diff --git a/src/jerboa-emacs/editor-extra-regs2.ss b/src/jerboa-emacs/editor-extra-regs2.ss
index 2aa6dc9..ea5e107 100644
--- a/src/jerboa-emacs/editor-extra-regs2.ss
+++ b/src/jerboa-emacs/editor-extra-regs2.ss
@@ -8284,4 +8284,25 @@
   (register-command! 'losetup-attach cmd-losetup-attach)
   (register-command! 'losetup-detach cmd-losetup-detach)
   (register-command! 'losetup-info cmd-losetup-info)
+  ;; Round 327
+  (register-command! 'fstrim-all cmd-fstrim-all)
+  (register-command! 'fstrim-device cmd-fstrim-device)
+  (register-command! 'fstrim-dryrun cmd-fstrim-dryrun)
+  (register-command! 'fstrim-verbose cmd-fstrim-verbose)
+  (register-command! 'swapon-show cmd-swapon-show)
+  (register-command! 'swapon-enable cmd-swapon-enable)
+  (register-command! 'swapoff-disable cmd-swapoff-disable)
+  (register-command! 'swap-priority cmd-swap-priority)
+  (register-command! 'inotifywait-watch cmd-inotifywait-watch)
+  (register-command! 'inotifywait-monitor cmd-inotifywait-monitor)
+  (register-command! 'inotifywait-recursive cmd-inotifywait-recursive)
+  (register-command! 'inotifywait-event cmd-inotifywait-event)
+  (register-command! 'fanotify-mark cmd-fanotify-mark)
+  (register-command! 'fanotify-monitor cmd-fanotify-monitor)
+  (register-command! 'fanotify-global cmd-fanotify-global)
+  (register-command! 'fanotify-permission cmd-fanotify-permission)
+  (register-command! 'dnotify-watch cmd-dnotify-watch)
+  (register-command! 'dnotify-recursive cmd-dnotify-recursive)
+  (register-command! 'dnotify-event cmd-dnotify-event)
+  (register-command! 'dnotify-background cmd-dnotify-background)
 )