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, Nov 10, 10:36 PM
Unknown Object (File)
Oct 6 2024, 10:50 PM
Unknown Object (File)
Oct 2 2024, 6:43 PM
Unknown Object (File)
Oct 2 2024, 6:43 PM
Unknown Object (File)
Oct 2 2024, 6:42 PM
Unknown Object (File)
Oct 2 2024, 5:30 PM
Unknown Object (File)
Sep 30 2024, 5:00 AM
Unknown Object (File)
Sep 19 2024, 8:11 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.