From owner-freebsd-questions@FreeBSD.ORG Sat Jul 10 07:33:47 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 6BF9A1065672 for ; Sat, 10 Jul 2010 07:33:47 +0000 (UTC) (envelope-from batrick@batbytes.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 436628FC15 for ; Sat, 10 Jul 2010 07:33:47 +0000 (UTC) Received: by iwn35 with SMTP id 35so3730431iwn.13 for ; Sat, 10 Jul 2010 00:33:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.149.140 with SMTP id t12mr8410598ibv.100.1278745831582; Sat, 10 Jul 2010 00:10:31 -0700 (PDT) Received: by 10.231.172.20 with HTTP; Sat, 10 Jul 2010 00:10:31 -0700 (PDT) Date: Sat, 10 Jul 2010 03:10:31 -0400 Message-ID: From: Patrick Donnelly To: questions@freebsd.org Content-Type: text/plain; charset=UTF-8 Cc: Subject: 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 07:33:47 -0000 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, -- - Patrick Donnelly