From owner-cvs-src@FreeBSD.ORG Sun Jun 18 22:02:23 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 59BB616A474; Sun, 18 Jun 2006 22:02:23 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E2AE43D48; Sun, 18 Jun 2006 22:02:23 +0000 (GMT) (envelope-from simon@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k5IM2N0P068496; Sun, 18 Jun 2006 22:02:23 GMT (envelope-from simon@repoman.freebsd.org) Received: (from simon@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k5IM2NfU068495; Sun, 18 Jun 2006 22:02:23 GMT (envelope-from simon) Message-Id: <200606182202.k5IM2NfU068495@repoman.freebsd.org> From: "Simon L. Nielsen" Date: Sun, 18 Jun 2006 22:02:23 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sbin/fdisk fdisk.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2006 22:02:23 -0000 simon 2006-06-18 22:02:23 UTC FreeBSD src repository Modified files: sbin/fdisk fdisk.c Log: - Fail with an understandable error message if we cannot detect the sector size, instead of later failing with an error about /boot/mbr not being a multiple of the sector size (since we end up with an assumed sector size of MAX_SEC_SIZE * 2). - We query the sector size via an IOCTL anyway, so if that succeeds use that instead of probing for it via read(2) calls. This fixes the problem with fdisk failing to operate on at least graid3 and md(4) devices on kernels with src/sys/geom/geom_dev.c before rev. 1.90, due to fdisk failing to detect the sector size. - When detecting the root device allow "/" characters in it, which happens with e.g. gmirror devices. Reviewed by: cperciva MFC after: 1 week Revision Changes Path 1.82 +5 -2 src/sbin/fdisk/fdisk.c