VirtualBox

Changeset 39781 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Jan 17, 2012 2:44:58 PM (13 years ago)
Author:
vboxsync
Message:

Shared Folders/Linux: processing remount option .

Location:
trunk/src/VBox/Additions/linux/sharedfolders
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c

    r38898 r39781  
    466466    if (opts.nodev)
    467467        flags |= MS_NODEV;
     468    if (opts.remount)
     469        flags |= MS_REMOUNT;
    468470
    469471    mntinf.uid   = opts.uid;
  • trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.c

    r38811 r39781  
    415415static int sf_remount_fs(struct super_block *sb, int *flags, char *data)
    416416{
    417     TRACE();
    418     return -ENOSYS;
     417    struct sf_glob_info *sf_g;
     418    struct vbsf_mount_info_new *info;
     419    struct sf_inode_info *sf_i;
     420    struct inode *iroot;
     421    SHFLFSOBJINFO fsinfo;
     422    int err;
     423
     424    printk(KERN_DEBUG "ENTER: sf_remount_fs\n");
     425    sf_g = GET_GLOB_INFO(sb);
     426    BUG_ON(!sf_g);
     427    BUG_ON(data[0] != 0);
     428    info = (struct vbsf_mount_info_new *)data;
     429    BUG_ON(   info->signature[0] != VBSF_MOUNT_SIGNATURE_BYTE_0
     430           || info->signature[1] != VBSF_MOUNT_SIGNATURE_BYTE_1
     431           || info->signature[2] != VBSF_MOUNT_SIGNATURE_BYTE_2);
     432
     433    sf_g->uid = info->uid;
     434    sf_g->gid = info->gid;
     435    sf_g->ttl = info->ttl;
     436    sf_g->dmode = info->dmode;
     437    sf_g->fmode = info->fmode;
     438    sf_g->dmask = info->dmask;
     439    sf_g->fmask = info->fmask;
     440
     441    iroot = ilookup(sb, 0);
     442    if (!iroot)
     443    {
     444        printk(KERN_DEBUG "can't find root inode\n");
     445        return -ENOSYS;
     446    }
     447    sf_i = GET_INODE_INFO(iroot);
     448    err = sf_stat(__func__, sf_g, sf_i->path, &fsinfo, 0);
     449    BUG_ON(err != 0);
     450    sf_init_inode(sf_g, iroot, &fsinfo);
     451    /*unlock_new_inode(iroot);*/
     452    printk(KERN_DEBUG "LEAVE: sf_remount_fs\n");
     453    return 0;
    419454}
    420455
Note: See TracChangeset for help on using the changeset viewer.

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