Re: reading a file in the kernel
Re: reading a file in the kernel
- Subject: Re: reading a file in the kernel
- From: "Jeffrey D. Chung" <email@hidden>
- Date: Wed, 11 Dec 2002 11:39:13 -0800
If you must absolutely read a file from the kernel... the easiest thing to
do is to have a userland application open the file and pass the file
descriptor into the kernel... Then use the regular kernel reads and writes.
I believe the vn driver is a good place to copy code from.
Jeffrey
----- Original Message -----
From: "Eric Long" <email@hidden>
To: "Michael George" <email@hidden>; "Darwin Kernel"
<email@hidden>; <email@hidden>
Sent: Wednesday, December 11, 2002 11:22 AM
Subject: Re: reading a file in the kernel
>
> Looking into the archives, it seems that it is a bad idea to read a
>
> file from the filesystem from inside the kernel. However, I couldn't
>
> find anywhere that it's not possible.
>
>
In my kext, DTS told me not to do file I/O. I was told to use a log-in
app
>
to read configuration settings and pass them to the kext.
>
>
> The communication between a Kext and an application process involves the
>
> implementation of a UserClient.
>
>
<
http://developer.apple.com/samplecode/Sample_Code/Devices_and_Hardware/IOKi
t/
>
> SimpleUserClient.htm>
>
>
>
Eric Long
>
>
___________________________________________________________________________
>
Macintosh Software Engineer
>
>
Aladdin Systems, Inc. http://www.aladdinsys.com
>
245 Westridge Drive, Watsonville, CA 95076 (831) 761-6200 x628
>
_______________________________________________
>
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.
_______________________________________________
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.