Date: 30 Mar 2002 23:36:07 -0800 From: "Gary W. Swearingen" <swear@blarg.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/36564: fdisk(8) program has misplaced NOT_NOW block in write_s0. Message-ID: <ix4rixb34o.rix@localhost.localdomain>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ix4rixb34o.rix>
