/*
* 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 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
* Copyright 2012 Joyent, Inc. All rights reserved.
*/
#include <regex.h>
#include <devfsadm.h>
#include <stdio.h>
#include <strings.h>
#include <stdlib.h>
#include <limits.h>
#include <ctype.h>
#include <bsm/devalloc.h>
extern int system_labeled;
},
},
{ "mouse", "ddi_mouse", "mouse8042",
},
{ "pseudo", "ddi_pseudo", "ipmi",
},
{ "pseudo", "ddi_pseudo", "smbios",
},
/* floppies share the same class, but not link regex, as hard disks */
},
},
},
},
},
},
},
},
},
},
},
{ "pseudo", "ddi_pseudo", "ucode",
},
{ "pseudo", "ddi_pseudo", "heci",
}
};
typedef enum {
DRIVER_AGPPSEUDO = 0,
typedef struct {
char *driver_name;
int index;
{ "agpgart", DRIVER_AGPPSEUDO },
{ "agptarget", DRIVER_AGPTARGET },
{ "amd64_gart", DRIVER_CPUGART },
/* AGP master device managed by drm driver */
{ "i915", DRIVER_AGPMASTER_DRM_I915 },
{ "radeon", DRIVER_AGPMASTER_DRM_RADEON },
{ "vgatext", DRIVER_AGPMASTER_VGATEXT },
{ NULL, DRIVER_UNKNOWN }
};
},
},
},
{ "disk", "^(diskette|rdiskette)([0-9]*)$",
},
},
},
}
};
/*
* Handles minor node type "ddi_display", in addition to generic processing
* done by display().
*
*/
/* ARGSUSED */
int
{
return (DEVFSADM_CONTINUE);
}
/*
* type=ddi_block:diskette;addr=0,0;minor=c diskette
* type=ddi_block:diskette;addr=0,0;minor=c,raw rdiskette
* type=ddi_block:diskette;addr1=0;minor=c diskette\A2
* type=ddi_block:diskette;addr1=0;minor=c,raw rdiskette\A2
*/
static int
{
int flags = 0;
char *a2;
if (system_labeled)
}
}
if (addr[0] == '0') {
a2++;
flags);
flags);
}
}
}
return (DEVFSADM_CONTINUE);
}
/*
* type=ddi_printer;name=lp;addr=1,3bc lp0
* type=ddi_printer;name=lp;addr=1,378 lp1
* type=ddi_printer;name=lp;addr=1,278 lp2
*/
static int
{
char *buf;
}
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
/*
* type=ddi_serial:mb;minor=a tty00
* type=ddi_serial:mb;minor=b tty01
* type=ddi_serial:mb;minor=c tty02
* type=ddi_serial:mb;minor=d tty03
*/
static int
{
}
return (DEVFSADM_CONTINUE);
}
/*
* type=ddi_serial:dialout,mb;minor=a,cu ttyd0
* type=ddi_serial:dialout,mb;minor=b,cu ttyd1
* type=ddi_serial:dialout,mb;minor=c,cu ttyd2
* type=ddi_serial:dialout,mb;minor=d,cu ttyd3
*/
static int
{
}
return (DEVFSADM_CONTINUE);
}
static int
{
return (DEVFSADM_CONTINUE);
}
static int
{
/*
* Follow convention from other systems, and include an instance#,
* even though there will only be one.
*/
return (DEVFSADM_CONTINUE);
}
static int
{
return (DEVFSADM_CONTINUE);
}
static int
{
char *devfspath;
int i, index;
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
for (i = 0; ; i++) {
break;
}
}
switch (index) {
case DRIVER_AGPPSEUDO:
"agp_process: psdeudo driver name\n");
name = "agpgart";
return (DEVFSADM_CONTINUE);
case DRIVER_AGPTARGET:
"agp_process: target driver name\n");
rules[0] = agptarget_rules[0];
name = "agptarget";
break;
case DRIVER_CPUGART:
"agp_process: cpugart driver name\n");
rules[0] = cpugart_rules[0];
name = "cpugart";
break;
case DRIVER_AGPMASTER_VGATEXT:
"agp_process: agpmaster driver name\n");
rules[0] = agpmaster_rules[0];
name = "agpmaster";
break;
case DRIVER_UNKNOWN:
"agp_process: unknown driver name=%s\n", drv_nm);
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
static int
{
char *devfspath;
MATCH_ALL };
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
return (DEVFSADM_CONTINUE);
}
return (0);
}
/*
*/
static int
{
int unitaddr;
char *c;
return (DEVFSADM_CONTINUE);
errno = 0;
if (errno != 0)
return (DEVFSADM_CONTINUE);
if (unitaddr == 0) {
} else if (unitaddr >= MC_AMD_DEV_OFFSET) {
} else {
}
return (DEVFSADM_CONTINUE);
}
/*
* Creates \M0 devlink for xsvc node
*/
static int
{
char *mn;
return (DEVFSADM_CONTINUE);
return (DEVFSADM_CONTINUE);
return (DEVFSADM_CONTINUE);
}
/*
* Creates \M0 devlink for srn device
*/
static int
{
char *mn;
return (DEVFSADM_CONTINUE);
return (DEVFSADM_CONTINUE);
return (DEVFSADM_CONTINUE);
}
/*
*/
static int
{
return (DEVFSADM_CONTINUE);
}
static int
{
}
return (DEVFSADM_CONTINUE);
}