~ubuntu-branches/ubuntu/quantal/open-vm-tools/quantal-201210021442

« back to all changes in this revision

Viewing changes to modules/linux/vsock/linux/vsockVmci.h

  • Committer: Bazaar Package Importer
  • Author(s): Serge Hallyn
  • Date: 2011-03-31 14:20:05 UTC
  • mfrom: (1.4.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110331142005-3n9red91p7ogkweo
Tags: 2011.03.28-387002-0ubuntu1
* Merge latest upstream git tag.  This has the unlocked_ioctl change
  needed to fix dkms build failures (LP: #727342)
* Changes in debian/rules:
  - work around a bug in toolbox/Makefile, where install-exec-hook is
    not happening.  This needs to get fixed the right way.
  - don't install 'vmware-user' which seems to no longer exist
  - move /etc/xdg into open-vm-toolbox (which should be done using .install)
* debian/open-vm-tools.init: add 'modprobe [-r] vmblock'. (LP: #332323)
* debian/rules and debian/open-vm-toolbox.lintian-overrides:
  - Make vmware-user-suid-wrapper suid-root (LP: #332323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
   case VMCI_ERROR_NO_RESOURCES:
91
91
      err = ENOBUFS;
92
92
      break;
 
93
   case VMCI_ERROR_INVALID_RESOURCE:
 
94
      err = EHOSTUNREACH;
 
95
      break;
93
96
   case VMCI_ERROR_INVALID_ARGS:
94
 
   case VMCI_ERROR_INVALID_RESOURCE:
95
97
   default:
96
98
      err = EINVAL;
97
99
   }
100
102
}
101
103
 
102
104
 
 
105
/*
 
106
 *----------------------------------------------------------------------------
 
107
 *
 
108
 * VSockVmci_GetVmciObjSocket --
 
109
 *
 
110
 *      Get a socket from a VMCI object, but only if the object is of the
 
111
 *      appropriate type.
 
112
 *
 
113
 * Results:
 
114
 *      A socket if the object is of the correct type, NULL otherwise.
 
115
 *
 
116
 * Side effects:
 
117
 *      None.
 
118
 *
 
119
 *----------------------------------------------------------------------------
 
120
 */
 
121
 
 
122
static INLINE void *
 
123
VSockVmci_GetVmciObjSocket(VMCIObj *obj) // IN
 
124
{
 
125
   ASSERT(obj);
 
126
   if (NULL != obj->ptr && VMCIOBJ_SOCKET == obj->type) {
 
127
      return obj->ptr;
 
128
   }
 
129
   return NULL;
 
130
}
 
131
 
 
132
 
 
133
/*
 
134
 *----------------------------------------------------------------------------
 
135
 *
 
136
 * VSockVmci_SetVmciObjSocket --
 
137
 *
 
138
 *      Set the socket in a VMCI object.  This will also set the type
 
139
 *      accordingly.
 
140
 *
 
141
 * Results:
 
142
 *      None.
 
143
 *
 
144
 * Side effects:
 
145
 *      None.
 
146
 *
 
147
 *----------------------------------------------------------------------------
 
148
 */
 
149
 
 
150
static INLINE void
 
151
VSockVmci_SetVmciObjSocket(VMCIObj *obj, // OUT
 
152
                           void *s)      // IN
 
153
{
 
154
   ASSERT(obj);
 
155
   ASSERT(s);
 
156
   obj->ptr = s;
 
157
   obj->type = VMCIOBJ_SOCKET;
 
158
}
 
159
 
 
160
 
103
161
#endif // _VSOCK_VMCI_H_
104
162