mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
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
1 changed files with 4 additions and 4 deletions
|
@ -372,13 +372,13 @@ (define* (operating-system-uuid os #:optional (type 'dce))
|
|||
(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 a new issue