MCPcopy Create free account
hub / github.com/F-Stack/f-stack / efi_time_sysctl_handler

Function efi_time_sysctl_handler

freebsd/amd64/amd64/efirt_machdep.c:334–351  ·  view source on GitHub ↗

XXX debug stuff */

Source from the content-addressed store, hash-verified

332
333/* XXX debug stuff */
334static int
335efi_time_sysctl_handler(SYSCTL_HANDLER_ARGS)
336{
337 struct efi_tm tm;
338 int error, val;
339
340 val = 0;
341 error = sysctl_handle_int(oidp, &val, 0, req);
342 if (error != 0 || req->newptr == NULL)
343 return (error);
344 error = efi_get_time(&tm);
345 if (error == 0) {
346 uprintf("EFI reports: Year %d Month %d Day %d Hour %d Min %d "
347 "Sec %d\n", tm.tm_year, tm.tm_mon, tm.tm_mday, tm.tm_hour,
348 tm.tm_min, tm.tm_sec);
349 }
350 return (error);
351}
352
353SYSCTL_PROC(_debug, OID_AUTO, efi_time,
354 CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, 0,

Callers

nothing calls this directly

Calls 2

sysctl_handle_intFunction · 0.85
uprintfFunction · 0.85

Tested by

no test coverage detected