On Mon, 9 Aug 2010, Matthew Mondor wrote:
On Sun, 8 Aug 2010 17:23:23 -0700 (PDT)
Paul Goyette <p...@whooppee.com> wrote:
Should these be changed? Are there any adverse effects from having a
wmesg longer than 8 characters?
It seems to me that the exporter of those use strncpy() (i.e.
kern/init_sysctl.c) and that the structures use WMESGLEN and
KI_WMESGLEN both defined as 8. So other than inadvertently truncated
names it at least should not cause corruption, but I think that
truncated names could also be problematic when trying to distinguish
two strings starting with the same 8 characters (is that likely now)?
Especially when the only thing that differs between two states is some
suffix like "rd" and "rw"... After all, those are intended for
humans :)
Does anyone object to my going through and coming up with shorter names
(<= 8 chars) for these condvars?
I'll leave changing the exporters from strncpy() to strlcpy() for
another day.
-------------------------------------------------------------------------
| Paul Goyette | PGP Key fingerprint: | E-mail addresses: |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer | | pgoyette at netbsd.org |
-------------------------------------------------------------------------