~n-muench/ubuntu/precise/open-vm-tools/open-vm-tools.raring-precise.backport

« back to all changes in this revision

Viewing changes to lib/include/fileIO.h

  • Committer: Package Import Robot
  • Author(s): Nate Muench
  • Date: 2012-01-23 16:09:45 UTC
  • mfrom: (1.4.6) (2.4.26 sid)
  • Revision ID: package-import@ubuntu.com-20120123160945-b6s0r1vkcovucpf3
Tags: 2011.12.20-562307-0ubuntu1
* Merge latest upstream git tag. Fixes building on Precise
  (LP: #898289, LP: #905612)

* Items merged from Debian unstable:
  - debian/control:
    + open-vm-tools recommends open-vm-dkms. (LP: #598933)
    + open-vm-tools now suggests open-vm-toolbox. (LP: #604998)
  (From 2011.08.21-471295-1 release)
  - Updating maintainer and uploaders fields.
  - Removing vcs fields.
  - Removing references to Daniel's old email address.
  - Updating years in copyright file.
  - Updating to standards version 3.9.2.
  - Updating to debhelper version 8.
  - Switching to source format 3.0 (quilt).
  - Removing manual chrpath setting.
  - Removing exclusion from plugins from debhelper shlibs.
  - Rediffing kvers.patch.
  (From 2011.09.23-491607-1 release)
  - Marking binary architecture-dependend packages as linux and kfreebsd
  only.
  - Removing liburiparser-dev from build-depends as upstream dropped
  unity support.
  - Building with libproc-dev on amd64 again.
  - Dropping disabling of dnet support.
  (From 2011.09.23-491607-2 release)
  - Adding doxygen to build-depends for api documentation.
  - Adding libcunit1-dev to build-depends for test suites.
  - Minimizing rules file.
  - Adding open-vm-tools-dev package, containing only the api
    documentation for now.
  (From 2011.09.23-491607-3 release)
  - Sorting overrides in rules alphabetically.
  - Compacting copyright file.
  - Adding udev rule to set timeout for vmware scsi devices
  (From 2011.12.20-562307-1 release)
  - Adding patch to correct typo in upstreams dkms configuration

* Remaining Changes:
  - Remove Stable part of version numbering.
  - debian folder:
    + Re-added open-vm-dkms.postinst & open-vm-dkms.prerm.
      * Allows dkms modules to compile upon installation.
  - debian/control:
    + Re-add open-vm-source and make into a transitional package
      for open-vm-toolbox.
    + Return dependancies that were moved to open-vm-tools back to
      open-vm-toolbox.
  - debian/rules and debian/open-vm-toolbox.lintian-overrides:
    + Make vmware-user-suid-wrapper suid-root
  - debian/rules:
    + Added CFLAGS field with -Wno-deprecated-declarations
      * Will suppress issues with glib 2.31 or later.
    + Add line to copy vmware-xdg-detect-de into place.
    + Install vmware-user.desktop through toolbox package.
  - debian/open-vm-tools.init:
    + Re-add 'modprobe [-r] vmblock'.
    + Add 'modprobe [-r] vmxnet'.
      * Incase it's not loaded during boot.
    + Remove and re-add pcnet32 module
      * Will be done before (remove) and after (readd) vmxnet module
        is added.
      * If vmxnet doesn't exist (aka modules fail to build), pcnet32 can be
        still used for network connectivity.
      * Workaround until a better fix can be done.
  - Re-add gnome-session to debian/local/xautostart.conf
  - Manpages removed (from debian/manpages):
    + vmmemctl.9
    + vmxnet3.9
    + Remove references to manpages that have been removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
148
148
 */
149
149
#define FILEIO_OPEN_MULTIWRITER_LOCK     (1 << 14)
150
150
/*
 
151
 * Flag the file to be cached by the vBlob caching layer
 
152
 */
 
153
#define FILEIO_OPEN_USE_AIO_CACHE        (1 << 15)
 
154
/*
151
155
 * Valid only for MacOS. It eventually results into O_EXLOCK flag passed to open
152
156
 * system call.
153
157
 *
174
178
 * Valid only on Windows. Set FILE_SHARE_DELETE.
175
179
 */
176
180
#define FILEIO_OPEN_SHARE_DELETE (1 << 19)
 
181
/*
 
182
 * Strengths of file lock.
 
183
 * Advisory:
 
184
 *   Must use FileIO plus lock flags to get locking.
 
185
 *   Never uses kernel/fs-level lock, so naked open() bypasses locking.
 
186
 * Mandatory:
 
187
 *   Requires kernel/fs-level, so naked open() respects lock.
 
188
 *   Kernel/fs-level locks are available on ESX but not hosted.
 
189
 * Best:
 
190
 *   Adaptively picks between mandatory and advisory.
 
191
 * Almost all cases should use the "best" lock.
 
192
 */
 
193
#define FILEIO_OPEN_LOCK_BEST      FILEIO_OPEN_LOCKED /* historical */
 
194
#define FILEIO_OPEN_LOCK_ADVISORY  (1 << 20)
 
195
#define FILEIO_OPEN_LOCK_MANDATORY (1 << 21)
177
196
 
178
197
/*
179
198
 * Flag passed to open() to not attempt to get the lun attributes as part of
290
309
                          size_t requested,
291
310
                          size_t *actual);
292
311
 
 
312
FileIOResult FileIO_AtomicTempFile(FileIODescriptor *fileFD,
 
313
                                   FileIODescriptor *tempFD);
 
314
 
 
315
Bool FileIO_AtomicUpdate(FileIODescriptor *newFD,
 
316
                         FileIODescriptor *currFD);
 
317
 
293
318
#if !defined(VMX86_TOOLS) || !defined(__FreeBSD__)
294
319
 
295
320
FileIOResult FileIO_Readv(FileIODescriptor *fd,
335
360
 
336
361
int     FileIO_Sync(const FileIODescriptor *file);
337
362
 
 
363
FileIOResult FileIO_GetAllocSize(const FileIODescriptor *fd,
 
364
                                 uint64 *logicalBytes,
 
365
                                 uint64 *allocedBytes);
338
366
int64   FileIO_GetSize(const FileIODescriptor *fd);
339
367
 
340
 
int64   FileIO_GetAllocSize(const FileIODescriptor *fd);
 
368
Bool    FileIO_SetAllocSize(const FileIODescriptor *fd, uint64 size);
341
369
 
342
 
Bool    FileIO_SetAllocSize(const FileIODescriptor *fd,
343
 
                            uint64 size);
 
370
FileIOResult FileIO_GetAllocSizeByPath(ConstUnicode pathName,
 
371
                                       uint64 *logicalBytes,
 
372
                                       uint64 *allocedBytes);
344
373
 
345
374
int64   FileIO_GetSizeByPath(ConstUnicode pathName);
346
375
 
347
376
Bool    FileIO_Close(FileIODescriptor *file);
348
377
 
 
378
Bool    FileIO_CloseAndUnlink(FileIODescriptor *file);
 
379
 
349
380
uint32  FileIO_GetFlags(FileIODescriptor *file);
350
381
 
351
382
Bool    FileIO_GetVolumeSectorSize(const char *name,