/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2015, Joyent, Inc. All rights reserved.
*/
#include <regex.h>
#include <devfsadm.h>
#include <stdio.h>
#include <strings.h>
#include <stdlib.h>
#include <limits.h>
#include <sys/cpuid_drv.h>
{ "pseudo", "ddi_pseudo", "(^sad$)",
},
{ "pseudo", "ddi_pseudo", "zsh",
},
},
},
},
},
},
{ "pseudo", "ddi_pseudo", "(^winlock$)|(^pm$)",
},
{ "pseudo", "ddi_pseudo", "conskbd",
},
{ "pseudo", "ddi_pseudo", "consms",
},
{ "pseudo", "ddi_pseudo", "eventfd",
},
{ "pseudo", "ddi_pseudo", "signalfd",
},
{ "pseudo", "ddi_pseudo", "rsm",
},
{ "pseudo", "ddi_pseudo",
"(^lockstat$)|(^SUNW,rtvc$)|(^vol$)|(^log$)|(^sy$)|"
"(^ksyms$)|(^clone$)|(^tl$)|(^tnf$)|(^kstat$)|(^mdesc$)|(^eeprom$)|"
"(^ptsl$)|(^mm$)|(^wc$)|(^dump$)|(^cn$)|(^svvslo$)|(^ptm$)|"
"(^ptc$)|(^openeepr$)|(^poll$)|(^sysmsg$)|(^random$)|(^trapstat$)|"
"(^cryptoadm$)|(^crypto$)|(^pool$)|(^poolctl$)|(^bl$)|(^kmdb$)|"
"(^sysevent$)|(^kssl$)|(^physmem$)",
},
{ "pseudo", "ddi_pseudo",
"(^ip$)|(^tcp$)|(^udp$)|(^icmp$)|"
"(^ip6$)|(^tcp6$)|(^udp6$)|(^icmp6$)|"
"(^rts$)|(^arp$)|(^ipsecah$)|(^ipsecesp$)|(^keysock$)|(^spdsock$)|"
"(^nca$)|(^rds$)|(^sdp$)|(^ipnet$)|(^dlpistub$)|(^bpf$)",
},
{ "pseudo", "ddi_pseudo", "ipd",
},
{ "pseudo", "ddi_pseudo",
"(^ipf$)|(^ipnat$)|(^ipstate$)|(^ipauth$)|"
"(^ipsync$)|(^ipscan$)|(^iplookup$)",
},
{ "pseudo", "ddi_pseudo", "dld",
},
{ "pseudo", "ddi_pseudo",
"(^kdmouse$)|(^rootprop$)",
},
{ "pseudo", "ddi_pseudo", "timerfd",
},
{ "pseudo", "ddi_pseudo", "tod",
},
{ "pseudo", "ddi_pseudo", "envctrl(two)?",
},
{ "pseudo", "ddi_pseudo", "fcode",
},
},
{ "FC port", "ddi_ctl:devctl", "fp",
},
},
{ "pseudo", "ddi_pseudo", "se",
},
},
{ "pseudo", "ddi_pseudo", "gpio_87317",
},
{ "pseudo", "ddi_pseudo", "sckmdrv",
},
{ "pseudo", "ddi_pseudo", "oplkmdrv",
},
},
{ "pseudo", "ddi_pseudo", "tsalarm",
},
{ "pseudo", "ddi_pseudo", "ntwdt",
},
{ "pseudo", "ddi_pseudo", "daplt",
},
{ "pseudo", "ddi_pseudo", "zcons",
},
},
{ "pseudo", "ddi_pseudo", "glvc",
},
{ "pseudo", "ddi_pseudo", "dm2s",
},
{ "pseudo", "ddi_pseudo", "nsmb",
},
{ "pseudo", "ddi_pseudo", "mem_cache",
},
{ "pseudo", "ddi_pseudo", "fm",
},
{ "pseudo", "ddi_pseudo", "smbsrv",
},
{ "pseudo", "ddi_pseudo", "tpm",
},
};
{ "pseudo", "^profile$",
},
{ "pseudo", "^rsm$",
},
{ "printer", "^printers/[0-9]+$",
},
{ "av", "^av/[0-9]+/(async|isoch)$",
},
{ "pseudo", "^daplt$",
},
ZCONS_SLAVE_NAME ")$",
},
},
},
{ "pseudo", "^pfil$",
},
{ "pseudo", "^tpm$",
},
{ "pseudo", "^sctp|sctp6$",
}
};
/* Rules for gpio devices */
/*
* Handles minor node type "ddi_display".
*
* type=ddi_display fbs/\M0 fb\N0
*/
static int
{
/* create fbs/\M0 primary link */
/* create fb\N0 which links to fbs/\M0 */
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
/*
* Handles minor node type "ddi_parallel".
* type=ddi_parallel;name=mcpp mcpp\N0
*/
static int
{
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
static int
{
char *buf;
char *devfspath;
/* find devices path -- need to free mem */
return (DEVFSADM_CONTINUE);
}
/* find next number to use; buf is an ascii number */
/* free memory */
return (DEVFSADM_CONTINUE);
}
/* free memory */
return (DEVFSADM_CONTINUE);
}
static int
{
return (DEVFSADM_CONTINUE);
}
static int
{
return (DEVFSADM_CONTINUE);
}
/*
* Handles links of the form:
* type=ddi_pseudo;name=xyz \D
*/
static int
{
return (DEVFSADM_CONTINUE);
}
/*
* Handles links of the form:
* type=ddi_pseudo;name=xyz \M0
*/
static int
{
}
}
}
return (DEVFSADM_CONTINUE);
}
/*
*/
static int
{
return (DEVFSADM_CONTINUE);
}
static int
{
return (DEVFSADM_CONTINUE);
}
static int
{
return (DEVFSADM_CONTINUE);
}
static int
{
return (DEVFSADM_CONTINUE);
}
static int
{
char *ptr;
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
/*
* Handles:
* minor node type "ddi_printer".
* rules of the form: type=ddi_printer;name=bpp \M0
*/
static int
{
char *mn;
}
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
/*
* Handles links of the form:
* type=ddi_pseudo;name=se;minor2=hdlc se_hdlc\N0
* type=ddi_pseudo;name=serial;minor2=hdlc se_hdlc\N0
*/
static int
{
char *ptr;
char *mn;
/* minor node should be of the form: "?,hdlc" */
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
static int
{
return (DEVFSADM_CONTINUE);
}
/* build the physical path from the components */
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
/*
*/
static int
{
return (DEVFSADM_CONTINUE);
}
/*
* Handles:
*/
static int
{
char *minor_str;
char *buf;
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
/*
*/
static int
{
return (DEVFSADM_CONTINUE);
}
/*
*/
static int
{
return (DEVFSADM_CONTINUE);
}
static int
{
char *minor_str;
char *zonename;
&zonename) == -1) {
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
/*
*/
static int
{
return (DEVFSADM_CONTINUE);
}
/*
* For device
* /dev/spfma -> /devices/virtual-devices/fma@5:glvc
*/
static int
{
/* Only one fma channel */
}
return (DEVFSADM_CONTINUE);
}
/*
* Handles links of the form:
* type=ddi_pseudo;name=sckmdrv kmdrv\M0
* type=ddi_pseudo;name=oplkmdrv kmdrv\M0
*/
static int
{
return (DEVFSADM_CONTINUE);
}