Unix Technical Forum

Re: fdisk quit/abort/exit

This is a discussion on Re: fdisk quit/abort/exit within the lucky.openbsd.tech forums, part of the OpenBSD category; --> On 4/17/06, Nick Guenther <kousue@gmail.com> wrote: > fdisk has 3 full ways to exit interactive mode: exit, quit and ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > lucky.openbsd.tech

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-22-2008, 01:21 PM
Jeff Quast
 
Posts: n/a
Default Re: fdisk quit/abort/exit

On 4/17/06, Nick Guenther <kousue@gmail.com> wrote:
> fdisk has 3 full ways to exit interactive mode: exit, quit and abort.
> I always confuse the first two and the only difference between the
> second is that one quits completely, and the other just steps out a
> level when editing extended partitions (which I've never had much need
> for, and it seems somewhat depraved to have more than 1 level of
> extended partitions anyway).
>
> So my question is: is a concious reason why there are 3 distinct
> commands? I think it would be better to have something like "quit",
> which prompts "Do you want to write MBR? [yes|no|cancel]" unless you
> give it "y" to force it to write, "n" to not write, "f" to force it to
> write all MBRs back down all levels currently selected, or "a" to
> abort, discarding all changes.
> so:
> quit -> quit y
> exit -> quit n
> repeated quits -> quit f
> abort -> quit a
> for "->" = "becomes"
>
> This makes it difficult to mess up a MBR if you aren't careful (or is
> that part of the design?), and is only 2 characters more typing if you
> insist on speeding through fdisk. If there's no objection, I'll go
> ahead and make a diff and submit it for review.
>
> -Nick


Would this break existing scripts that use fdisk? such as:

fdisk -c $cylinders -h $trackscylinder -s $sectorstrack -f
$srcdir/usr/mdec/mbr -e $disk << __EOC >/dev/null
reinit
update
write
quit
__EOC

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:24 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com