fdisk implementation [read this before deciding what to do]

Sascha Wildner saw at online.de
Thu Jan 8 22:33:17 PST 2009

61842.GA93290 at quark.hightek.org>
In-Reply-To: <20090109061842.GA93290 at quark.hightek.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 22
X-Trace: 1231482798 crater_reader.dragonflybsd.org 882
Xref: crater_reader.dragonflybsd.org dragonfly.users:11869

Vincent Stemen schrieb:
> Yes, in the traditional layered Unix approach, this tool was
> specifically designed to be easier to automate and to write interactive
> front ends than the existing tools.  It would probably be easy enough to
> add a simple interactive mode to the tool itself, but I hesitate to do
> that because, as you mentioned, I can do the same thing with a shell
> script, making it easy to tune the interactive behavior and to have
> multiple different interfaces that are as simple or as sophisticated as
> you want.

Yes, but the downside of this is that there are two distinct interfaces, 
one for the tool itself (getopt_long() stuff) and another for the 
interactive mode which is put on top of it with shell scripts.

A better idea IMO is to have a built-in interactive mode and allow for 
feeding those commands to the tool also from a file. In the tool it's 
just a matter of either reading from stdin or from a file.



More information about the Users mailing list