From owner-freebsd-geom@FreeBSD.ORG Tue May 27 04:23:33 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 117FB1065671 for ; Tue, 27 May 2008 04:23:33 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (keira.kiwi-computer.com [63.224.10.3]) by mx1.freebsd.org (Postfix) with SMTP id 98AE98FC28 for ; Tue, 27 May 2008 04:23:32 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: (qmail 68586 invoked by uid 2001); 27 May 2008 03:56:50 -0000 Date: Mon, 26 May 2008 22:56:50 -0500 From: "Rick C. Petty" To: Marauder Message-ID: <20080527035650.GA68298@keira.kiwi-computer.com> References: <48357420.5689.0089.0@pi.avalonnetworks.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48357420.5689.0089.0@pi.avalonnetworks.us> User-Agent: Mutt/1.4.2.3i Cc: freebsd-geom@freebsd.org Subject: Re: Unable to write to drive X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd@kiwi-computer.com List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2008 04:23:33 -0000 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