HomeFreeBSD

Assign a random number to di_gen (for FFS), instead of extracting it

Description

Assign a random number to di_gen (for FFS), instead of extracting it
from struct stat. We don't necessarily have permissions to see the
generation number and the host OS may not have st_gen in struct stat
anyway. Since the kernel assigns random numbers, there's nothing
meaningful about the generation that requires us to preserve it when
the file system image is created. With this change, all generation
numbers come from random() and that makes it easier to add support
for reproducible builds at some time in the future (i.e. by adding
an argument to makefs that changes the behaviour of random() so that
it always returns 0 or some predictable sequence).

Differential Revision: https://reviews.freebsd.org/D8418

Details

Provenance
marcelAuthored on
Differential Revision
D8418: Don't use st_gen in struct stat
Parents
rS308343: r266979 missed a call to enable capabilities of the hw leading to an
Branches
Unknown
Tags
Unknown