Re: extfs cleanup



Hello!

> When using mc I've noticed, that extfs' often clutter the screen a lot
> and are generaly not too reliable.

Yes, writing garbage to the screen is a big problem and it has delayed the
release of the next stable version.  I believe the redirection of output
should be done in the extfs code, not in the scripts.  That's something
that can be done more reliably in the code calling those scripts.

Please make sure to use the CVS version or the current snapshot if you are
going to work on extfs.c - there have been very recent changes there.  
You may also want to read the recent archives of this mailing list.

> I decided to look into their shell code, and mostly they are quite
> messy - they don't detect if binaries they use exist in the system,
> they don't provide error handling etc.

Yes, error handling is another serious problem.

> I decided to fix some of them. I'm including new urar and uzoo as an
> attachments. Try it, and tell mi if my work is helpful. If it's worth
> the effort, I can fix the rest of them.

Send the patches, not the whole files.  Explain all changes.

> Some questions to extfs experts:
> 
> 1. Why when I copyin file into the archive copyout is issued as well??
> 
> My debug file:
> 
> /usr/share/mc/extfs/urar copyout /home/alpha/tmp/arch/01jwr10.rar tmp
> /tmp/mc-alpha/extfsq3aUmb
> /usr/share/mc/extfs/urar copyin /home/alpha/tmp/arch/01jwr10.rar tmp
> /tmp/mc-alpha/extfsq3aUmb

I believe the reason is because extfs_open() issues "copyout" even when
the file is opened with O_TRUNC.  This should be easy to fix.  I'm have 
added a FIXME to the source.

> 2. Why 'list' target doesn't support error handling like the rest of
> targets? (I checked, it works as a one-way pipe, but it should be some
> error handling to inform user that, for example, he should install
> unrar to see this file)

You can use stderr for that in the CVS version, just don't write more that
4 kilobytes.

I still don't understand why you think "list" is different from other
commands when is comes to error reporting.

-- 
Regards,
Pavel Roskin




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