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

Function sysctl_clock_do_io

freebsd/kern/subr_rtc.c:403–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

401}
402
403static int
404sysctl_clock_do_io(SYSCTL_HANDLER_ARGS)
405{
406 struct timespec ts_discard;
407 int error, value;
408
409 value = 0;
410 error = sysctl_handle_int(oidp, &value, 0, req);
411 if (error != 0 || req->newptr == NULL)
412 return (error);
413
414 switch (value) {
415 case CLOCK_DBG_READ:
416 if (read_clocks(&ts_discard, true) == ENXIO)
417 printf("No registered RTC clocks\n");
418 break;
419 case CLOCK_DBG_WRITE:
420 resettodr();
421 break;
422 default:
423 return (EINVAL);
424 }
425
426 return (0);
427}

Callers

nothing calls this directly

Calls 4

sysctl_handle_intFunction · 0.85
read_clocksFunction · 0.85
printfFunction · 0.70
resettodrFunction · 0.70

Tested by

no test coverage detected