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

« back to all changes in this revision

Viewing changes to lib/hgfsServer/hgfsDirNotifyStub.c

  • 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:
28
28
#include "vmware.h"
29
29
#include "vm_basic_types.h"
30
30
 
 
31
#include "hgfsProto.h"
 
32
#include "hgfsServer.h"
 
33
#include "hgfsUtil.h"
31
34
#include "hgfsDirNotify.h"
32
35
 
33
36
 
39
42
 *    One time initialization of the library.
40
43
 *
41
44
 * Results:
42
 
 *    0 if success, error code otherwise.
 
45
 *    Invalid value error.
43
46
 *
44
47
 * Side effects:
45
48
 *    None.
47
50
 *-----------------------------------------------------------------------------
48
51
 */
49
52
 
50
 
uint32
 
53
HgfsInternalStatus
51
54
HgfsNotify_Init(void)
52
55
{
53
56
   return EINVAL;
79
82
/*
80
83
 *-----------------------------------------------------------------------------
81
84
 *
 
85
 * HgfsNotify_Suspend --
 
86
 *
 
87
 *    Suspends sending notifications.
 
88
 *
 
89
 * Results:
 
90
 *    None.
 
91
 *
 
92
 * Side effects:
 
93
 *    None.
 
94
 *
 
95
 *-----------------------------------------------------------------------------
 
96
 */
 
97
 
 
98
void
 
99
HgfsNotify_Suspend(void)
 
100
{
 
101
}
 
102
 
 
103
 
 
104
/*
 
105
 *-----------------------------------------------------------------------------
 
106
 *
 
107
 * HgfsNotify_Resume --
 
108
 *
 
109
 *    Resumes sending notifications.
 
110
 *
 
111
 * Results:
 
112
 *    None.
 
113
 *
 
114
 * Side effects:
 
115
 *    None.
 
116
 *
 
117
 *-----------------------------------------------------------------------------
 
118
 */
 
119
 
 
120
void
 
121
HgfsNotify_Resume(void)
 
122
{
 
123
}
 
124
 
 
125
 
 
126
/*
 
127
 *-----------------------------------------------------------------------------
 
128
 *
82
129
 * HgfsNotify_AddSharedFolder --
83
130
 *
84
131
 *    Allocates memory and initializes new shared folder structure.
85
132
 *
86
133
 * Results:
87
 
 *    Opaque subscriber handle for the new subscriber or INVALID_OBJECT_HANDLE
 
134
 *    Opaque subscriber handle for the new subscriber or HGFS_INVALID_FOLDER_HANDLE
88
135
 *    if adding shared folder fails.
89
136
 *
90
137
 * Side effects:
94
141
 */
95
142
 
96
143
HgfsSharedFolderHandle
97
 
HgfsNotify_AddSharedFolder(const char *path) // IN
 
144
HgfsNotify_AddSharedFolder(const char *path,       // IN: path in the host
 
145
                           const char *shareName)  // IN: name of the shared folder
98
146
{
99
 
   return INVALID_OBJECT_HANDLE;
 
147
   return HGFS_INVALID_FOLDER_HANDLE;
100
148
}
101
149
 
102
150
 
109
157
 *    Inserts allocated subscriber into corrspondent array.
110
158
 *
111
159
 * Results:
112
 
 *    Opaque subscriber handle for the new subscriber or INVALID_OBJECT_HANDLE
 
160
 *    Opaque subscriber handle for the new subscriber or HGFS_INVALID_SUBSCRIBER_HANDLE
113
161
 *    if adding subscriber fails.
114
162
 *
115
163
 * Side effects:
119
167
 */
120
168
 
121
169
HgfsSubscriberHandle
122
 
HgfsNotify_AddSubscriber(HgfsSharedFolderHandle sharedFolder, // IN
123
 
                         const char *path,                    // IN path relative to shared folder
124
 
                         uint32 eventFilter,                  // IN
125
 
                         uint32 recursive)                    // IN TRUE if look in subdirectories
 
170
HgfsNotify_AddSubscriber(HgfsSharedFolderHandle sharedFolder, // IN: shared folder handle
 
171
                         const char *path,                    // IN: relative path
 
172
                         uint32 eventFilter,                  // IN: event filter
 
173
                         uint32 recursive,                    // IN: look in subfolders
 
174
                         HgfsNotificationCallbackFunc notify, // IN notification callback
 
175
                         struct HgfsSessionInfo *session)     // IN: server context
126
176
{
127
 
   return INVALID_OBJECT_HANDLE;
 
177
   return HGFS_INVALID_SUBSCRIBER_HANDLE;
128
178
}
129
179
 
130
180
/*
136
186
 *    Also deletes all subscribers that are defined for the shared folder.
137
187
 *
138
188
 * Results:
139
 
 *    0 if success, error code otherwise.
 
189
 *    FALSE.
140
190
 *
141
191
 * Side effects:
142
192
 *    Removes all subscribers that correspond to the shared folder and invalidates
145
195
 *-----------------------------------------------------------------------------
146
196
 */
147
197
 
148
 
uint32
 
198
Bool
149
199
HgfsNotify_RemoveSharedFolder(HgfsSharedFolderHandle sharedFolder) // IN
150
200
{
151
 
   return EINVAL;
 
201
   return FALSE;
152
202
}
153
203
 
154
204
 
160
210
 *    Deallcates memory used by NotificationSubscriber and performs necessary cleanup.
161
211
 *
162
212
 * Results:
163
 
 *    0 if success, error code otherwise.
 
213
 *    FALSE.
164
214
 *
165
215
 * Side effects:
166
216
 *    None.
168
218
 *-----------------------------------------------------------------------------
169
219
 */
170
220
 
171
 
uint32
 
221
Bool
172
222
HgfsNotify_RemoveSubscriber(HgfsSubscriberHandle subscriber) // IN
173
223
{
174
 
   return EINVAL;
 
224
   return FALSE;
 
225
}
 
226
 
 
227
 
 
228
/*
 
229
 *-----------------------------------------------------------------------------
 
230
 *
 
231
 * HgfsNotify_CleanupSession --
 
232
 *
 
233
 *    Removes all entries that are related to a particular session.
 
234
 *
 
235
 * Results:
 
236
 *    None.
 
237
 *
 
238
 * Side effects:
 
239
 *    None.
 
240
 *
 
241
 *-----------------------------------------------------------------------------
 
242
 */
 
243
 
 
244
void
 
245
HgfsNotify_CleanupSession(struct HgfsSessionInfo *session) // IN
 
246
{
175
247
}