aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/package.lisp1
-rw-r--r--src/property/disk.lisp4
-rw-r--r--src/util.lisp4
3 files changed, 6 insertions, 3 deletions
diff --git a/src/package.lisp b/src/package.lisp
index 9c8decf..494304c 100644
--- a/src/package.lisp
+++ b/src/package.lisp
@@ -67,6 +67,7 @@
#:pathname-file
#:quote-nonselfeval
#:define-print-object-for-structlike
+ #:chroot-pathname
#:*consfigurator-debug-level*
#:with-indented-inform
diff --git a/src/property/disk.lisp b/src/property/disk.lisp
index 4fd67ed..cb53d85 100644
--- a/src/property/disk.lisp
+++ b/src/property/disk.lisp
@@ -378,9 +378,7 @@ unmounted, since the actual mount point is not stored.")
(defclass-opened-volume mounted-filesystem (filesystem))
(defmethod open-volume ((volume filesystem) (file pathname))
- (let ((mount-point
- (merge-pathnames (enough-pathname (mount-point volume) #P"/")
- (ensure-directory-pathname *mount-below*))))
+ (let ((mount-point (chroot-pathname (mount-point volume) *mount-below*)))
(file:directory-exists mount-point)
(mrun "mount" file mount-point))
(make-opened-volume volume file))
diff --git a/src/util.lisp b/src/util.lisp
index c611c65..82a7f55 100644
--- a/src/util.lisp
+++ b/src/util.lisp
@@ -174,6 +174,10 @@ one-dimensional collections of values."
(call-next-method))
object))
+(defun chroot-pathname (pathname chroot)
+ (merge-pathnames (enough-pathname pathname #P"/")
+ (ensure-directory-pathname chroot)))
+
;;;; Progress & debug printing