Sanity check the return from the kernel.
We should be getting back as many bytes as we asked for, and we
don't handle shortages at all, so just reject anything that's
not right.
Make the data returned by devinfo harder to overflow.
Rather than using fixed-length strings, pack them into a string table
to return. Also expand the buffer from ~300 charaters to 3k. This should
be enough, even for USB.
This fixes a problem where USB pnp info is truncated on return to
userland.
Update to device enumeration protocol 2
The new protocol from the kernel encodes things as a string table,
extract it into fields. strdup the strings, and free them when we're
done.
Note the need for a new kernel / userland for devinfo to work
This fixes devmatch for usb with long pnp info