extern int ddi_strtoull(const char *, char **, int, unsigned long long *);
extern int ddi_strtoll(const char *, char **, int, long long *);
+extern int ddi_copyin(const void *from, void *to, size_t len, int flags);
+extern int ddi_copyout(const void *from, void *to, size_t len, int flags);
+
static __inline__ void ddi_report_dev(dev_info_t *d) { }
static __inline__ void ddi_prop_remove_all(dev_info_t *dip) { }
#include <sys/proc.h>
#include <sys/kstat.h>
#include <sys/utsname.h>
+#include <sys/file.h>
#include <linux/kmod.h>
#ifdef DEBUG_SUBSYSTEM
EXPORT_SYMBOL(ddi_strtoll);
EXPORT_SYMBOL(ddi_strtoull);
+int
+ddi_copyin(const void *from, void *to, size_t len, int flags)
+{
+ /* Fake ioctl() issued by kernel, 'from' is a kernel address */
+ if (flags & FKIOCTL) {
+ memcpy(to, from, len);
+ return 0;
+ }
+
+ return copyin(from, to, len);
+}
+EXPORT_SYMBOL(ddi_copyin);
+
+int
+ddi_copyout(const void *from, void *to, size_t len, int flags)
+{
+ /* Fake ioctl() issued by kernel, 'from' is a kernel address */
+ if (flags & FKIOCTL) {
+ memcpy(to, from, len);
+ return 0;
+ }
+
+ return copyout(from, to, len);
+}
+EXPORT_SYMBOL(ddi_copyout);
+
struct new_utsname *__utsname(void)
{
#ifdef HAVE_INIT_UTSNAME