~ubuntu-branches/ubuntu/trusty/virtualbox/trusty-proposed

« back to all changes in this revision

Viewing changes to src/VBox/Additions/linux/sharedfolders/regops.c

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2013-03-07 16:38:36 UTC
  • mfrom: (1.1.13) (3.1.20 experimental)
  • Revision ID: package-import@ubuntu.com-20130307163836-p93jpbgx39tp3gb4
Tags: 4.2.8-dfsg-0ubuntu1
* New upstream release. (Closes: #691148)
  - Fixes compatibility with kernel 3.8. (Closes: #700823; LP: #1101867)
* Switch to my @debian.org email address.
* Move package to contrib as virtualbox 4.2 needs a non-free compiler to
  build the BIOS.
* Build-depend on libdevmapper-dev.
* Refresh patches.
  - Drop 36-fix-ftbfs-xserver-112.patch, cve-2012-3221.patch,
    CVE-2013-0420.patch 37-kcompat-3.6.patch and 38-kcompat-3.7.patch.
* Drop all virtualbox-ose transitional packages.
* Drop the virtualbox-fuse package as vdfuse fails to build with
  virtualbox 4.2.
* Update install files and VBox.sh.
* Bump required kbuild version to 0.1.9998svn2577.
* Fix path to VBoxCreateUSBNode.sh in virtualbox.postinst. (Closes: #700479)
* Add an init script to virtuabox-guest-x11 which loads the vboxvideo
  kernel module. The X Server 1.13 doesn't load it anymore. (Closes: #686994)
* Update man pages. (Closes: #680053)
* Add 36-python-multiarch.patch from Rico Tzschichholz to fix detection of
  python in multiarch paths using pkg-config.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: regops.c $ */
1
2
/** @file
2
 
 *
3
 
 * vboxsf -- VirtualBox Guest Additions for Linux:
4
 
 * Regular file inode and file operations
 
3
 * vboxsf - VBox Linux Shared Folders, Regular file inode and file operations.
5
4
 */
6
5
 
7
6
/*
8
 
 * Copyright (C) 2006-2010 Oracle Corporation
 
7
 * Copyright (C) 2006-2012 Oracle Corporation
9
8
 *
10
9
 * This file is part of VirtualBox Open Source Edition (OSE), as
11
10
 * available from http://www.virtualbox.org. This file is free software;
22
21
 
23
22
#include "vfsmod.h"
24
23
 
25
 
static void *alloc_bounch_buffer(size_t *tmp_sizep, PRTCCPHYS physp, size_t
 
24
static void *alloc_bounce_buffer(size_t *tmp_sizep, PRTCCPHYS physp, size_t
26
25
                                 xfer_size, const char *caller)
27
26
{
28
27
    size_t tmp_size;
50
49
    return tmp;
51
50
}
52
51
 
53
 
static void free_bounch_buffer(void *tmp)
 
52
static void free_bounce_buffer(void *tmp)
54
53
{
55
54
    kfree (tmp);
56
55
}
126
125
    if (!size)
127
126
        return 0;
128
127
 
129
 
    tmp = alloc_bounch_buffer(&tmp_size, &tmp_phys, size, __PRETTY_FUNCTION__);
 
128
    tmp = alloc_bounce_buffer(&tmp_size, &tmp_phys, size, __PRETTY_FUNCTION__);
130
129
    if (!tmp)
131
130
        return -ENOMEM;
132
131
 
159
158
    }
160
159
 
161
160
    *off += total_bytes_read;
162
 
    free_bounch_buffer(tmp);
 
161
    free_bounce_buffer(tmp);
163
162
    return total_bytes_read;
164
163
 
165
164
fail:
166
 
    free_bounch_buffer(tmp);
 
165
    free_bounce_buffer(tmp);
167
166
    return err;
168
167
}
169
168
 
213
212
    if (!size)
214
213
        return 0;
215
214
 
216
 
    tmp = alloc_bounch_buffer(&tmp_size, &tmp_phys, size, __PRETTY_FUNCTION__);
 
215
    tmp = alloc_bounce_buffer(&tmp_size, &tmp_phys, size, __PRETTY_FUNCTION__);
217
216
    if (!tmp)
218
217
        return -ENOMEM;
219
218
 
259
258
        inode->i_size = *off;
260
259
 
261
260
    sf_i->force_restat = 1;
262
 
    free_bounch_buffer(tmp);
 
261
    free_bounce_buffer(tmp);
263
262
    return total_bytes_written;
264
263
 
265
264
fail:
266
 
    free_bounch_buffer(tmp);
 
265
    free_bounce_buffer(tmp);
267
266
    return err;
268
267
}
269
268