[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Fwd: Re: Status for reiser support in d-i]



On Tue, 2003-08-26 at 12:54, Sven Luther wrote:
> On Tue, Aug 26, 2003 at 12:44:48PM +0400, Yury Umanets wrote:
> > On Tue, 2003-08-26 at 12:40, Sven Luther wrote:
> > > On Tue, Aug 26, 2003 at 12:04:06PM +0400, Yury Umanets wrote:
> > > > > > > but there should be no problem at least to use
> > > > > > > parted standalone in place of cfdisk. 
> > > > > > 
> > > > > > > But then, parted is less user
> > > > > > > friendly than cfdisk.
> > > > > > This is disputable question actually :) Some people like prated much
> > > > > > more then cfdisk.
> > > > > 
> > > > > Well, sure, but as it will be used for the end user, a cfdisk like
> > > > > thingy would be better suited.
> > > > okay, probably cfdisk's interface is liked more by end users. But this
> > > > mean, that somebody should improve parted interface (ncurses, etc) :)
> > > 
> > > I think there is something really wrong with parted.
> > 
> > It is good, that Andrew Clause did not hear what you said :)
> 
> Well, it is not all that bad, just that (in my opinion) more could be
> moved to libparted.
> 
> > >  It should contain
> > > only the interface stuff, and let the real code sit in libparted,
> > actually it is exactly what you said. 
> > 
> > Parted itself contains commands handling, readline callbacks, list
> > implementation, etc.
> 

> Sure, and the rescue code for example is almost 200 lines long, code
> which will have to be duplicated in every partitioning application using
> libparted.

It is probably less than 200. Also, some of them is really front end
specific. For instance, exception handler. Parted uses readline for, but
some GUI program should use something like the following:

int my_parted_gtk_gui_default_exception_handler(ped_exception_t *ex) {
	int res = my_gtk_disalog_box(ex->type, ex->message);

	if (res == MB_OK) {
		/* do something*/
	} else {
		/* do yet another something :)*/
	}
}

Also, parted contains lots of code for output of guessed partitions, fs
types, etc to terminal. This code is also front end specific. For
instance a GTK front end will use gtk_list_view for this.

> 
> > >  but
> > > this is not the case. There is some code in parted, which if doing
> > > another interface, will need to be rewritten or separated.
> > 
> > parted is a front end first of all which uses libparted. Anybody is able
> > to implement another front end based on libparted.
> 
> Yes, rewriting much of the code you have in parted.
> 
> > But when I said, about improving parted interface, I meant, that
> > somebody should write a patch exactly to making parted to use ncurses or
> > something like this. I've not meant to write another front end. Actually
> > there is one called qtparted.
> 
> Yes i understood that, but parted is more than a front end, it contains
> code to do stuff, which could somewhat be moved into libparted to not be
> duplicated everywhere. Not much code, but still.

Okay Sven, can you point me that code, that should be moved from parted to libparted 
in your opinion. Probably I will agree with you. At least we will talk about something 
real :)

Regards.




Reply to: