New #mtools extfs?
- From: Standa Opichal <opichals seznam cz>
- To: Pavel Roskin <proski gnu org>
- Cc: mc-devel gnome org
- Subject: New #mtools extfs?
- Date: Tue, 3 Dec 2002 15:42:59 +0100 (CET)
Hi Pavel!
I've played with it...
As I've already sent... the 'in archive path' is not sent to the script
handling the particular filesystem type....
I found faster to remove the archive existence check (there is no need
for it. In fact the extfs script does this also for sure if it really
needs the archive) from the extfs.c:217 (CVS). There might also be a check
for the filesystem name if desired (like: if the fsname == 'mtools' then
go on).
======================================================
diff -u -r1.56 extfs.c
--- extfs.c 1 Dec 2002 20:35:16 -0000 1.56
+++ extfs.c 3 Dec 2002 14:36:56 -0000
@@ -214,7 +214,7 @@
if (uses_archive){
if (mc_stat (name, &mystat) == -1)
- return NULL;
+ ;
======================================================
I also patched the vfc.c so that now it works like this: "X: ->
/X#mtools". The only changes in the C code is the mentioned check and
modified vfs_translate_url() as you suggested. The script needed some
more changes since the archive argument was added.
Here it works pretty good. What do you think? I can send you a complete
patch against the CVS if this principal is acceptable for you.
best regards
STan
PS: Please use my email in Cc: as I'm not a member of any mc list.
On Fri, 15 Nov 2002, Pavel Roskin wrote:
> Hello!
>
> > Yes, you need to create the link like this to let it work (I mean the C:
> > mtools drive filesystem entry):
> >
> > su -
> > cd /usr/share/mc/extfs
> > ln -s a c
> > echo "c:" >>extfs.ini
> > exit
>
> I don't like this approach. It means registering a separate extfs for
> each drive. If we are going to support all letters, it will be 26 scripts
> or symlinks. It's almost like having a separate script for every zip
> file.
>
> You are trying to make it work in a wrong way and then complain that it
> doesn't work right. I know the script itself takes the drive letter from
> its name. But extfs doesn't know that.
>
> I would prefer to have one single script for mtools and no symlinks. It
> doesn't matter if the syntax looks more complicated - you can always add
> translations from a: (and every other letter) to the new syntax.
>
> What if we implement something like this:
>
> VFS name mtools/dos name
>
> /#dos:a/ a:\
> /#dos:c/dos/sys.com c:\dos\sys.com
>
> That would require one script, "dos" (maybe we should use some other name
> for it), and it would interpret the first part of the path as the disk
> name.
>
> Technically, you just rename "a" to "dos", and add a function that
> converts patch to disk with path. Instead of "$disk:/$path" you write
> "$diskpath($path)" where diskpath is the new function - perl calculates
> functions inside double quotes.
>
> Once you have done that, update vfs_translate_url() to support all letter
> and use the new syntax. Now the hard part - test it and fix the bugs if
> any. That's it!
>
> > > What are you trying to achieve?
> >
> > I would like to have the opportunity to browse all my mtools drives
> > without the need of the extfs.ini and creating symlinks after rpm -i
> > mc*.rpm.
>
> Yes, that's a reasonable request.
>
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]