From owner-freebsd-hackers Mon Jan 26 21:43:09 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA11974 for hackers-outgoing; Mon, 26 Jan 1998 21:43:09 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from word.smith.net.au (vh1.gsoft.com.au [203.38.152.122]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA11963 for ; Mon, 26 Jan 1998 21:42:59 -0800 (PST) (envelope-from mike@word.smith.net.au) Received: from word (localhost [127.0.0.1]) by word.smith.net.au (8.8.8/8.8.5) with ESMTP id QAA01668; Tue, 27 Jan 1998 16:05:30 +1030 (CST) Message-Id: <199801270535.QAA01668@word.smith.net.au> X-Mailer: exmh version 2.0zeta 7/24/97 To: joelh@gnu.org cc: mike@smith.net.au, dag-erli@ifi.uio.no, hackers@FreeBSD.ORG Subject: Re: File I/O in kernel land (was: Re: 2nd warning: 2.2.6 BETA begins in 10 days!) In-reply-to: Your message of "Mon, 26 Jan 1998 23:31:59 MDT." <199801270531.XAA04181@detlev.UUCP> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 27 Jan 1998 16:05:30 +1030 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk > > >> With that in mind, I have a "bouncing logo" screen saver lkm (think > >> daemon_saver_mod crossed with splashkit) I'd like to submit. However, > >> I'd like to have the logo as a separate file rather than compile it > >> into the lkm, but I haven't had much luck finding out how to do file > >> I/O in kernel land. Could somebody give me a hint before i go berserk > >> and read the entire kernel source to find out? :) > > It's extremely tedious. You'd be better off adding an ioctl hook to > > the screensaver module and adding an extra console ioctl to pass > > commands to the screensaver. > > I must be missing something here. What would be sending the commands, > so that he gets the logo file? Whatever he was planning to use to send the filename to the saver so that it can find it in the first place. In my current dlopen() mania, I would be inclined to add some extra functions to the saver module such that you could hook it into vidcontrol and have it talk to itself. ie. after you load "bitmap_saver.o" into the kernel, you'd run something like: # vidcontrol -x bitmap "add 10 image.gif" which would load the bitmap_saver object into vidcontrol, look for the saver_ioctl_call function and pass it the command string. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\