From owner-freebsd-hackers Mon Jul 23 17:42:54 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from xfreek.mindriot.net (24-168-212-220.he.cox.rr.com [24.168.212.220]) by hub.freebsd.org (Postfix) with SMTP id 3270D37B401 for ; Mon, 23 Jul 2001 17:42:48 -0700 (PDT) (envelope-from rootx11@xfreek.mindriot.net) Received: (qmail 419 invoked by uid 1001); 23 Jul 2001 19:47:47 -0000 Date: 23 Jul 2001 19:47:46 -0000 Message-ID: <20010723194746.418.qmail@xfreek.mindriot.net> From: rootx11@xfreek.mindriot.net To: freebsd-hackers@freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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