Re: Passing a char** to a Kext from user mode
Re: Passing a char** to a Kext from user mode
- Subject: Re: Passing a char** to a Kext from user mode
- From: Krishna Monian <email@hidden>
- Date: Fri, 2 Jul 2004 10:57:18 -0700 (PDT)
Thanks
Changing the char** to a string buffer (char*[])
solved and then using copyinstr solved the problem.
I am curious Aren't GetProperty()/SetProperty() for
only for for modifying registry entries?
--- Marek Kozubal <email@hidden> wrote:
>
On Fri, 2 Jul 2004, Marek Kozubal wrote:
>
>
> Generally, you send a pointer (ie char *) to your
>
kext via some
>
> communications method. Then inside the kernel you
>
use copyinstr()/copyin()
>
> to get the string into the kernel, or
>
copyoutstr()/copyout() to put it back
>
> to user space. You don't use a char **. You have
>
to create a buffer in user
>
> space, then create a buffer in kernel space and
>
copy the data back and forth.
>
>
I just realized, that I should have mentioned this
>
is for kext's that are
>
not IOKit kext's. If you're in IOKit you use
>
GetProperty()/SetProperty()
>
type methods.
>
>
---
>
Marek Kozubal
>
email@hidden
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.