~n-muench/ubuntu/oneiric/open-vm-tools/open-vm-tools.fix-836277

« back to all changes in this revision

Viewing changes to modules/freebsd/vmhgfs/vnops.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2008-10-23 15:32:00 UTC
  • mfrom: (1.1.2 upstream) (2.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20081023153200-gc1bfx89hj35c799
Tags: 2008.10.10-123053-2
* Correcting typo in dh_installinit call.
* Downgrading depends on module-assistant to recommends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
#include "fsutil.h"
45
45
#include "vnopscommon.h"
46
46
 
47
 
/*
48
 
 * Macros
49
 
 */
50
 
 
51
 
/*
52
 
 * Hgfs permissions are similar to Unix permissions in that they both include
53
 
 * bits for read vs. write vs. execute permissions.  However, Hgfs is only
54
 
 * concerned with file owners, meaning no "group" or "other" bits, so we need to
55
 
 * translate between Hgfs and Unix permissions with a simple bitshift.  The
56
 
 * shift value corresponds to omitting the "group" and "other" bits.
57
 
 */
58
 
#define HGFS_ATTR_MODE_SHIFT    6
59
 
 
60
 
/* Sets the values of request headers properly */
61
 
#define HGFS_INIT_REQUEST_HDR(request, req, _op)                \
62
 
         do {                                                   \
63
 
            request->header.id = HgfsKReq_GetId(req);           \
64
 
            request->header.op = _op;                           \
65
 
         } while(0)
66
 
 
67
 
/* FreeBSD times support nsecs, so only use these functions directly */
68
 
#define HGFS_SET_TIME(unixtm, nttime)                   \
69
 
         HgfsConvertFromNtTimeNsec(&unixtm, nttime)
70
 
#define HGFS_GET_TIME(unixtm)                           \
71
 
         HgfsConvertTimeSpecToNtTime(&unixtm)
72
 
 
73
 
/* Determine if this is the root vnode. */
74
 
#define HGFS_IS_ROOT_VNODE(sip, vp)                     \
75
 
                (sip->rootVnode == vp)
76
 
 
77
47
 
78
48
/*
79
49
 * Local functions (prototypes)