diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2021-10-12 16:50:47 +0000 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2021-10-12 17:46:23 +0000 |
commit | a1eca979fb8da842e73c42f4f53be29b169810f2 (patch) | |
tree | 681c7283e412bb8a29c2531c4408b49c3e184764 /gnu/installer/parted.scm | |
parent | 48d86a9ec6d8d2e97da2299ea41a03ef4cdaab83 (diff) | |
parent | 371aa5777a3805a3886f3feea5f1960fe3fe4219 (diff) | |
download | guix-a1eca979fb8da842e73c42f4f53be29b169810f2.tar.gz |
Merge remote-tracking branch 'origin/master' into core-updates-frozen.
Diffstat (limited to 'gnu/installer/parted.scm')
-rw-r--r-- | gnu/installer/parted.scm | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm index c000b1dec2..cbe676017b 100644 --- a/gnu/installer/parted.scm +++ b/gnu/installer/parted.scm @@ -231,6 +231,7 @@ inferior to MAX-SIZE, #f otherwise." ((fat32) "fat32") ((jfs) "jfs") ((ntfs) "ntfs") + ((xfs) "xfs") ((swap) "linux-swap"))) (define (user-fs-type->mount-type fs-type) @@ -241,7 +242,8 @@ inferior to MAX-SIZE, #f otherwise." ((fat16) "vfat") ((fat32) "vfat") ((jfs) "jfs") - ((ntfs) "ntfs"))) + ((ntfs) "ntfs") + ((xfs) "xfs"))) (define (partition-filesystem-user-type partition) "Return the filesystem type of PARTITION, to be stored in the FS-TYPE field @@ -256,6 +258,7 @@ of <user-partition> record." ((string=? name "fat32") 'fat32) ((string=? name "jfs") 'jfs) ((string=? name "ntfs") 'ntfs) + ((string=? name "xfs") 'xfs) ((or (string=? name "swsusp") (string=? name "linux-swap(v0)") (string=? name "linux-swap(v1)")) @@ -895,7 +898,7 @@ partition." (format #f "Unable to create partition ~a~%" name))))))))) (define (force-user-partitions-formatting user-partitions) - "Set the NEED-FORMATING? fields to #t on all <user-partition> records of + "Set the NEED-FORMATTING? fields to #t on all <user-partition> records of USER-PARTITIONS list and return the updated list." (map (lambda (p) (user-partition @@ -1125,6 +1128,11 @@ bit bucket." (with-null-output-ports (invoke "mkfs.ntfs" "-F" "-f" partition))) +(define (create-xfs-file-system partition) + "Create an XFS file-system for PARTITION file-name." + (with-null-output-ports + (invoke "mkfs.xfs" "-f" partition))) + (define (create-swap-partition partition) "Set up swap area on PARTITION file-name." (with-null-output-ports @@ -1169,7 +1177,7 @@ USER-PARTITION if it is encrypted, or the plain file-name otherwise." (define (format-user-partitions user-partitions) "Format the <user-partition> records in USER-PARTITIONS list with -NEED-FORMATING? field set to #t." +NEED-FORMATTING? field set to #t." (for-each (lambda (user-partition) (let* ((need-formatting? @@ -1206,6 +1214,10 @@ NEED-FORMATING? field set to #t." (and need-formatting? (not (eq? type 'extended)) (create-ntfs-file-system file-name))) + ((xfs) + (and need-formatting? + (not (eq? type 'extended)) + (create-xfs-file-system file-name))) ((swap) (create-swap-partition file-name)) (else |