libcdio-devel
[Top][All Lists]
Advanced

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

Re: [Libcdio-devel] Re: Submission of new mmc function for libcdio


From: Rocky Bernstein
Subject: Re: [Libcdio-devel] Re: Submission of new mmc function for libcdio
Date: Fri, 29 Jan 2010 03:54:20 -0500

An additional error status parameter has been added to mmc_get_disc_erasable
and is now committed in git.

Again, if folks want to suggest other improvements which perhaps will be
discovered with more use, that's fine too.

On Fri, Jan 29, 2010 at 2:24 AM, Thomas Schmitt <address@hidden> wrote:

> Hi,
>
> > There should be an additional parameter
> > which is basically a driver_return_code_t that indicates whether the
> answer
> > is valid or not, and if not gives some idea of what went wrong.
>
> Good idea.
>
> > The caller
> > of this can also query SCSI sense data if this "valid" parameter says
> > something went wrong.
>
> There is a little problem with obtaining sense
> reply in higher function levels:
>
> The caller of mmc_get_disc_erasable() would have
> to make the assumption that the function
> performed only a single MMC command resp. that
> the failed command was the last command
> performed in that function.
>
> This would hamper to implement complex MMC
> gestures inside mmc_get_disc_erasable().
>
> So if the sense reply is of meaning for
> callers of callers of mmc_run_cmd(), then the
> immediate caller of mmc_run_cmd() has to take
> care of the sense reply.
>
>
> Further: the sense is really meaningful only if
> one knows from what MMC command it stems.
>
> So i advise to convert the sense reply into a
> libcdio error reply already inside the function
> that directly calls mmc_run_cmd().
>
>
> I admit mmc_get_disc_erasable() is not much of
> a candidate for complexity. But in the general
> case one should try to achieve good encapsulation
> of the function entrails.
>
>
> Have a nice day :)
>
> Thomas
>
>
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]