Bug 36563 - fdisk(8) program doesn't honor -t (test) when using -I.
Summary: fdisk(8) program doesn't honor -t (test) when using -I.
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Tom Rhodes
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-31 08:30 UTC by Gary W. Swearingen
Modified: 2002-04-25 22:10 UTC (History)
0 users

See Also:


Attachments
file.diff (412 bytes, patch)
2002-03-31 08:30 UTC, Gary W. Swearingen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!