==== //depot/user/rwatson/netperf/sys/kern/kern_conf.c#3 - /home/robert/p4/rwatson_netperf/sys/kern/kern_conf.c ==== @@ -693,6 +693,16 @@ LIST_HEAD(,cdev) head; }; +void +clone_setup(struct clonedevs **cdp) +{ + struct clonedevs *cd; + + cd = malloc(sizeof *cd, M_DEVBUF, M_WAITOK | M_ZERO); + LIST_INIT(&cd->head); + *cdp = cd; +} + int clone_create(struct clonedevs **cdp, struct cdevsw *csw, int *up, dev_t *dp, u_int extra) { @@ -709,10 +719,11 @@ find_major(csw); /* if clonedevs have not been initialized, we do it here */ cd = *cdp; + /* compatibility for old API, this will go away */ if (cd == NULL) { - cd = malloc(sizeof *cd, M_DEVBUF, M_WAITOK | M_ZERO); - LIST_INIT(&cd->head); - *cdp = cd; + printf("clone_create: old API use\n"); + clone_setup(cdp); + cd = *cdp; } /*