Imported from svn://svn.code.sf.net/p/megactl/code/trunk megactl-code with these modifications:
- Don't build megatrace. The register and ioctl names have changed since then. For running megactl this is not needed.
- Fix compiler warnings.
Imported from svn://svn.code.sf.net/p/megactl/code/trunk megactl-code with these modifications: