Unable to write to drive

Marauder marauder at pi.avalonnetworks.us
Tue May 27 16:58:26 UTC 2008


Actually I managed to fix this problem on Friday with the help of Sean Bruno. The problem was the one you described bellow that Read's and writes must be multiple's of 512.

Thank you everybody for your help

Binon

>>> "Rick C. Petty" <rick-freebsd at kiwi-computer.com> 5/26/2008 9:56 PM >>>
On Thu, May 22, 2008 at 01:24:49PM -0600, Marauder wrote:
> 
> I have a problem that is driving me crazy. Hopefully I'm submitting this question to the correct place. 
> 
> My problem is... I have opened the drive /dev/ad0 with open("/dev/ad0", O_WRONLY) and it return's a valid file descriptor. The I attempt to write using the file descriptor returned. The write fails with errno=22 (EINVAL)

What does your write instruction look like?  I don't know if this still
applies, but writes used to fail if not an integer multiple of 512 bytes in
length.

> I have attempted to first open /dev/io with READ/WRITE access to see if that help's. No luck

I believe the io(4) device is used to directly access the I/O ports via the
assembly instructions IN, INS, OUT, OUTS, CLI, and STI.  This device is not
used to gain privs on other devices.

-- Rick C. Petty
_______________________________________________
freebsd-geom at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-geom 
To unsubscribe, send any mail to "freebsd-geom-unsubscribe at freebsd.org"



More information about the freebsd-geom mailing list