Bug 36563

Summary: fdisk(8) program doesn't honor -t (test) when using -I.
Product: Documentation Reporter: Gary W. Swearingen <swear>
Component: Books & ArticlesAssignee: Tom Rhodes <trhodes>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Gary W. Swearingen 2002-03-31 08:30:01 UTC
The fdisk(8) program's man page says it doesn't write the partition
table when the -t option is used, but it does do so if the -I option is
also used, or at least that seems clear to me from the -I code in the
"main" function in "/usr/src/sbin/i386/fdisk/fdisk.c" and following the
functions calls to write_s0 and write_disk which don't use the "t_flag"
to protect against writing the partition table.

(The .../pc98/... version doesn't have a -I option.)
================

Fix: (untested)
How-To-Repeat: If you have a free disk that can have all it's data destroyed,
you could try "fdisk -I -t <disk-to-wipe-out>".
================
Comment 1 Tom Rhodes freebsd_committer freebsd_triage 2002-04-16 22:23:03 UTC
State Changed
From-To: open->analyzed

A talk with bde has started a reaction which will lead to the closing of 
all current fdisk(8) PR's. 


Comment 2 Tom Rhodes freebsd_committer freebsd_triage 2002-04-16 22:23:03 UTC
Responsible Changed
From-To: freebsd-doc->trhodes

A talk with bde has started a reaction which will lead to the closing of 
all current fdisk(8) PR's.
Comment 3 Tom Rhodes freebsd_committer freebsd_triage 2002-04-18 17:28:08 UTC
State Changed
From-To: analyzed->patched

I have applied a different patch to CURRENT which fixes the problem.  Thanks 
for the submission!
Comment 4 Tom Rhodes freebsd_committer freebsd_triage 2002-04-25 22:09:35 UTC
State Changed
From-To: patched->closed

A slightly different patch committed to current and stable, one that 
conformed more towards style(9).  Thanks alot for pointing this out!