From 7a67c9e3fab93f6552106d5907ef6f07e57f277b Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 24 Jun 2022 17:13:57 -0700 Subject: fix FSTAB:HAS-ENTRIES-FOR-OPENED-VOLUMES for FAT32 filesystems The property should never have been calling SUBVOLUMES-OF-TYPE because opening volumes does not ever update the VOLUME-CONTENTS slot to contain OPENED-VOLUME values. The structure of the OPENED-VOLUMES connattr is that of a flat list. Signed-off-by: Sean Whitton --- src/connection/chroot.lisp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/connection') diff --git a/src/connection/chroot.lisp b/src/connection/chroot.lisp index 854043e..a4a67d3 100644 --- a/src/connection/chroot.lisp +++ b/src/connection/chroot.lisp @@ -67,10 +67,9 @@ should be the mount point, without the chroot's root prefixed.") (when (remote-exists-p "/sys/firmware/efi/efivars") (apply #'chroot-mount connection mount:+linux-efivars-vfs+))))) -(defmethod propagate-connattr - ((type (eql 'disk:opened-volumes)) connattr (connection chroot-connection)) +(defun copy-and-update-volumes (volumes connection) (with-slots (into) connection - (loop for volume in connattr + (loop for volume in volumes when (and (subtypep (type-of volume) 'disk:filesystem) (slot-boundp volume 'disk:mount-point) (subpathp (disk:mount-point volume) into)) @@ -79,6 +78,14 @@ should be the mount point, without the chroot's root prefixed.") (in-chroot-pathname (disk:mount-point it) into))) else collect volume))) +(defmethod propagate-connattr + ((type (eql 'disk:opened-volumes)) connattr (connection chroot-connection)) + (copy-and-update-volumes connattr connection)) + +(defmethod propagate-connattr + ((type (eql 'disk:opened-volume-parents)) connattr (connection chroot-connection)) + (copy-and-update-volumes connattr connection)) + (defmethod propagate-connattr ((type (eql :remote-uid)) connattr (connection chroot-connection)) connattr) -- cgit v1.2.3