guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#72457] [PATCH v5 00/15] Rewrite bootloader subsystem.


From: Lilah Tascheter
Subject: [bug#72457] [PATCH v5 00/15] Rewrite bootloader subsystem.
Date: Thu, 19 Sep 2024 23:44:07 -0500
User-agent: Evolution 3.48.4

untested cause my local tree's a mess rn. has the diff you requested
integrated :)

line counts are off cause it's a diff on the snippet you sent me

- lilah



diff -ru a/gnu/bootloader.scm b/gnu/bootloader.scm
--- a/gnu/bootloader.scm
+++ b/gnu/bootloader.scm
@@ -5,22 +5,26 @@
              (seen    '()))
     (match targets
       ((target rest ...)
-       (let (type (bootloader-target-type target)))
+       (let ((type (bootloader-target-type target)))
          (when (memq type seen)
            (error loc (G_ "target with duplicate type~%") duplicate))
-         (loop rest (cons type seen)))
+         (loop rest (cons type seen))))
       (() #t))))
 
-(define-with-syntax-properties (warn-update-targets (targets
properties))
-  (let ((targets (if (list? targets) targets (list targets)))
+(define-with-syntax-properties (warn-update-targets (value
properties))
+  (let ((targets (if (list? value) value (list value)))
         (loc (source-properties->location properties)))
     (define string->target
       (match-lambda
         ((? bootloader-target? target) target)
         ((? string? s) (if (string-prefix? "/dev" s)
-                           (bootloader-target
-                             (type 'disk)
-                             (device s))
+                           (if (string-rindex s char-set:digit)
+                               (bootloader-target
+                                 (type 'part)
+                                 (device s))
+                               (bootloader-target
+                                 (type 'disk)
+                                 (device s)))
                            (bootloader-target
                              (type 'esp)
                              (offset 'root)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]