diff options
author | Marius Bakke <mbakke@fastmail.com> | 2017-09-24 19:18:35 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2017-09-24 19:18:35 +0200 |
commit | ffcff272728e750c62acbbf8322c2ad35d69ad81 (patch) | |
tree | bdab0ab0d8e0ede962fcd0f9a5474f67bb9ed682 /gnu/system.scm | |
parent | 6baf1b72057ccda6e491596ad3715c4f555e6a69 (diff) | |
parent | 030030f4416b54285dcdd58bddb863c0e6bda4c4 (diff) | |
download | guix-ffcff272728e750c62acbbf8322c2ad35d69ad81.tar guix-ffcff272728e750c62acbbf8322c2ad35d69ad81.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/system.scm')
-rw-r--r-- | gnu/system.scm | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/gnu/system.scm b/gnu/system.scm index b6c087a031..8ab4801b74 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -243,6 +243,11 @@ directly by the user." ((? string? device) device))) + (define (ensure-not-/dev device) + (if (and (string? device) (string-prefix? "/" device)) + #f + device)) + (match (read port) (('boot-parameters ('version 0) ('label label) ('root-device root) @@ -277,17 +282,16 @@ directly by the user." file))) (store-device - (match (assq 'store rest) - (('store ('device #f) _ ...) - root-device) - (('store ('device device) _ ...) - (device-sexp->device device)) - (_ ;the old format - ;; Root might be a device path like "/dev/sda1", which is not a - ;; suitable GRUB device identifier. - (if (string-prefix? "/" root) - #f - root)))) + ;; Linux device names like "/dev/sda1" are not suitable GRUB device + ;; identifiers, so we just filter them out. + (ensure-not-/dev + (match (assq 'store rest) + (('store ('device #f) _ ...) + root-device) + (('store ('device device) _ ...) + (device-sexp->device device)) + (_ ;the old format + root-device)))) (store-mount-point (match (assq 'store rest) |