mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
uuid: Fix NTFS UUID stringification.
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.
This commit is contained in:
parent
2e0228e736
commit
65ed7a61f1
1 changed files with 1 additions and 1 deletions
|
@ -209,7 +209,7 @@ (define-syntax %ntfs-endianness
|
|||
|
||||
(define (ntfs-uuid->string uuid)
|
||||
"Convert NTFS UUID, a 8-byte bytevector, to its string representation."
|
||||
(format #f "~{~:@(~x~)~}" (reverse (bytevector->u8-list uuid))))
|
||||
(format #f "~{~:@(~2,'0x~)~}" (reverse (bytevector->u8-list uuid))))
|
||||
|
||||
(define %ntfs-uuid-rx
|
||||
(make-regexp "^([[:xdigit:]]{16})$"))
|
||||
|
|
Loading…
Reference in a new issue