aboutsummaryrefslogtreecommitdiff
path: root/src/property/disk.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-05-06 11:17:08 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-05-06 12:51:27 -0700
commit83e25a4b4d37ca1ea69b840d5323de897be0a54d (patch)
treed288f1478ed1cdf078781f0fa53dc569a695e259 /src/property/disk.lisp
parent052d673c61ed41e934db363e5a472fa28d9e6c65 (diff)
downloadconsfigurator-83e25a4b4d37ca1ea69b840d5323de897be0a54d.tar.gz
DISK:RAW-IMAGE-BUILT-FOR: more general PHYSICAL-DISK field copy
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property/disk.lisp')
-rw-r--r--src/property/disk.lisp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/property/disk.lisp b/src/property/disk.lisp
index 42819f9..7a9654a 100644
--- a/src/property/disk.lisp
+++ b/src/property/disk.lisp
@@ -804,14 +804,10 @@ filesystems will be incrementally updated when other properties change."
if (and physical-disk-p (not found)
(slot-boundp volume 'volume-contents))
do (setq found t)
- and collect
- (let ((new (make-instance
- 'raw-disk-image
- :image-file image-pathname
- :volume-contents (volume-contents volume))))
- (when (slot-boundp volume 'volume-size)
- (setf (volume-size new) (volume-size volume)))
- new)
+ and collect (let ((copy (copy-volume-and-contents volume)))
+ (change-class copy 'raw-disk-image)
+ (setf (image-file copy) image-pathname)
+ copy)
else unless physical-disk-p
collect volume
finally