VirtualBox

Changeset 4743

Show
Ignore:
Timestamp:
09/12/07 20:25:23 (1 year ago)
Author:
vboxsync
Message:

Fix for when open is called on a Linux guest shared folder with O_CREAT|O_EXCL

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/VBox/Additions/linux/sharedfolders/dirops.c

    r4729 r4743  
    409409        } 
    410410 
    411         LogFunc(("sf_create_aux: calling vboxCallCreate, folder %s, flags %#x\n", 
     411        LogFunc(("calling vboxCallCreate, folder %s, flags %#x\n", 
    412412                 path->String.utf8, params.CreateFlags)); 
    413413        rc = vboxCallCreate (&client_handle, &sf_g->map, path, &params); 
  • trunk/src/VBox/Additions/linux/sharedfolders/regops.c

    r4729 r4743  
    221221                LogFunc(("O_CREAT set\n")); 
    222222                params.CreateFlags |= SHFL_CF_ACT_CREATE_IF_NEW; 
    223                 if (file->f_flags & O_EXCL) { 
    224                         LogFunc(("O_EXCL set\n")); 
    225                         params.CreateFlags |= SHFL_CF_ACT_FAIL_IF_EXISTS; 
    226                 } 
    227                 else { 
     223                /* We ignore O_EXCL, as the Linux kernel seems to call create 
     224                   beforehand itself, so O_EXCL should always fail. */ 
     225//                if (file->f_flags & O_EXCL) { 
     226//                        LogFunc(("O_EXCL set\n")); 
     227//                        params.CreateFlags |= SHFL_CF_ACT_FAIL_IF_EXISTS; 
     228//                } 
     229//                else { 
    228230                        /* O_TRUNC combined with O_EXCL is undefined. */ 
    229231                        if (file->f_flags & O_TRUNC) { 
     
    234236                                params.CreateFlags |= SHFL_CF_ACT_OPEN_IF_EXISTS; 
    235237                        } 
    236                 } 
     238//                } 
    237239        } 
    238240        else { 
  • trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.c

    r4729 r4743  
    2222 */ 
    2323 
     24/** 
     25 * @note Anyone wishing to make changes here might wish to take a look at 
     26 *  http://www.atnf.csiro.au/people/rgooch/linux/vfs.txt 
     27 * which seems to be the closest there is to official documentation on 
     28 * writing filesystem drivers for Linux. 
     29 */ 
     30 
    2431/* 
    2532 * Suppress the definition of wchar_t from stddef.h that occurs below. 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy