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).
1 files changed, 4 insertions(+), 4 deletions(-) M gnu/system/vm.scm
M gnu/system/vm.scm => gnu/system/vm.scm +4 -4
@@ 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)))