Do proper conversion to/from sbt.

Doh! sbttoX and Xtosbt were backwards. While they ran, they produced
bogus results.

Pointy hat to: imp@
This commit is contained in:
Warner Losh 2018-11-15 16:02:24 +00:00
parent 023b87bffa
commit 36173f6976
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=340451

View File

@ -1702,13 +1702,13 @@ sysctl_usec_to_sbintime(SYSCTL_HANDLER_ARGS)
sbintime_t sb;
tt = *(int64_t *)arg1;
sb = ustosbt(tt);
sb = sbttous(tt);
error = sysctl_handle_64(oidp, &sb, 0, req);
if (error || !req->newptr)
return (error);
tt = sbttous(sb);
tt = ustosbt(sb);
*(int64_t *)arg1 = tt;
return (0);
@ -1725,13 +1725,13 @@ sysctl_msec_to_sbintime(SYSCTL_HANDLER_ARGS)
sbintime_t sb;
tt = *(int64_t *)arg1;
sb = mstosbt(tt);
sb = sbttoms(tt);
error = sysctl_handle_64(oidp, &sb, 0, req);
if (error || !req->newptr)
return (error);
tt = sbttoms(sb);
tt = mstosbt(sb);
*(int64_t *)arg1 = tt;
return (0);