diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-06-25 09:04:39 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-06-25 11:45:29 -0700 |
commit | 499a06d9920dddae517eabb7bc343ae211d1d309 (patch) | |
tree | 84007c84798e1782dda9084445b5ab4ce7338a01 | |
parent | 7a67c9e3fab93f6552106d5907ef6f07e57f277b (diff) | |
download | consfigurator-499a06d9920dddae517eabb7bc343ae211d1d309.tar.gz |
DISK:OPEN-VOLUME-AND-CONTENTS: avoid using a special variable
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r-- | src/property/disk.lisp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/property/disk.lisp b/src/property/disk.lisp index 7f9c949..6806bab 100644 --- a/src/property/disk.lisp +++ b/src/property/disk.lisp @@ -672,15 +672,14 @@ normally use WITH-OPEN-VOLUMES or WITH-OPENED-VOLUMES. If an error is signalled while the attempt to open volumes is in progress, a single attempt will be made to close all volumes opened up to that point." - (let (opened-volumes all-parents filesystems *latest-parent*) - (declare (special *latest-parent*)) + (let (opened-volumes all-parents filesystems) (handler-case (labels - ((open-volume-and-contents (volume file) + ((open-volume-and-contents (volume file parent) ;; Postpone filesystems until the end so that we can sort ;; them before mounting, to avoid unintended shadowing. (if (subtypep (type-of volume) 'filesystem) - (push (list *latest-parent* volume file) filesystems) + (push (list parent volume file) filesystems) (multiple-value-bind (opened opened-contents) (open-volume volume file) (let ((opened-contents-parents @@ -698,15 +697,14 @@ single attempt will be made to close all volumes opened up to that point." (cons opened opened-volumes)) all-parents (nconc opened-contents-parents - (cons *latest-parent* all-parents))))) + (cons parent all-parents))))) (dolist (opened-volume (or opened-contents `(,opened))) (when (slot-boundp opened-volume 'volume-contents) - (let ((*latest-parent* opened-volume)) - (declare (special *latest-parent*)) - (open-volume-and-contents - (volume-contents opened-volume) - (device-file opened-volume))))))))) - (mapc (rcurry #'open-volume-and-contents nil) volumes) + (open-volume-and-contents + (volume-contents opened-volume) + (device-file opened-volume) + opened-volume))))))) + (mapc (rcurry #'open-volume-and-contents nil nil) volumes) ;; Note that filesystems never have any VOLUME-CONTENTS to open. (with-mount-below (dolist (filesystem |