Opening and wriiting to file in Kern

2005-02-06 Thread Ashwin Chandra
Does anyone know the correct calls to open a file, write to it, and close it, IN *kernel* mode. Ash ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL

Re: Opening and wriiting to file in Kern

2005-02-06 Thread Scott Long
Ashwin Chandra wrote: Does anyone know the correct calls to open a file, write to it, and close it, IN *kernel* mode. Ash There is no common API for doing this, which is pretty much on purpose. First, you need to ask yourself why your task needs it done in the kernel and not in userland. If

Re: Opening and wriiting to file in Kern

2005-02-06 Thread Kamal R. Prasad
--- Scott Long [EMAIL PROTECTED] wrote: Ashwin Chandra wrote: Does anyone know the correct calls to open a file, write to it, and close it, IN *kernel* mode. Ash There is no common API for doing this, which is pretty much on purpose. First, you need to ask yourself why your

Re: Opening and wriiting to file in Kern

2005-02-06 Thread Peter Pentchev
On Sun, Feb 06, 2005 at 04:22:41AM -0800, Kamal R. Prasad wrote: --- Scott Long [EMAIL PROTECTED] wrote: Ashwin Chandra wrote: Does anyone know the correct calls to open a file, write to it, and close it, IN *kernel* mode. Ash There is no common API for doing this,

Re: falloc()

2005-02-06 Thread Robert Watson
On Sat, 5 Feb 2005, Yan Yu wrote: I am wondering if there is a way to use kernel loadable module to replace the original falloc() (kern/kern_descrip.c) in the system. I know how to do this if the funciton to be replaced is some system call function or ufs* operatio ( i could just change

Re: Opening and wriiting to file in Kern

2005-02-06 Thread Robert Watson
On Sun, 6 Feb 2005, Ashwin Chandra wrote: Does anyone know the correct calls to open a file, write to it, and close it, IN *kernel* mode. I fyou want to be file system independent, you can currently do it using two different currently available kernel abstractions: - VFS interface. Using

any way to reset errno?

2005-02-06 Thread Daniel Molina Wegener
Hello, Any way to reset errno? Thanks... Regards. -- . 0 . | Daniel Molina Wegener . . 0 | dmw at trauco dot cl 0 0 0 | http://trauco.cl/ ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers

Re: Opening and wriiting to file in Kern

2005-02-06 Thread Kamal R. Prasad
--- Peter Pentchev [EMAIL PROTECTED] wrote: On Sun, Feb 06, 2005 at 04:22:41AM -0800, Kamal R. Prasad wrote: --- Scott Long [EMAIL PROTECTED] wrote: Ashwin Chandra wrote: [snip] facility. I don't see anything wrong with providing a stream (like) interface to the filesystem.

Re: any way to reset errno?

2005-02-06 Thread Frode Nordahl
On Feb 6, 2005, at 14:21, Daniel Molina Wegener wrote: Hello, Any way to reset errno? errno = 0; :-) Regards, Frode Nordahl Thanks... Regards. -- . 0 . | Daniel Molina Wegener . . 0 | dmw at trauco dot cl 0 0 0 | http://trauco.cl/ ___

Re: RFC: backporting GEOM to the 4.x branch

2005-02-06 Thread ALeine
[EMAIL PROTECTED] wrote: What you may want to do is create a character device driver that resembles the md(4)/vn(4) mechanism: it consumes another file or device, forwards I/O from its own device node to the underlying device after performing the transformation. If possible, you'd want to

GPIB: (very) basic ibfoo() library support

2005-02-06 Thread Poul-Henning Kamp
I needed to get some data out from some of my measurement equipment for some $work and the hacked up userland /dev/io code I have used for some time just didn't cut it. So now we have the skeleton of ibfoo() support in FreeBSD. We only support PCIIA compatible adapters, and only a very small

i86 install images

2005-02-06 Thread Chuck Robey
I need someone to verify for me, the disc1 image on the main (ftp.freebsd.org) website image, I have downloaded it 3 times now, and it keeps on reporting to me, when I try to burn it, that it's the miniinst image. I'm capable of missing something obvious, so I am asking someone (anyone) else to

Re: i86 install images

2005-02-06 Thread Scott Long
Chuck Robey wrote: I need someone to verify for me, the disc1 image on the main (ftp.freebsd.org) website image, I have downloaded it 3 times now, and it keeps on reporting to me, when I try to burn it, that it's the miniinst image. I'm capable of missing something obvious, so I am asking someone

Re: i86 install images

2005-02-06 Thread Dag-Erling Smørgrav
Chuck Robey [EMAIL PROTECTED] writes: One item that always irks me, what's the actual name of the disk images. There is a reticence to answer this on the website, cause they're trying to make one answer do correct duty for all the arches, but what they've accomplished is managing to completely

Re: Sharing memory between ithread and userland

2005-02-06 Thread M. Warner Losh
Have you marked the dev_status struct volatile so that the compiler is forced to re-fetch from memory the values? The example you provided didn't have this... Warner ___ freebsd-hackers@freebsd.org mailing list

Re: any way to reset errno?

2005-02-06 Thread M. Warner Losh
In message: [EMAIL PROTECTED] Daniel Molina Wegener [EMAIL PROTECTED] writes: :Any way to reset errno? errno = 0; Routines that return an error status in errno generally don't set it to 0 to mean no error. Warner ___

Re: [Hackers] Re: any way to reset errno?

2005-02-06 Thread Julian Cowley
M. Warner Losh wrote: In message: [EMAIL PROTECTED] Daniel Molina Wegener [EMAIL PROTECTED] writes: :Any way to reset errno? errno = 0; Routines that return an error status in errno generally don't set it to 0 to mean no error. Which implies errno should never need to be set to

Re: i86 install images

2005-02-06 Thread Chuck Robey
On Sun, 6 Feb 2005, Scott Long wrote: Chuck Robey wrote: I need someone to verify for me, the disc1 image on the main (ftp.freebsd.org) website image, I have downloaded it 3 times now, and it keeps on reporting to me, when I try to burn it, that it's the miniinst image. I'm capable of

Re: [Hackers] Re: any way to reset errno?

2005-02-06 Thread M. Warner Losh
In message: [EMAIL PROTECTED] Julian Cowley [EMAIL PROTECTED] writes: : M. Warner Losh wrote: : In message: [EMAIL PROTECTED] : Daniel Molina Wegener [EMAIL PROTECTED] writes: : :Any way to reset errno? : : errno = 0; : : Routines that return an error status in

Re: Question: tracking filesystem changes?

2005-02-06 Thread Nick Strebkov
Hi, No, won't do the trick either. I cannot afford setting up watchdogs for every file or even every directory. And I'm essentially interested in every one of them (for mirroring purposes). A more general approach is needed. E.g., if an unlink call is issued and an inode is within a

Re: i86 install images

2005-02-06 Thread Ryan Sommers
Chuck Robey wrote: Anyhow, I do my downloading using my Mac machine, and it's reporting the, say for the disc1, it's miniinst and for disc2, it's reporting LiveFS. I know it's not important what label's on the disc, as long as it's not part of the install, but having the names not only being

Re: Question: tracking filesystem changes?

2005-02-06 Thread Robert Watson
On Mon, 7 Feb 2005, Nick Strebkov wrote: The TrustedBSD Audit code should be able to fill this need -- the goal of the Audit code is to be able to track security critical events in a configurable way, so file open/link/symlink/unlink operations are an important subset of that. We hope

ATA_IDENTIFY timed out on ASUS P4VP-MX

2005-02-06 Thread Luiz Otavio Souza
Recently one of my clients get a new (very cheap) P4VP-MX wich uses a VIA VT8235 Southbridge. This machine is not detecting (identify) ATA disk under 5.3. I have tested with 5.3-STABLE and 5.3-RELEASE, with 4.X it works. I tried with different disks and with CDROM, but nothing works. The same

Re: Opening and wriiting to file in Kern

2005-02-06 Thread Joseph Koshy
If you mist do this, the general set of steps are: 1. use namei() to convert a pathname to a vnode 2. Use vn_open(), vn_rdwr(), and vn_close() to operate on the vnode. 3. Observe proper vnode locking and reference counting with vref(), vn_lock(), and vput() Take a look at

Opening files in Kernel Mode: help

2005-02-06 Thread Ashwin Chandra
So this is the code I got from help from you hackers out there and templates in the /kern library. This compiles but causes a kernel panic. I was wondering if any of you knew why this was happening and if I am calling all the virtual node functions correctly? ***CODE

Re: Question: tracking filesystem changes?

2005-02-06 Thread A G Keahan
No, won't do the trick either. I cannot afford setting up watchdogs for every file or even every directory. And I'm essentially interested in every one of them (for mirroring purposes). A more general approach is needed. E.g., if an unlink call is issued and an inode is within a

Re: ATA_IDENTIFY timed out on ASUS P4VP-MX

2005-02-06 Thread Søren Schmidt
Luiz Otavio Souza wrote: Recently one of my clients get a new (very cheap) P4VP-MX wich uses a VIA VT8235 Southbridge. This machine is not detecting (identify) ATA disk under 5.3. I have tested with 5.3-STABLE and 5.3-RELEASE, with 4.X it works. I tried with different disks and with CDROM, but

Re: i86 install images

2005-02-06 Thread Wilko Bulte
On Sun, Feb 06, 2005 at 01:50:34PM -0700, Scott Long wrote.. Chuck Robey wrote: I need someone to verify for me, the disc1 image on the main (ftp.freebsd.org) website image, I have downloaded it 3 times now, and it keeps on reporting to me, when I try to burn it, that it's the miniinst image.