From owner-freebsd-current Tue Oct 15 13:17:30 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4179337B401 for ; Tue, 15 Oct 2002 13:17:29 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9E5843EAA for ; Tue, 15 Oct 2002 13:17:27 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id g9FKHOIw038907; Tue, 15 Oct 2002 22:17:24 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Nate Lawson Cc: current@freebsd.org Subject: Re: GEOM/fdisk/USB drive problem In-Reply-To: Your message of "Tue, 15 Oct 2002 12:53:25 PDT." Date: Tue, 15 Oct 2002 22:17:24 +0200 Message-ID: <38906.1034713044@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message , Nate Lawson wri tes: >> I could agree to make g_dev_ioctl fail the ioctl with some errno >> if they came back as zero, but not substituting another value. > >The attached patch makes everything work fine for my drive (64 MB USB >flash). Apart from the choice of EINVAL, this would be OK with me, I would probably say ENOENT instead. EINVAL generally means "you gave a wrong parameter to a syscall", ENOENT is more of a "Looked, found nothing" kind of error. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message