Page MenuHomeFreeBSD

fattime: make the test code build again
ClosedPublic

Authored by jeffpc_josefsipek.net on Apr 12 2024, 2:57 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jun 22, 12:19 PM
Unknown Object (File)
Sun, Jun 22, 8:06 AM
Unknown Object (File)
Sat, Jun 21, 7:00 AM
Unknown Object (File)
Fri, Jun 20, 12:32 PM
Unknown Object (File)
Tue, Jun 17, 1:56 PM
Unknown Object (File)
Wed, May 28, 12:20 PM
Unknown Object (File)
Wed, May 28, 9:21 AM
Unknown Object (File)
May 23 2025, 1:08 AM
Subscribers

Details

Summary

This change...

  1. replaces calls to timet2fattime/fattime2timet with calls to timespec2fattime/fattime2timespec. The functions got renamed shortly after they landed in the kernel but the test code wasn't updated (see 7ea93e912bf0ef).
  2. adds a utc_offset stub.

With this, the test code builds and runs as a 32-bit binary (cc -Wall -O2
-m32 subr_fattime.c).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/kern/subr_fattime.c
301

why 1?

sys/kern/subr_fattime.c
301

I'm not happy with hardcoding 1 like this, but...

  1. the original test code assumed UTC (the subsequent change that renamed the functions (and broke the test) also added the int utc arg) and using 1 keeps the test UTC-based (not that it matters since the stub for utc_offset() always returns 0)
  2. the arg is int, so it seems wrong to use anything other than 0 or 1.
This revision is now accepted and ready to land.Apr 28 2024, 8:48 PM
This revision was automatically updated to reflect the committed changes.
OSZAR »