Subject: Re: getting partition "last mounted" data
To: George Georgalis <george@galis.org>
From: Adam Hamsik <haaaad@gmail.com>
List: netbsd-users
Date: 10/31/2007 10:04:30
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Oct,Tuesday 30 2007, at 2:46 PM, George Georgalis wrote:

> On Tue, Oct 30, 2007 at 11:24:54AM +0200, Antti Kantee wrote:
>> On Tue Oct 30 2007 at 04:23:36 +0000, Steven M. Bellovin wrote:
>>> On Mon, 29 Oct 2007 23:03:11 -0400
>>> George Georgalis <george@galis.org> wrote:
>>>
>>>> when I "fsck -f wd1f" part of the output is
>>>> ** Last Mounted on /utf
>>>>
>>>> is there any way to get that last mounted info,
>>>> without doing fsck?
>>>>
>>> dumpfs -s, I believe.
>>
>> file -s will also produce that info.  choose your poison ;)
>
> Thanks, good info. file is nice for quick reference.
> I saw the id field in the dumpfs output and I wanted
> to verify it meant a unique id for the fs.
>
> mkfs.c (netbsd-4)
>         sblock.fs_id[0] = (long)tv.tv_sec;      /* XXXfvdl huh? */
>         sblock.fs_id[1] = arc4random() & INT32_MAX;
>
> rc4random is clear enough, but what is tv.tv_sec?
>

tv is struct timeval tv; and this variable contains actual time data

  175 #ifndef STANDALONE
  176 	gettimeofday(&tv, NULL);
  177 #endif



Regards

Adam.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFHKEUelIxPgX3Go0MRAop0AKCp0cZibsKkLS8JEyCDMuwvKu5cOwCZAQdn
KSri1lOR8vrYq8ijne3lWbw=
=Vxa9
-----END PGP SIGNATURE-----