summaryrefslogtreecommitdiff
path: root/gnu/system/uuid.scm
AgeCommit message (Expand)Author
2021-09-23uuid: Support XFS....* gnu/system/uuid.scm (string->xfs-uuid): New procedure. (%uuid-parsers, %uuid-printers): Add ‘xfs’ file system type. Tobias Geerinckx-Rice
2020-11-07uuid: Add support for bcachefs....* gnu/system/uuid.scm (string->bcachefs-uuid): New exported procedure. (%uuid-parsers, %uuid-printers): Add the ‘bcachefs’ file system type. Tobias Geerinckx-Rice
2020-07-26file-systems: Add NTFS support....* gnu/system/uuid.scm (%ntfs-endianness): New macro, (ntfs-uuid->string): new procedure, (%ntfs-endianness): new variable, (string->ntfs-uuid): new exported procedure, (%uuid-parsers): add NTFS support, (%uuid-printers): add NTFS support. * gnu/build/file-systems.scm (%ntfs-endianness): New macro, (ntfs-superblock?, read-ntfs-superblock, ntfs-superblock-uuid, check-ntfs-file-system): new procedure, (%partition-uuid-readers): add NTFS support, (check-file-system): add NTFS support. Mathieu Othacehe
2020-06-18uuid: Prevent a loop on invalid arguments....* gnu/system/uuid.scm (uuid=?): Use type predicates in the fallback case to prevent looping on invalid arguments. Maxim Cournoyer
2020-01-03uuid: Add support for JFS....* gnu/system/uuid.scm (string->jfs-uuid): New procedure. (%uuid-parsers, %uuid-printers): Add ‘jfs’ file system type. Tobias Geerinckx-Rice
2019-05-07uuid: 'fat-uuid->string' preserves leading zeros....Fixes <https://bugs.gnu.org/35582>. Reported by sirgazil <sirgazil@zoho.com>. Previously, leading zeros would be removed, leading to an "invalid" UUID: (uuid->string (uuid "00CA-050E" 'fat32)) ⇒ "CA-50E" (string->uuid "CA-50E" 'fat32) ⇒ #f * gnu/system/uuid.scm (fat-uuid->string): Pad digits with zeros. * tests/uuid.scm ("uuid, FAT32, leading zeros preserved"): New test. Ludovic Courtès
2018-05-19uuid: 'uuid' returns #f when 'string->uuid' returns #f....* gnu/system/uuid.scm (uuid): When STR is not a literal, return #f when 'string->uuid' returns #f. * tests/uuid.scm ("uuid, dynamic value"): New test. Ludovic Courtès
2017-12-02uuid: Fix typo in comment....* gnu/system/uuid.scm: Fix typo in comment. Ludovic Courtès
2017-10-11uuid: Change "fat32" to "fat"....* gnu/system/uuid.scm (%fat32-endianness): Rename to... (%fat-endianness): ... this. (fat32-uuid->string): Rename to... (fat-uuid->string): ... this. (%fat32-uuid-rx): Rename to.. (%fat-uuid-rx): ... this. (string->fat32-uuid): Rename to... (string->fat-uuid): ... this. (%uuid-parsers, %uuid-printers): Add 'fat16. Ludovic Courtès
2017-10-05uuid: Add 'uuid=?' and use it....* gnu/system/uuid.scm (uuid=?): New procedure. * tests/uuid.scm ("uuid=?"): New test. * gnu/build/file-systems.scm (partition-uuid-predicate) (luks-partition-uuid-predicate): Use it instead of 'bytevector=?'. Ludovic Courtès
2017-09-22uuid: Add a parser for FAT32 UUIDs....* gnu/system/uuid.scm (%fat32-uuid-rx): New variable. (string->fat32-uuid): New procedure. (%uuid-parsers): Add it. * tests/uuid.scm ("uuid, FAT32, format preserved"): New test. Ludovic Courtès
2017-09-11uuid: 'uuid' macro supports more UUID types....* gnu/system/uuid.scm (string->uuid): Turn 'type' into an optional argument. (uuid): Add clauses to allow for an optional 'type' parameter. Ludovic Courtès
2017-09-11system: Introduce a disjoint UUID type....Conceptually a UUID is just a bytevector. However, there's software out there such as GRUB that relies on the string representation of different UUID types (e.g., the string representation of DCE UUIDs differs from that of ISO-9660 UUIDs, even if they are actually bytevectors of the same length). This new <uuid> record type allows us to preserve information about the type of UUID so we can eventually convert it to a string using the right representation. * gnu/system/uuid.scm (<uuid>): New record type. (bytevector->uuid): New procedure. (uuid): Return calls to 'make-uuid'. (uuid->string): Rewrite using 'match-lambda*' to accept a single 'uuid?' argument. * gnu/bootloader/grub.scm (grub-root-search): Check for 'uuid?' instead of 'bytevector?'. * gnu/system.scm (bootable-kernel-arguments): Check whether ROOT-DEVICE is 'uuid?'. (read-boot-parameters): Use 'bytevector->uuid' when the store device is a bytevector. (read-boot-parameters-file): Check for 'uuid?' instead of 'bytevector?'. (device->sexp): New procedure. (operating-system-boot-parameters-file): Use it for 'root-device' and 'store'. (operating-system-bootcfg): Remove conditional in definition of 'root-device'. * gnu/system/file-systems.scm (file-system->spec): Check for 'uuid?' on DEVICE and take its bytevector. * gnu/system/mapped-devices.scm (open-luks-device): Likewise. * gnu/system/vm.scm (iso9660-image): Call 'uuid-bytevector' for the #:volume-uuid argument. Ludovic Courtès
2017-09-11file-systems: Introduce (gnu system uuid)....* gnu/build/file-systems.scm (sub-bytevector) (latin1->string, %fat32-endianness, fat32-uuid->string) (%iso9660-uuid-rx, string->iso9660-uuid) (iso9660-uuid->string, %network-byte-order) (dce-uuid->string, %uuid-rx, string->dce-uuid) (string->ext2-uuid, string->ext3-uuid, string->ext4-uuid) (vhashq, %uuid-parsers, %uuid-printers, string->uuid) (uuid->string): Move to... * gnu/system/uuid.scm: ... here. New file. * gnu/system/file-systems.scm (uuid): Move to the above file. * gnu/system/vm.scm: Adjust accordingly. * gnu/local.mk (GNU_SYSTEM_MODULES): Add uuid.scm. Ludovic Courtès