Date: 23 Jul 2001 19:52:19 -0000 From: rootx11@xfreek.mindriot.net To: freebsd-hackers@freebsd.org Message-ID: <20010723195219.315.qmail@xfreek.mindriot.net>
next in thread | raw e-mail | index | archive | help
Hello I am experimenting with kernel modules and am trying to write to a file. This is the syscall function (sorry of my terminology is messed up) static int write_file(struct proc *p, void *arg) { struct write_args *wstructure; struct open_args *ostructure; ostructure->path="/tmp/blehfile"; ostructure->flags = O_CREAT; ostructure->mode = 0; wstructure->fd = open(p, ostructure); wstructure->buf = "Testing\n"; wstructure->nbytes = 8; return write(p, wstructure); } Im not sure why, but that code crashes. Was created with: echo Hi > /tmp/blehfile. Also, is there an official freebsd kernel hackers guide? Kernel programming is very interesting. ;-) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010723195219.315.qmail>