aboutsummaryrefslogtreecommitdiff
path: root/src/host.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'src/host.lisp')
-rw-r--r--src/host.lisp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/host.lisp b/src/host.lisp
index a449d3c..50155c8 100644
--- a/src/host.lisp
+++ b/src/host.lisp
@@ -49,6 +49,13 @@
(:documentation
"A host whose :PREPROCESS and :HOSTATTRS subroutines have not been run."))
+(defgeneric ensure-host (host)
+ (:documentation "Return the HOST value designated by HOST.")
+ (:method ((host host))
+ host)
+ (:method ((hostname string))
+ (make-host :hostattrs `(:hostname (,hostname)))))
+
(defmethod shallow-copy-host ((host host))
(make-instance (type-of host)
:hostattrs (copy-list (hostattrs host))