| OS X - Development and Darwin Discussion and questions about development for Mac OS X. |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
|
Guest
Posts: n/a
|
Trying to get my kext to write to a file... does anyone know how to do this? I've discovered I can only use the headers in the Kernel framework, and sys/fcntl.h should be able to open up a file at least, but I can't seem to get it to be recognized by the compiler (I include it and I get an error that open is undeclared, as well as write and close).
This should be entirely possible (but I don't know). I know I can write to the syslog with printf, but this isn't the desired behavior. Thanks for any help. dr_springfield Edit: well, problem not really solved. If anyone know what's wrong with this, please let me know, because it causes kernel panics and I can't figure it out: char pathBuf[]="/my_dir"; struct nameidata *ndp=(struct nameidata*)_MALLOC(sizeof(struct nameidata),M_FREE,M_WAITOK); NDINIT(ndp,CREATE,LOCKLEAF,UIO_USERSPACE,pathBuf,c urrent_proc());error = namei(ndp); printf("namei returns %u\n",error); Last edited by dr_springfield; 09-05-2004 at 08:24 AM. |
| QUOTE Thanks | |
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| 111 Gigabyte temp file. WHooooo-aaat | fleiva83 | OS X - Operating System | 3 | 08-11-2004 03:29 PM |
| HELP! Catalog B-tree error, can't delete a HUGE preference file | markpetrowsky | Running Windows (or anything else) on your Mac | 5 | 03-12-2004 11:39 AM |
| make and CDRecord | plunger | OS X - Development and Darwin | 3 | 12-29-2003 05:49 PM |
All times are GMT -4. The time now is 12:20 AM.
Powered by vBulletin