[rtems-libbsd commit] route command: Clean up kernal symbol accesses
Chris Johns
chrisj at rtems.org
Wed Oct 24 01:30:28 UTC 2012
Joel Sherrill wrote:
> diff --git a/freebsd-userspace/commands/usr.bin/netstat/netstat.h b/freebsd-userspace/commands/usr.bin/netstat/netstat.h
> index 7594464..2c40156 100644
> --- a/freebsd-userspace/commands/usr.bin/netstat/netstat.h
> +++ b/freebsd-userspace/commands/usr.bin/netstat/netstat.h
> @@ -35,6 +35,10 @@
> */
>
> #include<sys/cdefs.h>
> +#ifdef __rtems__
> +#define __BSD_VISIBLE 1
> +#include<freebsd/sys/types.h>
> +#endif
Is there a better way to add this type of hack ?
> +#ifdef __rtems__
> +#define kread(_x, _y, _z) (0)
> +#else
> int kread(u_long addr, void *buf, size_t size);
> +#endif
I would prefer to see kvm implemented as RTEMS specific C code for the
calls rather than macros. I also think you will need to have something
in the kread that does a memcpy from the address to the buffer than just 0.
Chris
More information about the devel
mailing list