[9fans] u9fs - Plan9

This is a discussion on [9fans] u9fs - Plan9 ; Hello, I am annoyed by a curious phenomenon. When I access to my Mac/OSX PowerBook from Plan 9 terminal (in hosted VirtualPC), ls command of Plan 9 terminal does not respond in a special directory: a mounted directory of remote ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: [9fans] u9fs

  1. [9fans] u9fs

    Hello,

    I am annoyed by a curious phenomenon.
    When I access to my Mac/OSX PowerBook from Plan 9 terminal (in hosted
    VirtualPC),
    ls command of Plan 9 terminal does not respond in a special directory:
    a mounted directory of remote file server.

    Of cause my PowerBook responds the directory: /Volumes/kenji
    -bash$ ls -l /Volumes
    total 8
    lrwxr-xr-x 1 root admin 1 Mar 27 11:35 Macintosh HD -> /
    drwxrwxrwx 26 arisawa arisawa 840 Mar 30 14:30 kenji
    -bash$ ls -l /Volumes/kenji
    total 16
    drwxrwxrwx 2 arisawa arisawa 264 Feb 26 16:56 Network Trash
    Folder
    drwxrwxrwx 47 arisawa arisawa 1554 Mar 5 17:28 Private
    ...
    drwxrwxrwx 4 arisawa arisawa 264 Feb 26 20:22 travel
    -bash$

    I found u9fs falls into infinite loop in the directory.

    I added
    fprint(2,"rread...\n");
    and
    fprint(2,"dirread:%s\n", fid->dirent->d_name);

    in u9fs.c


    void
    rread(Fcall *rx, Fcall *tx)
    {
    char *e, *path;
    uchar *p, *ep;
    int n;
    Fid *fid;
    Dir d;
    struct stat st;

    fprint(2,"rread...\n");

    ...

    if(strcmp(fid->dirent->d_name, ".") == 0
    || strcmp(fid->dirent->d_name, "..") == 0){
    fid->dirent = nil;
    continue;
    }
    fprint(2,"dirread:%s\n", fid->dirent->d_name);
    path = estrpath(fid->path, fid->dirent->d_name, 0);
    memset(&st, 0, sizeof st);
    ...
    }

    Then u9fs.log shows:

    rread...
    dirread:Network Trash Folder
    dirread:Temporary Items
    dirreadhoto
    dirread:doc
    dirread:study
    dirread:arch
    dirread:edu
    dirread:src
    dirread:tmp
    dirread:.DS_Store
    dirread:dlb
    dirread:travel
    dirread:spam
    dirread:english
    dirread:news
    dirread:adm
    dirread:db
    dirread:.TemporaryItems
    dirread:Private
    dirread:lib
    dirreadlan9
    dirread:todo.txt
    dirread:log
    dirread:trashbox
    rread...
    dirread:Network Trash Folder
    dirread:Temporary Items
    dirreadhoto
    dirread:doc
    dirread:study
    dirread:arch
    dirread:edu
    dirread:src
    dirread:tmp
    dirread:.DS_Store
    dirread:dlb
    dirread:travel
    dirread:spam
    dirread:english
    dirread:news
    dirread:adm
    dirread:db
    dirread:.TemporaryItems
    dirread:Private
    dirread:lib
    dirreadlan9
    dirread:todo.txt
    dirread:log
    dirread:trashbox
    rread...

    I don't know why this loop happens, and I don't know how to prevent
    the loop.
    Suggestion welcome.

    Kenji Arisawa



  2. Re: [9fans] u9fs

    I wrote:
    >
    > When I access to my Mac/OSX PowerBook from Plan 9 terminal (in
    > hosted VirtualPC),
    > ls command of Plan 9 terminal does not respond in a special directory:
    > a mounted directory of remote file server.
    >


    but "(in hosted VirtualPC)" is not essential.

    Kenji Arisawa



+ Reply to Thread