Home | History | Annotate | Line # | Download | only in kern
compat_stub.c revision 1.1.2.14
      1  1.1.2.14  pgoyette /* $NetBSD: compat_stub.c,v 1.1.2.14 2018/04/03 08:29:44 pgoyette Exp $	*/
      2   1.1.2.1  pgoyette 
      3   1.1.2.1  pgoyette /*-
      4   1.1.2.1  pgoyette  * Copyright (c) 2018 The NetBSD Foundation, Inc.
      5   1.1.2.1  pgoyette  * All rights reserved.
      6   1.1.2.1  pgoyette  *
      7   1.1.2.1  pgoyette  * This code is derived from software contributed to The NetBSD Foundation
      8   1.1.2.1  pgoyette  * by Paul Goyette
      9   1.1.2.1  pgoyette  *
     10   1.1.2.1  pgoyette  * Redistribution and use in source and binary forms, with or without
     11   1.1.2.1  pgoyette  * modification, are permitted provided that the following conditions
     12   1.1.2.1  pgoyette  * are met:
     13   1.1.2.1  pgoyette  * 1. Redistributions of source code must retain the above copyright
     14   1.1.2.1  pgoyette  *    notice, this list of conditions and the following disclaimer.
     15   1.1.2.1  pgoyette  * 2. Redistributions in binary form must reproduce the above copyright
     16   1.1.2.1  pgoyette  *    notice, this list of conditions and the following disclaimer in the
     17   1.1.2.1  pgoyette  *    documentation and/or other materials provided with the distribution.
     18   1.1.2.1  pgoyette  *
     19   1.1.2.1  pgoyette  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     20   1.1.2.1  pgoyette  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     21   1.1.2.1  pgoyette  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     22   1.1.2.1  pgoyette  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     23   1.1.2.1  pgoyette  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     24   1.1.2.1  pgoyette  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     25   1.1.2.1  pgoyette  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     26   1.1.2.1  pgoyette  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     27   1.1.2.1  pgoyette  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     28   1.1.2.1  pgoyette  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     29   1.1.2.1  pgoyette  * POSSIBILITY OF SUCH DAMAGE.
     30   1.1.2.1  pgoyette  */
     31   1.1.2.1  pgoyette 
     32   1.1.2.1  pgoyette #include <sys/cdefs.h>
     33   1.1.2.1  pgoyette 
     34   1.1.2.1  pgoyette #ifdef _KERNEL_OPT
     35   1.1.2.1  pgoyette #include "opt_ntp.h"
     36  1.1.2.11  pgoyette #include "usb.h"
     37   1.1.2.1  pgoyette #endif
     38   1.1.2.1  pgoyette 
     39   1.1.2.1  pgoyette #include <sys/systm.h>
     40   1.1.2.1  pgoyette #include <sys/compat_stub.h>
     41   1.1.2.1  pgoyette 
     42   1.1.2.1  pgoyette /*
     43   1.1.2.1  pgoyette  * Routine vectors for compat_50___sys_ntp_gettime
     44   1.1.2.1  pgoyette  */
     45   1.1.2.1  pgoyette 
     46   1.1.2.1  pgoyette #ifdef NTP
     47   1.1.2.1  pgoyette void (*vec_ntp_gettime)(struct ntptimeval *) = ntp_gettime;
     48   1.1.2.1  pgoyette int (*vec_ntp_timestatus)(void) = ntp_timestatus;
     49   1.1.2.1  pgoyette #else
     50   1.1.2.1  pgoyette void (*vec_ntp_gettime)(struct ntptimeval *) = NULL;
     51   1.1.2.1  pgoyette int (*vec_ntp_timestatus)(void) = NULL;
     52   1.1.2.1  pgoyette #endif
     53   1.1.2.1  pgoyette 
     54   1.1.2.2  pgoyette /*
     55   1.1.2.2  pgoyette  * ccd device compatability ioctl
     56   1.1.2.2  pgoyette  */
     57   1.1.2.5  pgoyette int (*compat_ccd_ioctl_60)(dev_t, u_long, void *, int, struct lwp *,
     58   1.1.2.5  pgoyette     int (*f)(dev_t, u_long, void *, int, struct lwp *)) = (void *)enosys;
     59   1.1.2.2  pgoyette 
     60   1.1.2.2  pgoyette /*
     61   1.1.2.2  pgoyette  * clockctl device compatability ioctl
     62   1.1.2.2  pgoyette  */
     63   1.1.2.5  pgoyette int (*compat_clockctl_ioctl_50)(dev_t, u_long, void *, int, struct lwp *) =
     64   1.1.2.5  pgoyette     (void *)enosys;
     65   1.1.2.2  pgoyette 
     66   1.1.2.3  pgoyette /*
     67   1.1.2.3  pgoyette  * if_sppp device compatability ioctl subroutine
     68   1.1.2.3  pgoyette  */
     69   1.1.2.5  pgoyette int (*sppp_params50)(struct sppp *, u_long, void *) = (void *)enosys;
     70   1.1.2.4  pgoyette 
     71   1.1.2.4  pgoyette /*
     72   1.1.2.4  pgoyette  * cryptodev compatability ioctl
     73   1.1.2.4  pgoyette  */
     74   1.1.2.4  pgoyette int (*ocryptof50_ioctl)(struct file *, u_long, void *) = (void *)enosys;
     75   1.1.2.4  pgoyette 
     76   1.1.2.5  pgoyette /*
     77   1.1.2.5  pgoyette  * raidframe compatability
     78   1.1.2.5  pgoyette  */
     79   1.1.2.5  pgoyette int (*raidframe50_ioctl)(int, int, struct RF_Raid_s *, int, void *,
     80   1.1.2.5  pgoyette     struct RF_Config_s **) = (void *)enosys;
     81   1.1.2.5  pgoyette int (*raidframe80_ioctl)(int, int, struct RF_Raid_s *, int, void *,
     82   1.1.2.5  pgoyette     struct RF_Config_s **) = (void *)enosys;
     83   1.1.2.6  pgoyette 
     84   1.1.2.6  pgoyette /*
     85   1.1.2.6  pgoyette  * puffs compatability
     86   1.1.2.6  pgoyette  */
     87   1.1.2.6  pgoyette int (*puffs50_compat_outgoing)(struct puffs_req *, struct puffs_req **,
     88   1.1.2.6  pgoyette     ssize_t *) = (void *)enosys;
     89   1.1.2.6  pgoyette void (*puffs50_compat_incoming)(struct puffs_req *, struct puffs_req *) =
     90   1.1.2.6  pgoyette     (void *)voidop;
     91   1.1.2.7  pgoyette 
     92   1.1.2.7  pgoyette /*
     93   1.1.2.7  pgoyette  * wsevents compatability
     94   1.1.2.7  pgoyette  */
     95   1.1.2.7  pgoyette int (*wsevent_50_copyout_events)(const struct wscons_event *, int,
     96   1.1.2.7  pgoyette     struct uio *) = (void *)enosys;
     97   1.1.2.8  pgoyette 
     98   1.1.2.8  pgoyette /*
     99   1.1.2.8  pgoyette  * sysmon_power compatability
    100   1.1.2.8  pgoyette  */
    101   1.1.2.8  pgoyette void (*compat_sysmon_power_40)(struct power_event *, struct sysmon_pswitch *,
    102   1.1.2.8  pgoyette     int) = (void *)voidop;
    103   1.1.2.9  pgoyette 
    104   1.1.2.9  pgoyette /*
    105   1.1.2.9  pgoyette  * bio compatability
    106   1.1.2.9  pgoyette  */
    107   1.1.2.9  pgoyette 
    108   1.1.2.9  pgoyette int (*compat_bio_30)(void *, u_long, void *, int(*)(void *, u_long, void *)) =
    109   1.1.2.9  pgoyette     (void *)enosys;
    110  1.1.2.10  pgoyette 
    111  1.1.2.10  pgoyette /*
    112  1.1.2.10  pgoyette  * vnd ioctl compatability
    113  1.1.2.10  pgoyette  */
    114  1.1.2.11  pgoyette int (*compat_vndioctl_30)(u_long, struct lwp *, void *, int, struct vattr *,
    115  1.1.2.11  pgoyette     int (*get)(struct lwp *, void *, int, struct vattr *)) = (void *)enosys;
    116  1.1.2.11  pgoyette 
    117  1.1.2.11  pgoyette /*
    118  1.1.2.11  pgoyette  * usb device_info compatability
    119  1.1.2.11  pgoyette  */
    120  1.1.2.11  pgoyette int (*usbd30_fill_deviceinfo_old)(struct usbd_device *,
    121  1.1.2.11  pgoyette     struct usb_device_info_old *, int) = (void *)enosys;
    122  1.1.2.11  pgoyette 
    123  1.1.2.11  pgoyette int (*usb30_copy_to_old)(struct usb_event *, struct usb_event_old *,
    124  1.1.2.11  pgoyette     struct uio *) = (void *)enosys;
    125  1.1.2.11  pgoyette 
    126  1.1.2.11  pgoyette #if NUSB > 0
    127  1.1.2.11  pgoyette void (*vec_usbd_devinfo_vp)(struct usbd_device *, char *, size_t, char *,
    128  1.1.2.11  pgoyette     size_t, int, int) = usbd_devinfo_vp;
    129  1.1.2.11  pgoyette int (*vec_usbd_printBCD)(char *cp, size_t l, int bcd) = usbd_printBCD;
    130  1.1.2.11  pgoyette 
    131  1.1.2.11  pgoyette #else
    132  1.1.2.11  pgoyette void (*vec_usbd_devinfo_vp)(struct usbd_device *, char *, size_t, char *,
    133  1.1.2.11  pgoyette     size_t, int, int) = NULL;
    134  1.1.2.11  pgoyette int (*vec_usbd_printBCD)(char *cp, size_t l, int bcd) = NULL;
    135  1.1.2.11  pgoyette #endif
    136  1.1.2.11  pgoyette 
    137  1.1.2.12  pgoyette /*
    138  1.1.2.12  pgoyette  * ieee80211 ioctl compatability
    139  1.1.2.12  pgoyette  */
    140  1.1.2.12  pgoyette int (*ieee80211_get_ostats_20)(struct ieee80211_ostats *,
    141  1.1.2.12  pgoyette     struct ieee80211_stats *) = (void *)enosys;
    142  1.1.2.12  pgoyette 
    143  1.1.2.12  pgoyette int (*if43_20_cvtcmd)(int) = (void *)enosys;
    144  1.1.2.12  pgoyette 
    145  1.1.2.13  pgoyette /*
    146  1.1.2.13  pgoyette  * rtsock 14 compatability
    147  1.1.2.13  pgoyette  */
    148  1.1.2.13  pgoyette void (*rtsock14_oifmsg)(struct ifnet *) = (void *)voidop;
    149  1.1.2.13  pgoyette int (*rtsock14_iflist)(struct ifnet *, struct rt_walkarg *,
    150  1.1.2.13  pgoyette     struct rt_addrinfo *, size_t) = (void *)enosys;
    151  1.1.2.14  pgoyette 
    152  1.1.2.14  pgoyette /*
    153  1.1.2.14  pgoyette  * modctl handler for old style OSTAT
    154  1.1.2.14  pgoyette  */
    155  1.1.2.14  pgoyette int (*compat_modstat_80)(int, struct iovec *, void *) = (void *)enosys;
    156