From owner-freebsd-bugs Sat Mar 30 23:40:42 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id B88AF37B41F for ; Sat, 30 Mar 2002 23:40:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2V7e1R18166; Sat, 30 Mar 2002 23:40:01 -0800 (PST) (envelope-from gnats) Received: from lists.blarg.net (lists.blarg.net [206.124.128.17]) by hub.freebsd.org (Postfix) with ESMTP id 9355137B419 for ; Sat, 30 Mar 2002 23:37:48 -0800 (PST) Received: from thig.blarg.net (thig.blarg.net [206.124.128.18]) by lists.blarg.net (Postfix) with ESMTP id 52C62BD14 for ; Sat, 30 Mar 2002 23:37:48 -0800 (PST) Received: from localhost.localdomain ([206.124.139.115]) by thig.blarg.net (8.9.3/8.9.3) with ESMTP id XAA10810 for ; Sat, 30 Mar 2002 23:37:48 -0800 Received: (from jojo@localhost) by localhost.localdomain (8.11.6/8.11.3) id g2V7a7n42910; Sat, 30 Mar 2002 23:36:07 -0800 (PST) (envelope-from swear@blarg.net) Message-Id: Date: 30 Mar 2002 23:36:07 -0800 From: "Gary W. Swearingen" Reply-To: swear@blarg.net To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/36564: fdisk(8) program has misplaced NOT_NOW block in write_s0. Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 36564 >Category: bin >Synopsis: fdisk(8) program has misplaced NOT_NOW block in write_s0. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Mar 30 23:40:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Gary W. Swearingen >Release: FreeBSD 4.5-STABLE i386 >Organization: none >Environment: n/a ================ >Description: The fdisk(8) program has a "ifdef NOT_NOW" block in write_s0 which is placed immediately after a "return -1;" statement (while another one is before "return(0)"). It seems highly likely that the block should be moved before the return statement, but I must admit that I have no idea how "NOT_NOW" is used. I'm assuming that the block's code is not now compiled; hence the low priority on the PR. ================ >How-To-Repeat: n/a ================ >Fix: From "$FreeBSD: src/sbin/i386/fdisk/fdisk.c,v 1.36.2.10 2002/01/02 23:12:41 iedowse Exp $" --- /usr/src/sbin/i386/fdisk/fdisk.c Sat Mar 2 15:58:41 2002 +++ /tmp/fdisk.c Sat Mar 30 23:31:00 2002 @@ -826,11 +826,11 @@ if (write_disk(sector, &mboot.bootinst[sector * secsize]) == -1) { warn("can't write fdisk partition table"); - return -1; #ifdef NOT_NOW flag = 0; (void) ioctl(fd, DIOCWLABEL, &flag); #endif + return -1; } #ifdef NOT_NOW flag = 0; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message