summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2019-05-14 01:29:30 +0200
committerDanny Milosavljevic <dannym@scratchpost.org>2019-05-14 18:01:08 +0200
commit628d09ae53047ea666f4f84ae5e5be911647fe8c (patch)
treef9ff3bb1b346f5faaa9805f1cfaba5c003ce1bdb /gnu
parent44323e63a34f31144b3af9cad900005745d47e87 (diff)
downloadguix-628d09ae53047ea666f4f84ae5e5be911647fe8c.tar.gz
installer: Add fat16.
* gnu/installer/parted.scm (user-fs-type-name): Add fat16.
(user-fs-type->mount-type): Add fat16.
(create-fat16-file-system): New procedure.
(format-user-partitions): Use it.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/installer/parted.scm12
1 files changed, 12 insertions, 0 deletions
diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm
index fc8c9de6f1..e5ffe353fe 100644
--- a/gnu/installer/parted.scm
+++ b/gnu/installer/parted.scm
@@ -259,6 +259,7 @@ inferior to MAX-SIZE, #f otherwise."
   (case fs-type
     ((ext4)  "ext4")
     ((btrfs) "btrfs")
+    ((fat16) "fat16")
     ((fat32) "fat32")
     ((swap)  "linux-swap")))
 
@@ -267,6 +268,7 @@ inferior to MAX-SIZE, #f otherwise."
   (case fs-type
     ((ext4)  "ext4")
     ((btrfs) "btrfs")
+    ((fat16) "fat")
     ((fat32) "vfat")))
 
 (define (partition-filesystem-user-type partition)
@@ -278,6 +280,7 @@ of <user-partition> record."
            (cond
             ((string=? name "ext4") 'ext4)
             ((string=? name "btrfs") 'btrfs)
+            ((string=? name "fat16") 'fat16)
             ((string=? name "fat32") 'fat32)
             ((or (string=? name "swsusp")
                  (string=? name "linux-swap(v0)")
@@ -1052,6 +1055,11 @@ bit bucket."
   (with-null-output-ports
    (invoke "mkfs.ext4" "-F" partition)))
 
+(define (create-fat16-file-system partition)
+  "Create a fat16 file-system for PARTITION file-name."
+  (with-null-output-ports
+   (invoke "mkfs.fat" "-F16" partition)))
+
 (define (create-fat32-file-system partition)
   "Create an ext4 file-system for PARTITION file-name."
   (with-null-output-ports
@@ -1119,6 +1127,10 @@ NEED-FORMATING? field set to #t."
           (and need-formatting?
                (not (eq? type 'extended))
                (create-ext4-file-system file-name)))
+         ((fat16)
+          (and need-formatting?
+               (not (eq? type 'extended))
+               (create-fat16-file-system file-name)))
          ((fat32)
           (and need-formatting?
                (not (eq? type 'extended))