tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Another rump question ...



On Sun, 27 Dec 2015, Taylor R Campbell wrote:

  Date: Sun, 27 Dec 2015 09:26:14 +0800 (PHT)
  From: Paul Goyette <paul%whooppee.com@localhost>

  I'm looking into the failure of /usr/tests/rump/t_modautoload test, and
  I've determined that the failure began after the introduction of the
  MODULAR_DEFAULT_AUTOLOAD parameter.

  I'm trying to figure out how to use sysctlbyname(3) to update the rump
  kernel's value of the parameter.  I can find rump_sys___sysctl() as the
  renamed syscall for sysctl(), but the kern.module.autoload variable
  doesn't have a fixed "mib" path, so I need sysctlbyname() to find it.

  I can't figure out how to get a rump_sysctlbyname() routine (or some
  equivalent) to be included into the test program.  None of the libraries
  in /usr/lib seem to include any relevant symbols for the rump version of
  this routine.

  Any clues on how to do this?

Try something like:

.PATH:	${NETBSDSRCDIR}/lib/libc/gen
SRCS+=		sysctlbyname.c
SRCS+=		sysctlgetmibinfo.c
CPPFLAGS+=	-DRUMP_ACTION

Then just use sysctlbyname as usual.  That's how rump.sysctl works.

Ah, kewl!  Thanks!


+------------------+--------------------------+------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:      |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
+------------------+--------------------------+------------------------+


Home | Main Index | Thread Index | Old Index