diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-04-14 20:13:22 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-04-14 20:13:22 -0700 |
commit | de84c188109bfb259be23db8d453946115ab5341 (patch) | |
tree | a979545a0d549b311cafff74b85de8cfed34c968 /src/property/disk.lisp | |
parent | 873fd4aee8d40c8c0e31759211b1dc78bd46b824 (diff) | |
download | consfigurator-de84c188109bfb259be23db8d453946115ab5341.tar.gz |
update kpartx(1) comment
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property/disk.lisp')
-rw-r--r-- | src/property/disk.lisp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/property/disk.lisp b/src/property/disk.lisp index bd898b7..9e8e55f 100644 --- a/src/property/disk.lisp +++ b/src/property/disk.lisp @@ -206,13 +206,14 @@ directly writing out with dd(1).")) (defclass-opened-volume opened-raw-disk-image (raw-disk-image)) ;; kpartx(1) can operate directly upon raw disk images, and will also make the -;; whole disk image accessible as a loop device, so we could examine the type -;; of (volume-contents volume), and if we find it's PARTITIONED-VOLUME, we -;; could call (open-volume-contents (volume-contents volume) file) and cons an -;; instance of OPENED-VOLUME for the whole disk onto the front of it (from -;; partitions at /dev/mapper/loopNpM we can infer that /dev/loopN is the whole -;; disk). But for simplicity and composability, just make the whole disk -;; image accessible at this step of the recursion. +;; whole disk image accessible as a loop device whose name we can infer from +;; the kpartx(1) output (from partitions at /dev/mapper/loopNpM we can infer +;; that /dev/loopN is the whole disk). So we could examine the type of +;; (volume-contents volume), and if we find it's PARTITIONED-VOLUME, we could +;; skip executing losetup(1), and just call (open-volume (volume-contents +;; volume) file) and convert the return values into something appropriate for +;; us to return. But for simplicity and composability, just make the whole +;; disk image accessible at this step of the recursion. (defmethod open-volume ((volume raw-disk-image) (file null)) (make-opened-volume volume |