aboutsummaryrefslogtreecommitdiff
path: root/gnu/system/uuid.scm
Commit message (Collapse)AuthorAge
* uuid: Add support for exFAT.Tobias Geerinckx-Rice2024-09-01
| | | | | | | | | | | | We expect users to use the generic STRING->FAT-UUID procedure. This is consistent with how we already treat FAT32 vs FAT16. It is not consistent with how we export 8 different aliases for STRING->DCE-UUID, but I'm unconvinced that would be better. * gnu/system/uuid.scm (%uuid-parsers, %uuid-printers): Add the ‘exfat’ file system type. Change-Id: Ia31482716e4395f9f10f794f49fb31c9f330a2e3
* uuid: Fix NTFS UUID stringification.Tobias Geerinckx-Rice2023-06-18
| | | | | | | | | | Previously, (ntfs-uuid->string (string->ntfs-uuid"5234ED0D34ECF53F")) would yield "5234EDD34ECF53F". Reported by sughosha in #guix. * gnu/system/uuid.scm (ntfs-uuid->string): Pad hex bytes with zero when needed.
* uuid: Support XFS.Tobias Geerinckx-Rice2021-09-23
| | | | | * gnu/system/uuid.scm (string->xfs-uuid): New procedure. (%uuid-parsers, %uuid-printers): Add ‘xfs’ file system type.
* uuid: Add support for bcachefs.Tobias Geerinckx-Rice2020-11-07
| | | | | * gnu/system/uuid.scm (string->bcachefs-uuid): New exported procedure. (%uuid-parsers, %uuid-printers): Add the ‘bcachefs’ file system type.
* file-systems: Add NTFS support.Mathieu Othacehe2020-07-26
| | | | | | | | | | | | | | * 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.
* uuid: Prevent a loop on invalid arguments.Maxim Cournoyer2020-06-18
| | | | | * gnu/system/uuid.scm (uuid=?): Use type predicates in the fallback case to prevent looping on invalid arguments.
* uuid: Add support for JFS.Tobias Geerinckx-Rice2020-01-03
| | | | | * gnu/system/uuid.scm (string->jfs-uuid): New procedure. (%uuid-parsers, %uuid-printers): Add ‘jfs’ file system type.
* uuid: 'fat-uuid->string' preserves leading zeros.Ludovic Courtès2019-05-07
| | | | | | | | | | | | | | | | 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.
* uuid: 'uuid' returns #f when 'string->uuid' returns #f.Ludovic Courtès2018-05-19
| | | | | | * 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.
* uuid: Fix typo in comment.Ludovic Courtès2017-12-02
| | | | * gnu/system/uuid.scm: Fix typo in comment.
* uuid: Change "fat32" to "fat".Ludovic Courtès2017-10-11
| | | | | | | | | | | | * 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.
* uuid: Add 'uuid=?' and use it.Ludovic Courtès2017-10-05
| | | | | | | * 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=?'.
* uuid: Add a parser for FAT32 UUIDs.Ludovic Courtès2017-09-22
| | | | | | | * 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.
* uuid: 'uuid' macro supports more UUID types.Ludovic Courtès2017-09-11
| | | | | | * gnu/system/uuid.scm (string->uuid): Turn 'type' into an optional argument. (uuid): Add clauses to allow for an optional 'type' parameter.
* system: Introduce a disjoint UUID type.Ludovic Courtès2017-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* file-systems: Introduce (gnu system uuid).Ludovic Courtès2017-09-11
* 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.