Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 04 Apr 2026 10:52:23 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@FreeBSD.org>
To:        Rick Macklem <rick.macklem@gmail.com>
Cc:        FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   Re: Getting boottime early in booting
Message-ID:  <86mrzjumyg.fsf@ltc.des.dev>
In-Reply-To: <CAM5tNy4mPmG=OmQtiGrMQ8NnPZrN=dw_Xw1h9=s4iyOLiZCWng@mail.gmail.com> (Rick Macklem's message of "Fri, 3 Apr 2026 18:05:13 -0700")
References:  <CAM5tNy4mPmG=OmQtiGrMQ8NnPZrN=dw_Xw1h9=s4iyOLiZCWng@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

Rick Macklem <rick.macklem@gmail.com> writes:
> 1 - I need a value that will be different each time the machine boots.
>      I would normally use getboottime(), but for the NFS root fs mount,
>      it just returns 0.
>      Any ideas w.r.t. something I can acquire early in booting that will
>      change each time the system is booted?

Just use arc4random(9).

DES
-- 
Dag-Erling Smørgrav - des@FreeBSD.org


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86mrzjumyg.fsf>