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: Marek Kozubal <email@hidden>
- Date: Fri, 2 Jul 2004 12:24:09 -0400 (EDT)
On Thu, 1 Jul 2004, Krishna Monian wrote:
I am trying to write a kernel extension in which I
have to pass a char** to it from a user mode
application.
Currently I have tried passing the pointer as a scalar
and as a struct(wrapped in a struct) to the kext.
However this results in some weird behavior.
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.
HTH
---
Marek Kozubal
email@hidden
_______________________________________________
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.