From owner-freebsd-questions@FreeBSD.ORG Sat Jul 10 08:01:54 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69F131065674 for ; Sat, 10 Jul 2010 08:01:54 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id D432B8FC19 for ; Sat, 10 Jul 2010 08:01:53 +0000 (UTC) X-Spam-Status: No X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-0.2, required 5, autolearn=not spam, ALL_TRUSTED -1.00, BAYES_50 0.80) X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-ID: o6A81atj001740 Received: from kobe.laptop (77.49.123.102.dsl.dyn.forthnet.gr [77.49.123.102]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-9.1) with ESMTP id o6A81atj001740 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 10 Jul 2010 11:01:42 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.4/8.14.4) with ESMTP id o6A81Usj042237 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 10 Jul 2010 11:01:31 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.4/8.14.4/Submit) id o6A81Tp5042135; Sat, 10 Jul 2010 11:01:29 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: Patrick Donnelly References: Date: Sat, 10 Jul 2010 11:01:29 +0300 In-Reply-To: (Patrick Donnelly's message of "Sat, 10 Jul 2010 03:10:31 -0400") Message-ID: <87iq4nsr3a.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: questions@freebsd.org Subject: Re: Writes to Hard Disk Going Beyond Capacity X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jul 2010 08:01:54 -0000 On Sat, 10 Jul 2010 03:10:31 -0400, Patrick Donnelly wrote: > Hi List, > > I have a strange problem in a C program I wrote. I open a hard > disk character file (/dev/ad1) and attempt to write over the > entire disk. I expect the last write that would go beyond the > hard disk length (capacity) to return with an error but instead > the write succeeds. This happens for hundreds of gigabytes > beyond the file (hard drive) length. What could be wrong? (This > program works fine on Linux. The last write that would go > beyond the end of the hard drive returns with -1.) > > Thanks for any help, Can we see the exact source code of the program? What you describe might work if the file has holes inside it.