diff options
author | Marius Bakke <mbakke@fastmail.com> | 2018-03-08 21:21:05 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2018-03-08 21:21:05 +0100 |
commit | d8fa1890c705ca566a56b69a4880a10dc7cf0098 (patch) | |
tree | c3f220949e5364d981a4895477249ad46852eea0 /gnu/system/vm.scm | |
parent | 5de561a79634e0814ea22f1cfece9a09efa120be (diff) | |
parent | fee7f8a94ec64943109ba9c37f75c28749fb18bd (diff) | |
download | patches-d8fa1890c705ca566a56b69a4880a10dc7cf0098.tar patches-d8fa1890c705ca566a56b69a4880a10dc7cf0098.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/system/vm.scm')
-rw-r--r-- | gnu/system/vm.scm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 91ff32ce9a..ae8780d2e1 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -30,6 +30,8 @@ #:use-module (guix records) #:use-module (guix modules) #:use-module (guix utils) + #:use-module (guix hash) + #:use-module (guix base32) #:use-module ((gnu build vm) #:select (qemu-command)) @@ -544,13 +546,13 @@ of the GNU system as described by OS." (define (file-system->mount-tag fs) "Return a 9p mount tag for host file system FS." - ;; QEMU mount tags cannot contain slashes and cannot start with '_'. - ;; Compute an identifier that corresponds to the rules. + ;; QEMU mount tags must be ASCII, at most 31-byte long, cannot contain + ;; slashes, and cannot start with '_'. Compute an identifier that + ;; corresponds to the rules. (string-append "TAG" - (string-map (match-lambda - (#\/ #\_) - (chr chr)) - fs))) + (string-drop (bytevector->base32-string + (sha1 (string->utf8 fs))) + 4))) (define (mapping->file-system mapping) "Return a 9p file system that realizes MAPPING." |