Merge branch 'linux-libspl' into refs/top-bases/linux-zfs-branch

This commit is contained in:
Brian Behlendorf 2008-12-19 11:32:33 -08:00
commit b8e10bfc20
3 changed files with 57 additions and 2 deletions

View File

@ -14,7 +14,7 @@ libspl_la_SOURCES = \
${top_srcdir}/lib/libspl/strlcat.c \
${top_srcdir}/lib/libspl/strlcpy.c \
${top_srcdir}/lib/libspl/strnlen.c \
${top_srcdir}/lib/libspl/strtoxx.c \
${top_srcdir}/lib/libspl/sunddi.c \
${top_srcdir}/lib/libspl/u8_textprep.c \
${top_srcdir}/lib/libspl/zone.c \
${top_srcdir}/lib/libspl/include/sys/list.h \

View File

@ -24,11 +24,50 @@
*/
#ifndef _SYS_SUNDDI_H
#define _SYS_SUNDDI_H
#define _SYS_SUNDDI_Ha
#include <sys/types.h>
/*
* Generic Sun DDI definitions.
*/
#define DDI_SUCCESS (0) /* successful return */
#define DDI_FAILURE (-1) /* unsuccessful return */
#define DDI_NOT_WELL_FORMED (-2) /* A dev_info node is not valid */
#define DDI_EAGAIN (-3) /* not enough interrupt resources */
#define DDI_EINVAL (-4) /* invalid request or arguments */
#define DDI_ENOTSUP (-5) /* operation is not supported */
#define DDI_EPENDING (-6) /* operation or an event is pending */
/*
* General-purpose DDI error return value definitions
*/
#define DDI_ENOMEM 1 /* memory not available */
#define DDI_EBUSY 2 /* busy */
#define DDI_ETRANSPORT 3 /* transport down */
#define DDI_ECONTEXT 4 /* context error */
/*
* DDI_DEV_T_NONE: When creating, property is not associated with
* particular dev_t.
* DDI_DEV_T_ANY: Wildcard dev_t when searching properties.
*/
#define DDI_DEV_T_NONE ((dev_t)-1)
#define DDI_DEV_T_ANY ((dev_t)-2)
/*
* Property flags:
*/
#define DDI_PROP_DONTPASS 0x0001 /* Don't pass request to parent */
#define DDI_PROP_CANSLEEP 0x0002 /* Memory allocation may sleep */
extern int ddi_strtoul(const char *, char **, int, unsigned long *);
extern int ddi_strtol(const char *, char **, int, long *);
extern int ddi_strtoull(const char *, char **, int, unsigned long long *);
extern int ddi_strtoll(const char *, char **, int, long long *);
extern int ddi_prop_lookup_string(dev_t, dev_info_t *, uint_t, char *, char **);
extern void ddi_prop_free(void *);
#endif /* _SYS_SUNDDI_H */

View File

@ -83,3 +83,19 @@ ddi_strtoll(const char *str, char **endptr, int base,
return errno;
}
/* FIXME: Unimplemented */
int
ddi_prop_lookup_string(dev_t match_dev, dev_info_t *dip, uint_t flags,
char *name, char **data)
{
*data = NULL;
return ENOSYS;
}
/* FIXME: Unimplemented */
void
ddi_prop_free(void *datap)
{
return;
}