cvs commit: src/sys/amd64/amd64 tsc.c src/sys/amd64/isa clock.c src/sys/cam cam_xpt.c src/sys/cam/scsi scsi_all.c src/sys/compat/opensolaris/kern opensolaris_kstat.c src/sys/dev/acpica acpi_timer.c src/sys/dev/bge if_bge.c src/sys/dev/sound clone.c ...

John-Mark Gurney gurney_j at resnet.uoregon.edu
Tue Jun 5 05:03:52 UTC 2007


David Malone wrote this message on Mon, Jun 04, 2007 at 18:25 +0000:
>   Log:
>   Despite several examples in the kernel, the third argument of
>   sysctl_handle_int is not sizeof the int type you want to export.
>   The type must always be an int or an unsigned int.
>   
>   Remove the instances where a sizeof(variable) is passed to stop
>   people accidently cut and pasting these examples.
>   
>   In a few places this was sysctl_handle_int was being used on 64 bit
>   types, which would truncate the value to be exported.  In these
>   cases use sysctl_handle_quad to export them and change the format
>   to Q so that sysctl(1) can still print them.

Perhaps documenting SYSCTL_HANDLER_ARGS and the several standard
handlers in sysctl_add_oid(9) would be in order?

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the cvs-all mailing list