VirtualBox

忽略:
時間撮記:
2010-4-13 下午02:14:07 (15 年 以前)
作者:
vboxsync
訊息:

SharedFolders/linux: Don't close an inode for a regular file after it was created with sf_create(). We assume that this inode will be opened with sf_reg_open() and later closed with sf_reg_close(). Fixes copying of read-only files on shared folders.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Additions/linux/sharedfolders/regops.c

    r24350 r28253  
    271271        }
    272272
     273        /* Already open? */
     274        if (sf_i->handle != SHFL_HANDLE_NIL)
     275        {
     276            /*
     277             * This inode was created with sf_create_aux(). Check the CreateFlags:
     278             * O_CREAT, O_TRUNC: inherent true (file was just created). Not sure
     279             * about the access flags (SHFL_CF_ACCESS_*).
     280             */
     281            sf_i->force_restat = 1;
     282            sf_r->handle = sf_i->handle;
     283            sf_i->handle = SHFL_HANDLE_NIL;
     284            sf_i->file = file;
     285            file->private_data = sf_r;
     286            return 0;
     287        }
     288
    273289        RT_ZERO(params);
    274290        params.Handle = SHFL_HANDLE_NIL;
     
    328344
    329345        params.Info.Attr.fMode = inode->i_mode;
    330         LogFunc(("sf_reg_open: calling vboxCallCreate, file %s, flags=%d, %#x\n",
     346        LogFunc(("sf_reg_open: calling vboxCallCreate, file %s, flags=%#x, %#x\n",
    331347                 sf_i->path->String.utf8 , file->f_flags, params.CreateFlags));
    332348        rc = vboxCallCreate (&client_handle, &sf_g->map, sf_i->path, &params);
     
    382398        kfree (sf_r);
    383399        sf_i->file = NULL;
     400        sf_i->handle = SHFL_HANDLE_NIL;
    384401        file->private_data = NULL;
    385402        return 0;
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette