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.master
parent
2e0228e736
commit
65ed7a61f1
|
@ -209,7 +209,7 @@ ISO9660 UUID representation."
|
|||
|
||||
(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})$"))
|
||||
|
|
Reference in New Issue