system: vm: Use 2^32 - 1 as hash size.
* gnu/system/vm.scm (operating-system-uuid): Use 2^32 - 1 instead of 2^32 as hash size. On some 32 bit system (ARM for example), 2^32 exceeds hash max size (ULONG_MAX = 2^32 - 1).
This commit is contained in:
parent
dd208b936c
commit
b1a3079347
@ -372,13 +372,13 @@ TYPE (one of 'iso9660 or 'dce). Return a UUID object."
|
||||
(bytevector->uuid
|
||||
(uint-list->bytevector
|
||||
(list (hash file-system-type
|
||||
(expt 2 32))
|
||||
(- (expt 2 32) 1))
|
||||
(hash (operating-system-host-name os)
|
||||
(expt 2 32))
|
||||
(- (expt 2 32) 1))
|
||||
(hash (operating-system-services os)
|
||||
(expt 2 32))
|
||||
(- (expt 2 32) 1))
|
||||
(hash (operating-system-file-systems os)
|
||||
(expt 2 32)))
|
||||
(- (expt 2 32) 1)))
|
||||
(endianness little)
|
||||
4)
|
||||
type)))
|
||||
|
Loading…
Reference in New Issue
Block a user