From aff2a122b9fef910dc9ecdb7e033fa451ee4ba84 Mon Sep 17 00:00:00 2001
From: Pawel Dziepak <pdziepak@quarnos.org>
Date: Sat, 7 Apr 2012 18:26:05 +0200
Subject: [PATCH] Fix #8420: NetFS does not compile with DEBUG
Debug macros like PRINT, ERROR, etc. are defined differently in NetFS
and UserlandFS. In NetFS they use single parentheses while in UserlandFS
double parentheses are required. Somehow this got mixed up in NetFS and
there were both styles of calling these macros what caused the incorrect
one to produce compilation errors.
---
.../file_systems/netfs/client/RootVolume.cpp | 20 +-
.../file_systems/netfs/client/ServerManager.cpp | 22 +-
.../file_systems/netfs/client/ServerVolume.cpp | 5 +-
.../file_systems/netfs/client/ShareVolume.cpp | 46 +++--
.../kernel/file_systems/netfs/client/Volume.cpp | 4 +-
.../file_systems/netfs/client/VolumeManager.cpp | 4 +-
.../kernel/file_systems/netfs/client/netfs.cpp | 214 ++++++++++----------
.../file_systems/netfs/server/ClientConnection.cpp | 43 +++--
.../file_systems/netfs/server/NetFSServer.cpp | 2 +-
.../file_systems/netfs/server/NodeMonitor.cpp | 8 +-
.../file_systems/netfs/server/VolumeManager.cpp | 14 +-
.../netfs/shared/InsecureConnection.cpp | 4 +-
.../file_systems/netfs/shared/RequestChannel.cpp | 4 +-
.../file_systems/netfs/shared/RequestDumper.cpp | 32 ++--
14 files changed, 224 insertions(+), 198 deletions(-)
diff --git a/src/add-ons/kernel/file_systems/netfs/client/RootVolume.cpp b/src/add-ons/kernel/file_systems/netfs/client/RootVolume.cpp
index d01225f..de4b72d 100644
a
|
b
|
RootVolume::IOCtl(Node* node, void* cookie, int cmd, void* buffer,
|
152 | 152 | || serverNameLen == sizeof(params->serverName)) { |
153 | 153 | return B_BAD_VALUE; |
154 | 154 | } |
155 | | PRINT(("RootVolume::IOCtl(): NET_FS_IOCTL_ADD_SERVER: `%s'\n", |
156 | | params->serverName)); |
| 155 | PRINT("RootVolume::IOCtl(): NET_FS_IOCTL_ADD_SERVER: " |
| 156 | "`%s'\n", params->serverName); |
157 | 157 | |
158 | 158 | // get the server address |
159 | 159 | NetAddress netAddress; |
… |
… |
RootVolume::IOCtl(Node* node, void* cookie, int cmd, void* buffer,
|
178 | 178 | || serverNameLen == sizeof(params->serverName)) { |
179 | 179 | return B_BAD_VALUE; |
180 | 180 | } |
181 | | PRINT(("RootVolume::IOCtl(): NET_FS_IOCTL_REMOVE_SERVER: `%s'\n", |
182 | | params->serverName)); |
| 181 | PRINT("RootVolume::IOCtl(): NET_FS_IOCTL_REMOVE_SERVER:" |
| 182 | " `%s'\n", params->serverName); |
183 | 183 | |
184 | 184 | // get the server volume |
185 | 185 | ServerVolume* serverVolume = _GetServerVolume(params->serverName); |
… |
… |
RootVolume::IOCtl(Node* node, void* cookie, int cmd, void* buffer,
|
193 | 193 | return B_OK; |
194 | 194 | } |
195 | 195 | default: |
196 | | PRINT(("RootVolume::IOCtl(): unknown ioctl: %d\n", cmd)); |
| 196 | PRINT("RootVolume::IOCtl(): unknown ioctl: %d\n", cmd); |
197 | 197 | return B_BAD_VALUE; |
198 | 198 | break; |
199 | 199 | } |
… |
… |
RootVolume::IOCtl(Node* node, void* cookie, int cmd, void* buffer,
|
207 | 207 | void |
208 | 208 | RootVolume::ServerAdded(ExtendedServerInfo* serverInfo) |
209 | 209 | { |
210 | | PRINT(("RootVolume::ServerAdded(%s)\n", serverInfo->GetServerName())); |
| 210 | PRINT("RootVolume::ServerAdded(%s)\n", serverInfo->GetServerName()); |
211 | 211 | // check, if the server does already exist |
212 | 212 | ServerVolume* serverVolume = _GetServerVolume(serverInfo->GetAddress()); |
213 | 213 | if (serverVolume) { |
214 | | WARN(("RootVolume::ServerAdded(): WARNING: ServerVolume does already " |
215 | | "exist.\n")); |
| 214 | WARN("RootVolume::ServerAdded(): WARNING: ServerVolume does " |
| 215 | "already exist.\n"); |
216 | 216 | serverVolume->PutVolume(); |
217 | 217 | return; |
218 | 218 | } |
… |
… |
void
|
258 | 258 | RootVolume::ServerUpdated(ExtendedServerInfo* oldInfo, |
259 | 259 | ExtendedServerInfo* newInfo) |
260 | 260 | { |
261 | | PRINT(("RootVolume::ServerUpdated(%s)\n", newInfo->GetServerName())); |
| 261 | PRINT("RootVolume::ServerUpdated(%s)\n", newInfo->GetServerName()); |
262 | 262 | // get the volume |
263 | 263 | ServerVolume* serverVolume = _GetServerVolume(newInfo->GetAddress()); |
264 | 264 | if (!serverVolume) |
… |
… |
PRINT(("RootVolume::ServerUpdated(%s)\n", newInfo->GetServerName()));
|
273 | 273 | void |
274 | 274 | RootVolume::ServerRemoved(ExtendedServerInfo* serverInfo) |
275 | 275 | { |
276 | | PRINT(("RootVolume::ServerRemoved(%s)\n", serverInfo->GetServerName())); |
| 276 | PRINT("RootVolume::ServerRemoved(%s)\n", serverInfo->GetServerName()); |
277 | 277 | // get the volume |
278 | 278 | ServerVolume* serverVolume = _GetServerVolume(serverInfo->GetAddress()); |
279 | 279 | if (!serverVolume) |
diff --git a/src/add-ons/kernel/file_systems/netfs/client/ServerManager.cpp b/src/add-ons/kernel/file_systems/netfs/client/ServerManager.cpp
index e443f43..eff50b4 100644
a
|
b
|
ServerManager::_BroadcastListener()
|
303 | 303 | ssize_t bytesRead = recvfrom(fBroadcastListenerSocket, &message, |
304 | 304 | sizeof(message), 0, (sockaddr*)&addr, &addrSize); |
305 | 305 | if (bytesRead < 0) { |
306 | | PRINT(("ServerManager::_BroadcastListener(): recvfrom() failed: %s\n", |
307 | | strerror(errno))); |
| 306 | PRINT("ServerManager::_BroadcastListener(): recvfrom() " |
| 307 | "failed: %s\n", strerror(errno)); |
308 | 308 | continue; |
309 | 309 | } |
310 | 310 | |
311 | 311 | // check message size, magic, and protocol version |
312 | 312 | if (bytesRead != sizeof(BroadcastMessage)) { |
313 | | PRINT(("ServerManager::_BroadcastListener(): received %ld bytes, but " |
314 | | "it should be %lu\n", bytesRead, sizeof(BroadcastMessage))); |
| 313 | PRINT("ServerManager::_BroadcastListener(): received " |
| 314 | "%ld bytes, but it should be %lu\n", bytesRead, |
| 315 | sizeof(BroadcastMessage)); |
315 | 316 | continue; |
316 | 317 | } |
317 | 318 | if (message.magic != B_HOST_TO_BENDIAN_INT32(BROADCAST_MESSAGE_MAGIC)) { |
318 | | PRINT(("ServerManager::_BroadcastListener(): message has bad " |
319 | | "magic.\n")); |
| 319 | PRINT("ServerManager::_BroadcastListener(): message has" |
| 320 | " bad magic.\n"); |
320 | 321 | continue; |
321 | 322 | } |
322 | 323 | if (message.protocolVersion |
323 | 324 | != (int32)B_HOST_TO_BENDIAN_INT32(NETFS_PROTOCOL_VERSION)) { |
324 | | PRINT(("ServerManager::_BroadcastListener(): protocol version " |
325 | | "does not match: %lu vs. %d.\n", |
326 | | B_BENDIAN_TO_HOST_INT32(message.protocolVersion), |
327 | | NETFS_PROTOCOL_VERSION)); |
| 325 | PRINT("ServerManager::_BroadcastListener(): protocol " |
| 326 | "version does not match: %lu vs. %d.\n", |
| 327 | B_BENDIAN_TO_HOST_INT32( |
| 328 | message.protocolVersion), |
| 329 | NETFS_PROTOCOL_VERSION); |
328 | 330 | continue; |
329 | 331 | } |
330 | 332 | |
diff --git a/src/add-ons/kernel/file_systems/netfs/client/ServerVolume.cpp b/src/add-ons/kernel/file_systems/netfs/client/ServerVolume.cpp
index a99fecf..d598f87 100644
a
|
b
|
ServerVolume::SetServerInfo(ExtendedServerInfo* serverInfo)
|
77 | 77 | fLock.Unlock(); |
78 | 78 | |
79 | 79 | if (remove) { |
80 | | PRINT((" removing share: %s\n", name)); |
| 80 | PRINT(" removing share: %s\n", name); |
81 | 81 | if (Volume* volume = GetChildVolume(name)) { |
82 | 82 | volume->SetUnmounting(true); |
83 | 83 | volume->PutVolume(); |
… |
… |
ServerVolume::SetServerInfo(ExtendedServerInfo* serverInfo)
|
101 | 101 | if (volume) { |
102 | 102 | volume->PutVolume(); |
103 | 103 | } else { |
104 | | PRINT((" adding share: %s\n", shareInfo->GetShareName())); |
| 104 | PRINT(" adding share: %s\n", |
| 105 | shareInfo->GetShareName()); |
105 | 106 | status_t error = _AddShare(shareInfo); |
106 | 107 | if (error != B_OK) { |
107 | 108 | ERROR("ServerVolume::SetServerInfo(): ERROR: Failed to add " |
diff --git a/src/add-ons/kernel/file_systems/netfs/client/ShareVolume.cpp b/src/add-ons/kernel/file_systems/netfs/client/ShareVolume.cpp
index 0e64c71..8a6e8a4 100644
a
|
b
|
PRINT(("ShareVolume::PrepareToUnmount()\n"));
|
353 | 353 | int32 count = fNodes->Size(); |
354 | 354 | if (count == 0) |
355 | 355 | return; |
356 | | PRINT((" %ld nodes to remove\n", count)); |
| 356 | PRINT(" %ld nodes to remove\n", count); |
357 | 357 | vnode_id* ids = new(std::nothrow) vnode_id[count]; |
358 | 358 | if (!ids) { |
359 | 359 | ERROR("ShareVolume::PrepareToUnmount(): ERROR: Insufficient memory to " |
… |
… |
PRINT((" %ld nodes to remove\n", count));
|
395 | 395 | for (int32 i = 0; i < count; i++) { |
396 | 396 | Node* node; |
397 | 397 | if (GetVNode(ids[i], &node) == B_OK) { |
398 | | PRINT((" removing node %lld\n", ids[i])); |
| 398 | PRINT(" removing node %lld\n", ids[i]); |
399 | 399 | Volume::RemoveVNode(ids[i]); |
400 | 400 | PutVNode(ids[i]); |
401 | 401 | } |
… |
… |
ShareVolume::OpenDir(Node* _node, void** _cookie)
|
1166 | 1166 | ObjectDeleter<Request> replyDeleter(reply); |
1167 | 1167 | if (reply->error != B_OK) |
1168 | 1168 | { |
1169 | | PRINT(("OpenDir() failed: node: %lld, remote: (%ld, %lld)\n", |
1170 | | node->GetID(), node->GetRemoteID().volumeID, node->GetRemoteID().nodeID)); |
| 1169 | PRINT("OpenDir() failed: node: %lld, remote: (%ld, %lld)\n", |
| 1170 | node->GetID(), node->GetRemoteID().volumeID, |
| 1171 | node->GetRemoteID().nodeID); |
1171 | 1172 | RETURN_ERROR(reply->error); |
1172 | 1173 | } |
1173 | 1174 | |
… |
… |
ShareVolume::GetQueryEntry(const EntryInfo& entryInfo,
|
2017 | 2018 | buffer->d_ino = localNodeID; |
2018 | 2019 | |
2019 | 2020 | *countRead = 1; |
2020 | | PRINT((" entry: d_dev: %ld, d_pdev: %ld, d_ino: %Ld, d_pino: %Ld, " |
2021 | | "d_reclen: %hu, d_name: `%s'\n", |
2022 | | buffer->d_dev, buffer->d_pdev, buffer->d_ino, buffer->d_pino, |
2023 | | buffer->d_reclen, buffer->d_name)); |
| 2021 | PRINT(" entry: d_dev: %ld, d_pdev: %ld, d_ino: %Ld, d_pino: %Ld, " |
| 2022 | "d_reclen: %hu, d_name: `%s'\n", buffer->d_dev, buffer->d_pdev, |
| 2023 | buffer->d_ino, buffer->d_pino, buffer->d_reclen, |
| 2024 | buffer->d_name); |
2024 | 2025 | return B_OK; |
2025 | 2026 | } |
2026 | 2027 | |
… |
… |
ShareVolume::_HandleEntryCreatedRequest(EntryCreatedRequest* request)
|
2171 | 2172 | status_t error = _GetLocalNodeID(request->directoryID, &vnida, true); |
2172 | 2173 | if (error == B_OK) |
2173 | 2174 | error = _GetLocalNodeID(request->nodeID, &vnidc, true); |
2174 | | PRINT(("ShareVolume::_HandleEntryCreatedRequest(): error: 0x%lx, name: \"%s\", dir: %lld (remote: (%ld, %lld)), node: %lld (remote: (%ld, %lld))\n", error, name, vnida, request->directoryID.volumeID, request->directoryID.nodeID, vnidc, request->nodeID.volumeID, request->nodeID.nodeID)); |
| 2175 | PRINT("ShareVolume::_HandleEntryCreatedRequest(): error: 0x%lx," |
| 2176 | " name: \"%s\", dir: %lld (remote: (%ld, %lld)), node:" |
| 2177 | " %lld (remote: (%ld, %lld))\n", error, name, vnida, |
| 2178 | request->directoryID.volumeID, |
| 2179 | request->directoryID.nodeID, vnidc, |
| 2180 | request->nodeID.volumeID, request->nodeID.nodeID); |
2175 | 2181 | |
2176 | 2182 | // send notifications / do additional processing |
2177 | 2183 | if (request->queryUpdate) { |
… |
… |
ShareVolume::_GetLocalNodeID(NodeID remoteID, ino_t* _localID, bool enter)
|
2363 | 2369 | fVolumeManager->RemoveNodeID(localID); |
2364 | 2370 | return error; |
2365 | 2371 | } |
2366 | | PRINT(("ShareVolume(%ld): added node ID mapping: local: %lld -> " |
2367 | | "remote: (%ld, %lld)\n", fID, localID, remoteID.volumeID, remoteID.nodeID)); |
| 2372 | PRINT("ShareVolume(%ld): added node ID mapping: local: %lld -> " |
| 2373 | "remote: (%ld, %lld)\n", fID, localID, remoteID.volumeID, |
| 2374 | remoteID.nodeID); |
2368 | 2375 | |
2369 | 2376 | *_localID = localID; |
2370 | 2377 | return B_OK; |
… |
… |
ShareVolume::_RemoveLocalNodeID(ino_t localID)
|
2396 | 2403 | |
2397 | 2404 | // remove from ID maps |
2398 | 2405 | NodeID remoteID = fRemoteNodeIDs->Get(localID); |
2399 | | PRINT(("ShareVolume::_RemoveLocalNodeID(%lld): remote: (%ld, %lld)\n", localID, remoteID.volumeID, remoteID.nodeID)); |
| 2406 | PRINT("ShareVolume::_RemoveLocalNodeID(%lld): remote: (%ld, %lld)\n", |
| 2407 | localID, remoteID.volumeID, remoteID.nodeID); |
2400 | 2408 | fRemoteNodeIDs->Remove(localID); |
2401 | 2409 | fLocalNodeIDs->Remove(remoteID); |
2402 | 2410 | |
… |
… |
ShareVolume::_LoadNode(const NodeInfo& nodeInfo, ShareNode** _node)
|
2463 | 2471 | delete node; |
2464 | 2472 | return error; |
2465 | 2473 | } |
2466 | | PRINT(("ShareVolume: added node: %lld: remote: (%ld, %lld), localID: %lld\n", |
2467 | | node->GetID(), node->GetRemoteID().volumeID, node->GetRemoteID().nodeID, |
2468 | | localID)); |
| 2474 | PRINT("ShareVolume: added node: %lld: remote: (%ld, %lld)," |
| 2475 | " localID: %lld\n", node->GetID(), |
| 2476 | node->GetRemoteID().volumeID, |
| 2477 | node->GetRemoteID().nodeID, localID); |
2469 | 2478 | } |
2470 | 2479 | |
2471 | 2480 | if (_node) |
… |
… |
ShareVolume::_MountShare()
|
3023 | 3032 | // get the share name |
3024 | 3033 | const char* share = shareInfo->GetShareName(); |
3025 | 3034 | |
3026 | | PRINT(("ShareVolume::_MountShare(%s, %s)\n", server, share)); |
| 3035 | PRINT("ShareVolume::_MountShare(%s, %s)\n", server, share); |
3027 | 3036 | // init a connection to the authentication server |
3028 | 3037 | AuthenticationServer authenticationServer; |
3029 | 3038 | error = authenticationServer.InitCheck(); |
… |
… |
PRINT(("ShareVolume::_MountShare(%s, %s)\n", server, share));
|
3094 | 3103 | fLocalNodeIDs->Remove(fRootNode->GetRemoteID()); |
3095 | 3104 | RETURN_ERROR(error); |
3096 | 3105 | } |
3097 | | PRINT(("ShareVolume::_MountShare(): root node: local: %lld, remote: (%ld, %lld)\n", fRootNode->GetID(), fRootNode->GetRemoteID().volumeID, fRootNode->GetRemoteID().nodeID)); |
| 3106 | PRINT("ShareVolume::_MountShare(): root node: local: %lld, remote: " |
| 3107 | "(%ld, %lld)\n", fRootNode->GetID(), |
| 3108 | fRootNode->GetRemoteID().volumeID, |
| 3109 | fRootNode->GetRemoteID().nodeID); |
3098 | 3110 | |
3099 | 3111 | // Add ourselves to the server connection, so that we can receive |
3100 | 3112 | // node monitoring events. There a race condition: We might already |
diff --git a/src/add-ons/kernel/file_systems/netfs/client/Volume.cpp b/src/add-ons/kernel/file_systems/netfs/client/Volume.cpp
index c343499..81af56d 100644
a
|
b
|
Volume::SendNotification(port_id port, int32 token, uint32 what, int32 op,
|
172 | 172 | nspace_id nsida, nspace_id nsidb, vnode_id vnida, vnode_id vnidb, |
173 | 173 | vnode_id vnidc, const char *name) |
174 | 174 | { |
175 | | PRINT(("Volume::SendNotification(%ld, %ld, 0x%lx, 0x%lx, %ld, %ld, %lld, %lld, %lld, \"%s\")\n", port, token, what, op, nsida, nsidb, vnida, vnidb, vnidc, name)); |
| 175 | PRINT("Volume::SendNotification(%ld, %ld, 0x%lx, 0x%lx, %ld, %ld, %lld," |
| 176 | " %lld, %lld, \"%s\")\n", port, token, what, op, nsida, nsidb, |
| 177 | vnida, vnidb, vnidc, name); |
176 | 178 | return send_notification(port, token, what, op, nsida, nsidb, vnida, |
177 | 179 | vnidb, vnidc, name); |
178 | 180 | } |
diff --git a/src/add-ons/kernel/file_systems/netfs/client/VolumeManager.cpp b/src/add-ons/kernel/file_systems/netfs/client/VolumeManager.cpp
index 2245ad6..df829bb 100644
a
|
b
|
VolumeManager::PutVolume(Volume* volume)
|
333 | 333 | { |
334 | 334 | AutoLocker<Locker> locker(this); |
335 | 335 | if (volume->ReleaseReference() && volume->IsRemoved()) { |
336 | | PRINT(("VolumeManager::PutVolume(%p): Removed volume unreferenced. " |
337 | | "Unmounting...\n", volume)); |
| 336 | PRINT("VolumeManager::PutVolume(%p): Removed volume " |
| 337 | "unreferenced. Unmounting...\n", volume); |
338 | 338 | // remove from volume set -- now noone can get a reference to it |
339 | 339 | // anymore |
340 | 340 | fVolumes->Remove(volume); |
diff --git a/src/add-ons/kernel/file_systems/netfs/client/netfs.cpp b/src/add-ons/kernel/file_systems/netfs/client/netfs.cpp
index fa23b48..c68a9f0 100644
a
|
b
|
netfs_unmount(void *ns)
|
224 | 224 | { |
225 | 225 | VolumeManager* volumeManager = (VolumeManager*)ns; |
226 | 226 | |
227 | | PRINT(("netfs_unmount()\n")); |
| 227 | PRINT("netfs_unmount()\n"); |
228 | 228 | |
229 | 229 | volumeManager->UnmountRootVolume(); |
230 | 230 | delete volumeManager; |
… |
… |
netfs_unmount(void *ns)
|
233 | 233 | ObjectTracker::ExitDefault(); |
234 | 234 | #endif |
235 | 235 | |
236 | | PRINT(("netfs_unmount() done\n")); |
| 236 | PRINT("netfs_unmount() done\n"); |
237 | 237 | |
238 | 238 | exit_debugging(); |
239 | 239 | return B_OK; |
… |
… |
netfs_sync(void *ns)
|
250 | 250 | Volume* volume = volumeManager->GetRootVolume(); |
251 | 251 | VolumePutter _(volume); |
252 | 252 | |
253 | | PRINT(("netfs_sync(%p)\n", ns)); |
| 253 | PRINT("netfs_sync(%p)\n", ns); |
254 | 254 | |
255 | 255 | status_t error = B_BAD_VALUE; |
256 | 256 | if (volume) |
257 | 257 | error = volume->Sync(); |
258 | 258 | |
259 | | PRINT(("netfs_sync() done: %lx \n", error)); |
| 259 | PRINT("netfs_sync() done: %lx \n", error); |
260 | 260 | |
261 | 261 | return error; |
262 | 262 | } |
… |
… |
netfs_read_fs_stat(void *ns, struct fs_info *info)
|
272 | 272 | Volume* volume = volumeManager->GetRootVolume(); |
273 | 273 | VolumePutter _(volume); |
274 | 274 | |
275 | | PRINT(("netfs_read_fs_stat(%p, %p)\n", ns, info)); |
| 275 | PRINT("netfs_read_fs_stat(%p, %p)\n", ns, info); |
276 | 276 | |
277 | 277 | status_t error = B_BAD_VALUE; |
278 | 278 | if (volume) |
279 | 279 | error = volume->ReadFSStat(info); |
280 | 280 | |
281 | | PRINT(("netfs_read_fs_stat() done: %lx \n", error)); |
| 281 | PRINT("netfs_read_fs_stat() done: %lx \n", error); |
282 | 282 | |
283 | 283 | return error; |
284 | 284 | } |
… |
… |
netfs_write_fs_stat(void *ns, struct fs_info *info, long mask)
|
294 | 294 | Volume* volume = volumeManager->GetRootVolume(); |
295 | 295 | VolumePutter _(volume); |
296 | 296 | |
297 | | PRINT(("netfs_write_fs_stat(%p, %p, %ld)\n", ns, info, mask)); |
| 297 | PRINT("netfs_write_fs_stat(%p, %p, %ld)\n", ns, info, mask); |
298 | 298 | |
299 | 299 | status_t error = B_BAD_VALUE; |
300 | 300 | if (volume) |
301 | 301 | error = volume->WriteFSStat(info, mask); |
302 | 302 | |
303 | | PRINT(("netfs_write_fs_stat() done: %lx \n", error)); |
| 303 | PRINT("netfs_write_fs_stat() done: %lx \n", error); |
304 | 304 | |
305 | 305 | return error; |
306 | 306 | } |
… |
… |
netfs_read_vnode(void *ns, vnode_id vnid, char reenter, void **node)
|
319 | 319 | Volume* volume = volumeManager->GetVolume(vnid); |
320 | 320 | VolumePutter _(volume); |
321 | 321 | |
322 | | PRINT(("netfs_read_vnode(%p, %Ld, %d, %p)\n", ns, vnid, reenter, node)); |
| 322 | PRINT("netfs_read_vnode(%p, %Ld, %d, %p)\n", ns, vnid, reenter, node); |
323 | 323 | |
324 | 324 | status_t error = B_BAD_VALUE; |
325 | 325 | if (volume) |
326 | 326 | error = volume->ReadVNode(vnid, reenter, (Node**)node); |
327 | 327 | |
328 | | PRINT(("netfs_read_vnode() done: (%lx, %p)\n", error, *node)); |
| 328 | PRINT("netfs_read_vnode() done: (%lx, %p)\n", error, *node); |
329 | 329 | |
330 | 330 | return error; |
331 | 331 | } |
… |
… |
int
|
371 | 371 | netfs_fsync(void *ns, void *_node) |
372 | 372 | { |
373 | 373 | Node* node = (Node*)_node; |
374 | | PRINT(("netfs_fsync(%p, %p)\n", ns, node)); |
| 374 | PRINT("netfs_fsync(%p, %p)\n", ns, node); |
375 | 375 | status_t error = node->GetVolume()->FSync(node); |
376 | | PRINT(("netfs_fsync() done: %lx\n", error)); |
| 376 | PRINT("netfs_fsync() done: %lx\n", error); |
377 | 377 | return error; |
378 | 378 | } |
379 | 379 | |
… |
… |
int
|
385 | 385 | netfs_read_stat(void *ns, void *_node, struct stat *st) |
386 | 386 | { |
387 | 387 | Node* node = (Node*)_node; |
388 | | PRINT(("netfs_read_stat(%p, %p, %p)\n", ns, node, st)); |
| 388 | PRINT("netfs_read_stat(%p, %p, %p)\n", ns, node, st); |
389 | 389 | status_t error = node->GetVolume()->ReadStat(node, st); |
390 | | PRINT(("netfs_read_stat() done: %lx\n", error)); |
| 390 | PRINT("netfs_read_stat() done: %lx\n", error); |
391 | 391 | return error; |
392 | 392 | } |
393 | 393 | |
… |
… |
int
|
397 | 397 | netfs_write_stat(void *ns, void *_node, struct stat *st, long mask) |
398 | 398 | { |
399 | 399 | Node* node = (Node*)_node; |
400 | | PRINT(("netfs_write_stat(%p, %p, %p, %ld)\n", ns, node, st, mask)); |
| 400 | PRINT("netfs_write_stat(%p, %p, %p, %ld)\n", ns, node, st, mask); |
401 | 401 | status_t error = node->GetVolume()->WriteStat(node, st, mask); |
402 | | PRINT(("netfs_write_stat() done: %lx\n", error)); |
| 402 | PRINT("netfs_write_stat() done: %lx\n", error); |
403 | 403 | return error; |
404 | 404 | } |
405 | 405 | |
… |
… |
int
|
409 | 409 | netfs_access(void *ns, void *_node, int mode) |
410 | 410 | { |
411 | 411 | Node* node = (Node*)_node; |
412 | | PRINT(("netfs_access(%p, %p, %d)\n", ns, node, mode)); |
| 412 | PRINT("netfs_access(%p, %p, %d)\n", ns, node, mode); |
413 | 413 | status_t error = node->GetVolume()->Access(node, mode); |
414 | | PRINT(("netfs_access() done: %lx\n", error)); |
| 414 | PRINT("netfs_access() done: %lx\n", error); |
415 | 415 | return error; |
416 | 416 | } |
417 | 417 | |
… |
… |
netfs_create(void *ns, void *_dir, const char *name, int openMode, int mode,
|
425 | 425 | vnode_id *vnid, void **cookie) |
426 | 426 | { |
427 | 427 | Node* dir = (Node*)_dir; |
428 | | PRINT(("netfs_create(%p, %p, `%s', %d, %d, %p, %p)\n", ns, dir, |
429 | | name, openMode, mode, vnid, cookie)); |
| 428 | PRINT("netfs_create(%p, %p, `%s', %d, %d, %p, %p)\n", ns, dir, |
| 429 | name, openMode, mode, vnid, cookie); |
430 | 430 | status_t error = dir->GetVolume()->Create(dir, name, openMode, mode, vnid, |
431 | 431 | cookie); |
432 | | PRINT(("netfs_create() done: (%lx, %Ld, %p)\n", error, *vnid, |
433 | | *cookie)); |
| 432 | PRINT("netfs_create() done: (%lx, %Ld, %p)\n", error, *vnid, |
| 433 | *cookie); |
434 | 434 | return error; |
435 | 435 | } |
436 | 436 | |
… |
… |
int
|
440 | 440 | netfs_open(void *ns, void *_node, int openMode, void **cookie) |
441 | 441 | { |
442 | 442 | Node* node = (Node*)_node; |
443 | | PRINT(("netfs_open(%p, %p, %d)\n", ns, node, openMode)); |
| 443 | PRINT("netfs_open(%p, %p, %d)\n", ns, node, openMode); |
444 | 444 | status_t error = node->GetVolume()->Open(node, openMode, cookie); |
445 | | PRINT(("netfs_open() done: (%lx, %p)\n", error, *cookie)); |
| 445 | PRINT("netfs_open() done: (%lx, %p)\n", error, *cookie); |
446 | 446 | return error; |
447 | 447 | } |
448 | 448 | |
… |
… |
int
|
452 | 452 | netfs_close(void *ns, void *_node, void *cookie) |
453 | 453 | { |
454 | 454 | Node* node = (Node*)_node; |
455 | | PRINT(("netfs_close(%p, %p, %p)\n", ns, node, cookie)); |
| 455 | PRINT("netfs_close(%p, %p, %p)\n", ns, node, cookie); |
456 | 456 | status_t error = node->GetVolume()->Close(node, cookie); |
457 | | PRINT(("netfs_close() done: %lx\n", error)); |
| 457 | PRINT("netfs_close() done: %lx\n", error); |
458 | 458 | return error; |
459 | 459 | } |
460 | 460 | |
… |
… |
int
|
464 | 464 | netfs_free_cookie(void *ns, void *_node, void *cookie) |
465 | 465 | { |
466 | 466 | Node* node = (Node*)_node; |
467 | | PRINT(("netfs_free_cookie(%p, %p, %p)\n", ns, node, cookie)); |
| 467 | PRINT("netfs_free_cookie(%p, %p, %p)\n", ns, node, cookie); |
468 | 468 | status_t error = node->GetVolume()->FreeCookie(node, cookie); |
469 | | PRINT(("netfs_free_cookie() done: %lx\n", error)); |
| 469 | PRINT("netfs_free_cookie() done: %lx\n", error); |
470 | 470 | return error; |
471 | 471 | } |
472 | 472 | |
… |
… |
netfs_read(void *ns, void *_node, void *cookie, off_t pos, void *buffer,
|
477 | 477 | size_t *bufferSize) |
478 | 478 | { |
479 | 479 | Node* node = (Node*)_node; |
480 | | PRINT(("netfs_read(%p, %p, %p, %Ld, %p, %lu)\n", ns, node, cookie, pos, |
481 | | buffer, *bufferSize)); |
| 480 | PRINT("netfs_read(%p, %p, %p, %Ld, %p, %lu)\n", ns, node, cookie, pos, |
| 481 | buffer, *bufferSize); |
482 | 482 | status_t error = node->GetVolume()->Read(node, cookie, pos, buffer, |
483 | 483 | *bufferSize, bufferSize); |
484 | | PRINT(("netfs_read() done: (%lx, %lu)\n", error, *bufferSize)); |
| 484 | PRINT("netfs_read() done: (%lx, %lu)\n", error, *bufferSize); |
485 | 485 | return error; |
486 | 486 | } |
487 | 487 | |
… |
… |
netfs_write(void *ns, void *_node, void *cookie, off_t pos,
|
492 | 492 | const void *buffer, size_t *bufferSize) |
493 | 493 | { |
494 | 494 | Node* node = (Node*)_node; |
495 | | PRINT(("netfs_write(%p, %p, %p, %Ld, %p, %lu)\n", ns, node, cookie, pos, |
496 | | buffer, *bufferSize)); |
| 495 | PRINT("netfs_write(%p, %p, %p, %Ld, %p, %lu)\n", ns, node, cookie, pos, |
| 496 | buffer, *bufferSize); |
497 | 497 | status_t error = node->GetVolume()->Write(node, cookie, pos, buffer, |
498 | 498 | *bufferSize, bufferSize); |
499 | | PRINT(("netfs_write() done: (%lx, %lu)\n", error, *bufferSize)); |
| 499 | PRINT("netfs_write() done: (%lx, %lu)\n", error, *bufferSize); |
500 | 500 | return error; |
501 | 501 | } |
502 | 502 | |
… |
… |
netfs_ioctl(void *ns, void *_node, void *cookie, int cmd, void *buffer,
|
507 | 507 | size_t bufferSize) |
508 | 508 | { |
509 | 509 | Node* node = (Node*)_node; |
510 | | PRINT(("netfs_ioctl(%p, %p, %p, %d, %p, %lu)\n", ns, node, cookie, cmd, |
511 | | buffer, bufferSize)); |
| 510 | PRINT("netfs_ioctl(%p, %p, %p, %d, %p, %lu)\n", ns, node, cookie, cmd, |
| 511 | buffer, bufferSize); |
512 | 512 | status_t error = node->GetVolume()->IOCtl(node, cookie, cmd, buffer, |
513 | 513 | bufferSize); |
514 | | PRINT(("netfs_ioctl() done: (%lx)\n", error)); |
| 514 | PRINT("netfs_ioctl() done: (%lx)\n", error); |
515 | 515 | return error; |
516 | 516 | } |
517 | 517 | |
… |
… |
netfs_link(void *ns, void *_dir, const char *name, void *_node)
|
537 | 537 | { |
538 | 538 | Node* dir = (Node*)_dir; |
539 | 539 | Node* node = (Node*)_node; |
540 | | PRINT(("netfs_link(%p, %p, `%s', %p)\n", ns, dir, name, node)); |
| 540 | PRINT("netfs_link(%p, %p, `%s', %p)\n", ns, dir, name, node); |
541 | 541 | status_t error = dir->GetVolume()->Link(dir, name, node); |
542 | | PRINT(("netfs_link() done: (%lx)\n", error)); |
| 542 | PRINT("netfs_link() done: (%lx)\n", error); |
543 | 543 | return error; |
544 | 544 | } |
545 | 545 | |
… |
… |
int
|
549 | 549 | netfs_unlink(void *ns, void *_dir, const char *name) |
550 | 550 | { |
551 | 551 | Node* dir = (Node*)_dir; |
552 | | PRINT(("netfs_unlink(%p, %p, `%s')\n", ns, dir, name)); |
| 552 | PRINT("netfs_unlink(%p, %p, `%s')\n", ns, dir, name); |
553 | 553 | status_t error = dir->GetVolume()->Unlink(dir, name); |
554 | | PRINT(("netfs_unlink() done: (%lx)\n", error)); |
| 554 | PRINT("netfs_unlink() done: (%lx)\n", error); |
555 | 555 | return error; |
556 | 556 | } |
557 | 557 | |
… |
… |
int
|
561 | 561 | netfs_symlink(void *ns, void *_dir, const char *name, const char *path) |
562 | 562 | { |
563 | 563 | Node* dir = (Node*)_dir; |
564 | | PRINT(("netfs_symlink(%p, %p, `%s', `%s')\n", ns, dir, name, path)); |
| 564 | PRINT("netfs_symlink(%p, %p, `%s', `%s')\n", ns, dir, name, path); |
565 | 565 | status_t error = dir->GetVolume()->Symlink(dir, name, path); |
566 | | PRINT(("netfs_symlink() done: (%lx)\n", error)); |
| 566 | PRINT("netfs_symlink() done: (%lx)\n", error); |
567 | 567 | return error; |
568 | 568 | } |
569 | 569 | |
… |
… |
int
|
573 | 573 | netfs_read_link(void *ns, void *_node, char *buffer, size_t *bufferSize) |
574 | 574 | { |
575 | 575 | Node* node = (Node*)_node; |
576 | | PRINT(("netfs_read_link(%p, %p, %p, %lu)\n", ns, node, buffer, |
577 | | *bufferSize)); |
| 576 | PRINT("netfs_read_link(%p, %p, %p, %lu)\n", ns, node, buffer, |
| 577 | *bufferSize); |
578 | 578 | status_t error = node->GetVolume()->ReadLink(node, buffer, *bufferSize, |
579 | 579 | bufferSize); |
580 | | PRINT(("netfs_read_link() done: (%lx, %lu)\n", error, *bufferSize)); |
| 580 | PRINT("netfs_read_link() done: (%lx, %lu)\n", error, *bufferSize); |
581 | 581 | return error; |
582 | 582 | } |
583 | 583 | |
… |
… |
netfs_rename(void *ns, void *_oldDir, const char *oldName, void *_newDir,
|
589 | 589 | { |
590 | 590 | Node* oldDir = (Node*)_oldDir; |
591 | 591 | Node* newDir = (Node*)_newDir; |
592 | | PRINT(("netfs_rename(%p, %p, `%s', %p, `%s')\n", ns, oldDir, oldName, |
593 | | newDir, newName)); |
| 592 | PRINT("netfs_rename(%p, %p, `%s', %p, `%s')\n", ns, oldDir, oldName, |
| 593 | newDir, newName); |
594 | 594 | status_t error = oldDir->GetVolume()->Rename(oldDir, oldName, |
595 | 595 | newDir, newName); |
596 | | PRINT(("netfs_rename() done: (%lx)\n", error)); |
| 596 | PRINT("netfs_rename() done: (%lx)\n", error); |
597 | 597 | return error; |
598 | 598 | } |
599 | 599 | |
… |
… |
int
|
606 | 606 | netfs_mkdir(void *ns, void *_dir, const char *name, int mode) |
607 | 607 | { |
608 | 608 | Node* dir = (Node*)_dir; |
609 | | PRINT(("netfs_mkdir(%p, %p, `%s', %d)\n", ns, dir, name, mode)); |
| 609 | PRINT("netfs_mkdir(%p, %p, `%s', %d)\n", ns, dir, name, mode); |
610 | 610 | status_t error = dir->GetVolume()->MkDir(dir, name, mode); |
611 | | PRINT(("netfs_mkdir() done: (%lx)\n", error)); |
| 611 | PRINT("netfs_mkdir() done: (%lx)\n", error); |
612 | 612 | return error; |
613 | 613 | } |
614 | 614 | |
… |
… |
int
|
618 | 618 | netfs_rmdir(void *ns, void *_dir, const char *name) |
619 | 619 | { |
620 | 620 | Node* dir = (Node*)_dir; |
621 | | PRINT(("netfs_rmdir(%p, %p, `%s')\n", ns, dir, name)); |
| 621 | PRINT("netfs_rmdir(%p, %p, `%s')\n", ns, dir, name); |
622 | 622 | status_t error = dir->GetVolume()->RmDir(dir, name); |
623 | | PRINT(("netfs_rmdir() done: (%lx)\n", error)); |
| 623 | PRINT("netfs_rmdir() done: (%lx)\n", error); |
624 | 624 | return error; |
625 | 625 | } |
626 | 626 | |
… |
… |
int
|
630 | 630 | netfs_open_dir(void *ns, void *_node, void **cookie) |
631 | 631 | { |
632 | 632 | Node* node = (Node*)_node; |
633 | | PRINT(("netfs_open_dir(%p, %p)\n", ns, node)); |
| 633 | PRINT("netfs_open_dir(%p, %p)\n", ns, node); |
634 | 634 | status_t error = node->GetVolume()->OpenDir(node, cookie); |
635 | | PRINT(("netfs_open_dir() done: (%lx, %p)\n", error, *cookie)); |
| 635 | PRINT("netfs_open_dir() done: (%lx, %p)\n", error, *cookie); |
636 | 636 | return error; |
637 | 637 | } |
638 | 638 | |
… |
… |
int
|
642 | 642 | netfs_close_dir(void *ns, void *_node, void *cookie) |
643 | 643 | { |
644 | 644 | Node* node = (Node*)_node; |
645 | | PRINT(("netfs_close_dir(%p, %p, %p)\n", ns, node, cookie)); |
| 645 | PRINT("netfs_close_dir(%p, %p, %p)\n", ns, node, cookie); |
646 | 646 | status_t error = node->GetVolume()->CloseDir(node, cookie); |
647 | | PRINT(("netfs_close_dir() done: %lx\n", error)); |
| 647 | PRINT("netfs_close_dir() done: %lx\n", error); |
648 | 648 | return error; |
649 | 649 | } |
650 | 650 | |
… |
… |
int
|
654 | 654 | netfs_free_dir_cookie(void *ns, void *_node, void *cookie) |
655 | 655 | { |
656 | 656 | Node* node = (Node*)_node; |
657 | | PRINT(("netfs_free_dir_cookie(%p, %p, %p)\n", ns, node, cookie)); |
| 657 | PRINT("netfs_free_dir_cookie(%p, %p, %p)\n", ns, node, cookie); |
658 | 658 | status_t error = node->GetVolume()->FreeDirCookie(node, cookie); |
659 | | PRINT(("netfs_free_dir_cookie() done: %lx \n", error)); |
| 659 | PRINT("netfs_free_dir_cookie() done: %lx \n", error); |
660 | 660 | return error; |
661 | 661 | } |
662 | 662 | |
… |
… |
netfs_read_dir(void *ns, void *_node, void *cookie, long *count,
|
667 | 667 | struct dirent *buffer, size_t bufferSize) |
668 | 668 | { |
669 | 669 | Node* node = (Node*)_node; |
670 | | PRINT(("netfs_read_dir(%p, %p, %p, %ld, %p, %lu)\n", ns, node, cookie, |
671 | | *count, buffer, bufferSize)); |
| 670 | PRINT("netfs_read_dir(%p, %p, %p, %ld, %p, %lu)\n", ns, node, cookie, |
| 671 | *count, buffer, bufferSize); |
672 | 672 | status_t error = node->GetVolume()->ReadDir(node, cookie, buffer, |
673 | 673 | bufferSize, *count, count); |
674 | | PRINT(("netfs_read_dir() done: (%lx, %ld)\n", error, *count)); |
| 674 | PRINT("netfs_read_dir() done: (%lx, %ld)\n", error, *count); |
675 | 675 | #if DEBUG |
676 | 676 | dirent* entry = buffer; |
677 | 677 | for (int32 i = 0; i < *count; i++) { |
… |
… |
netfs_read_dir(void *ns, void *_node, void *cookie, long *count,
|
681 | 681 | int nameLen = strnlen(entry->d_name, B_FILE_NAME_LENGTH - 1); |
682 | 682 | strncpy(name, entry->d_name, nameLen); |
683 | 683 | name[nameLen] = '\0'; |
684 | | PRINT((" entry: d_dev: %ld, d_pdev: %ld, d_ino: %Ld, d_pino: %Ld, " |
685 | | "d_reclen: %hu, d_name: `%s'\n", |
686 | | entry->d_dev, entry->d_pdev, entry->d_ino, entry->d_pino, |
687 | | entry->d_reclen, name)); |
| 684 | PRINT(" entry: d_dev: %ld, d_pdev: %ld, d_ino: %Ld," |
| 685 | " d_pino: %Ld, d_reclen: %hu, d_name: `%s'\n", |
| 686 | entry->d_dev, entry->d_pdev, entry->d_ino, |
| 687 | entry->d_pino, entry->d_reclen, name); |
688 | 688 | entry = (dirent*)((char*)entry + entry->d_reclen); |
689 | 689 | } |
690 | 690 | #endif |
… |
… |
int
|
698 | 698 | netfs_rewind_dir(void *ns, void *_node, void *cookie) |
699 | 699 | { |
700 | 700 | Node* node = (Node*)_node; |
701 | | PRINT(("netfs_rewind_dir(%p, %p, %p)\n", ns, node, cookie)); |
| 701 | PRINT("netfs_rewind_dir(%p, %p, %p)\n", ns, node, cookie); |
702 | 702 | status_t error = node->GetVolume()->RewindDir(node, cookie); |
703 | | PRINT(("netfs_rewind_dir() done: %lx\n", error)); |
| 703 | PRINT("netfs_rewind_dir() done: %lx\n", error); |
704 | 704 | return error; |
705 | 705 | } |
706 | 706 | |
… |
… |
netfs_walk(void *ns, void *_dir, const char *entryName,
|
711 | 711 | char **resolvedPath, vnode_id *vnid) |
712 | 712 | { |
713 | 713 | Node* dir = (Node*)_dir; |
714 | | PRINT(("netfs_walk(%p, %p, `%s', %p, %p)\n", ns, dir, |
715 | | entryName, resolvedPath, vnid)); |
| 714 | PRINT("netfs_walk(%p, %p, `%s', %p, %p)\n", ns, dir, |
| 715 | entryName, resolvedPath, vnid); |
716 | 716 | status_t error = dir->GetVolume()->Walk(dir, entryName, resolvedPath, vnid); |
717 | | PRINT(("netfs_walk() done: (%lx, `%s', %Ld)\n", error, |
718 | | (resolvedPath ? *resolvedPath : NULL), *vnid)); |
| 717 | PRINT("netfs_walk() done: (%lx, `%s', %Ld)\n", error, |
| 718 | (resolvedPath ? *resolvedPath : NULL), *vnid); |
719 | 719 | return error; |
720 | 720 | } |
721 | 721 | |
… |
… |
int
|
728 | 728 | netfs_open_attrdir(void *ns, void *_node, void **cookie) |
729 | 729 | { |
730 | 730 | Node* node = (Node*)_node; |
731 | | PRINT(("netfs_open_attrdir(%p, %p)\n", ns, node)); |
| 731 | PRINT("netfs_open_attrdir(%p, %p)\n", ns, node); |
732 | 732 | status_t error = node->GetVolume()->OpenAttrDir(node, cookie); |
733 | | PRINT(("netfs_open_attrdir() done: (%lx, %p)\n", error, *cookie)); |
| 733 | PRINT("netfs_open_attrdir() done: (%lx, %p)\n", error, *cookie); |
734 | 734 | return error; |
735 | 735 | } |
736 | 736 | |
… |
… |
int
|
740 | 740 | netfs_close_attrdir(void *ns, void *_node, void *cookie) |
741 | 741 | { |
742 | 742 | Node* node = (Node*)_node; |
743 | | PRINT(("netfs_close_attrdir(%p, %p, %p)\n", ns, node, cookie)); |
| 743 | PRINT("netfs_close_attrdir(%p, %p, %p)\n", ns, node, cookie); |
744 | 744 | status_t error = node->GetVolume()->CloseAttrDir(node, cookie); |
745 | | PRINT(("netfs_close_attrdir() done: (%lx)\n", error)); |
| 745 | PRINT("netfs_close_attrdir() done: (%lx)\n", error); |
746 | 746 | return error; |
747 | 747 | } |
748 | 748 | |
… |
… |
int
|
752 | 752 | netfs_free_attrdir_cookie(void *ns, void *_node, void *cookie) |
753 | 753 | { |
754 | 754 | Node* node = (Node*)_node; |
755 | | PRINT(("netfs_free_attrdir_cookie(%p, %p, %p)\n", ns, node, cookie)); |
| 755 | PRINT("netfs_free_attrdir_cookie(%p, %p, %p)\n", ns, node, cookie); |
756 | 756 | status_t error = node->GetVolume()->FreeAttrDirCookie(node, cookie); |
757 | | PRINT(("netfs_free_attrdir_cookie() done: (%lx)\n", error)); |
| 757 | PRINT("netfs_free_attrdir_cookie() done: (%lx)\n", error); |
758 | 758 | return error; |
759 | 759 | } |
760 | 760 | |
… |
… |
netfs_read_attrdir(void *ns, void *_node, void *cookie, long *count,
|
765 | 765 | struct dirent *buffer, size_t bufferSize) |
766 | 766 | { |
767 | 767 | Node* node = (Node*)_node; |
768 | | PRINT(("netfs_read_attrdir(%p, %p, %p, %ld, %p, %lu)\n", ns, node, |
769 | | cookie, *count, buffer, bufferSize)); |
| 768 | PRINT("netfs_read_attrdir(%p, %p, %p, %ld, %p, %lu)\n", ns, node, |
| 769 | cookie, *count, buffer, bufferSize); |
770 | 770 | status_t error = node->GetVolume()->ReadAttrDir(node, cookie, buffer, |
771 | 771 | bufferSize, *count, count); |
772 | | PRINT(("netfs_read_attrdir() done: (%lx, %ld)\n", error, *count)); |
| 772 | PRINT("netfs_read_attrdir() done: (%lx, %ld)\n", error, *count); |
773 | 773 | return error; |
774 | 774 | } |
775 | 775 | |
… |
… |
int
|
779 | 779 | netfs_rewind_attrdir(void *ns, void *_node, void *cookie) |
780 | 780 | { |
781 | 781 | Node* node = (Node*)_node; |
782 | | PRINT(("netfs_rewind_attrdir(%p, %p, %p)\n", ns, node, cookie)); |
| 782 | PRINT("netfs_rewind_attrdir(%p, %p, %p)\n", ns, node, cookie); |
783 | 783 | status_t error = node->GetVolume()->RewindAttrDir(node, cookie); |
784 | | PRINT(("netfs_rewind_attrdir() done: (%lx)\n", error)); |
| 784 | PRINT("netfs_rewind_attrdir() done: (%lx)\n", error); |
785 | 785 | return error; |
786 | 786 | } |
787 | 787 | |
… |
… |
netfs_read_attr(void *ns, void *_node, const char *name, int type,
|
792 | 792 | void *buffer, size_t *bufferSize, off_t pos) |
793 | 793 | { |
794 | 794 | Node* node = (Node*)_node; |
795 | | PRINT(("netfs_read_attr(%p, %p, `%s', %d, %p, %lu, %Ld)\n", ns, node, |
796 | | name, type, buffer, *bufferSize, pos)); |
| 795 | PRINT("netfs_read_attr(%p, %p, `%s', %d, %p, %lu, %Ld)\n", ns, node, |
| 796 | name, type, buffer, *bufferSize, pos); |
797 | 797 | status_t error = node->GetVolume()->ReadAttr(node, name, type, pos, buffer, |
798 | 798 | *bufferSize, bufferSize); |
799 | | PRINT(("netfs_read_attr() done: (%lx, %ld)\n", error, *bufferSize)); |
| 799 | PRINT("netfs_read_attr() done: (%lx, %ld)\n", error, *bufferSize); |
800 | 800 | return error; |
801 | 801 | } |
802 | 802 | |
… |
… |
netfs_write_attr(void *ns, void *_node, const char *name, int type,
|
807 | 807 | const void *buffer, size_t *bufferSize, off_t pos) |
808 | 808 | { |
809 | 809 | Node* node = (Node*)_node; |
810 | | PRINT(("netfs_write_attr(%p, %p, `%s', %d, %p, %lu, %Ld)\n", ns, node, |
811 | | name, type, buffer, *bufferSize, pos)); |
| 810 | PRINT("netfs_write_attr(%p, %p, `%s', %d, %p, %lu, %Ld)\n", ns, node, |
| 811 | name, type, buffer, *bufferSize, pos); |
812 | 812 | status_t error = node->GetVolume()->WriteAttr(node, name, type, pos, buffer, |
813 | 813 | *bufferSize, bufferSize); |
814 | | PRINT(("netfs_write_attr() done: (%lx, %ld)\n", error, *bufferSize)); |
| 814 | PRINT("netfs_write_attr() done: (%lx, %ld)\n", error, *bufferSize); |
815 | 815 | return error; |
816 | 816 | } |
817 | 817 | |
… |
… |
int
|
821 | 821 | netfs_remove_attr(void *ns, void *_node, const char *name) |
822 | 822 | { |
823 | 823 | Node* node = (Node*)_node; |
824 | | PRINT(("netfs_remove_attr(%p, %p, `%s')\n", ns, node, name)); |
| 824 | PRINT("netfs_remove_attr(%p, %p, `%s')\n", ns, node, name); |
825 | 825 | status_t error = node->GetVolume()->RemoveAttr(node, name); |
826 | | PRINT(("netfs_remove_attr() done: (%lx)\n", error)); |
| 826 | PRINT("netfs_remove_attr() done: (%lx)\n", error); |
827 | 827 | return error; |
828 | 828 | } |
829 | 829 | |
… |
… |
netfs_rename_attr(void *ns, void *_node, const char *oldName,
|
834 | 834 | const char *newName) |
835 | 835 | { |
836 | 836 | Node* node = (Node*)_node; |
837 | | PRINT(("netfs_rename_attr(%p, %p, `%s', `%s')\n", ns, node, oldName, |
838 | | newName)); |
| 837 | PRINT("netfs_rename_attr(%p, %p, `%s', `%s')\n", ns, node, oldName, |
| 838 | newName); |
839 | 839 | status_t error = node->GetVolume()->RenameAttr(node, oldName, newName); |
840 | | PRINT(("netfs_rename_attr() done: (%lx)\n", error)); |
| 840 | PRINT("netfs_rename_attr() done: (%lx)\n", error); |
841 | 841 | return error; |
842 | 842 | } |
843 | 843 | |
… |
… |
netfs_stat_attr(void *ns, void *_node, const char *name,
|
848 | 848 | struct attr_info *attrInfo) |
849 | 849 | { |
850 | 850 | Node* node = (Node*)_node; |
851 | | PRINT(("netfs_stat_attr(%p, %p, `%s', %p)\n", ns, node, name, |
852 | | attrInfo)); |
| 851 | PRINT("netfs_stat_attr(%p, %p, `%s', %p)\n", ns, node, name, |
| 852 | attrInfo); |
853 | 853 | status_t error = node->GetVolume()->StatAttr(node, name, attrInfo); |
854 | | PRINT(("netfs_stat_attr() done: (%lx)\n", error)); |
| 854 | PRINT("netfs_stat_attr() done: (%lx)\n", error); |
855 | 855 | return error; |
856 | 856 | } |
857 | 857 | |
… |
… |
netfs_open_query(void *ns, const char *queryString, ulong flags,
|
868 | 868 | Volume* volume = volumeManager->GetRootVolume(); |
869 | 869 | VolumePutter _(volume); |
870 | 870 | |
871 | | PRINT(("netfs_open_query(%p, `%s', %lu, %ld, %ld, %p)\n", ns, |
872 | | queryString, flags, port, token, cookie)); |
| 871 | PRINT("netfs_open_query(%p, `%s', %lu, %ld, %ld, %p)\n", ns, |
| 872 | queryString, flags, port, token, cookie); |
873 | 873 | |
874 | 874 | status_t error = B_BAD_VALUE; |
875 | 875 | if (volume) { |
… |
… |
netfs_open_query(void *ns, const char *queryString, ulong flags,
|
877 | 877 | (QueryIterator**)cookie); |
878 | 878 | } |
879 | 879 | |
880 | | PRINT(("netfs_open_query() done: (%lx, %p)\n", error, *cookie)); |
| 880 | PRINT("netfs_open_query() done: (%lx, %p)\n", error, *cookie); |
881 | 881 | return error; |
882 | 882 | } |
883 | 883 | |
… |
… |
static
|
886 | 886 | int |
887 | 887 | netfs_close_query(void *ns, void *cookie) |
888 | 888 | { |
889 | | PRINT(("netfs_close_query(%p, %p)\n", ns, cookie)); |
| 889 | PRINT("netfs_close_query(%p, %p)\n", ns, cookie); |
890 | 890 | |
891 | 891 | status_t error = B_OK; |
892 | 892 | // no-op: we don't use this hook |
893 | 893 | |
894 | | PRINT(("netfs_close_query() done: (%lx)\n", error)); |
| 894 | PRINT("netfs_close_query() done: (%lx)\n", error); |
895 | 895 | return error; |
896 | 896 | } |
897 | 897 | |
… |
… |
netfs_free_query_cookie(void *ns, void *node, void *cookie)
|
903 | 903 | VolumeManager* volumeManager = (VolumeManager*)ns; |
904 | 904 | QueryIterator* iterator = (QueryIterator*)cookie; |
905 | 905 | |
906 | | PRINT(("netfs_free_query_cookie(%p, %p)\n", ns, cookie)); |
| 906 | PRINT("netfs_free_query_cookie(%p, %p)\n", ns, cookie); |
907 | 907 | |
908 | 908 | status_t error = B_OK; |
909 | 909 | volumeManager->GetQueryManager()->PutIterator(iterator); |
910 | 910 | |
911 | | PRINT(("netfs_free_query_cookie() done: (%lx)\n", error)); |
| 911 | PRINT("netfs_free_query_cookie() done: (%lx)\n", error); |
912 | 912 | return error; |
913 | 913 | } |
914 | 914 | |
… |
… |
netfs_read_query(void *ns, void *cookie, long *count,
|
923 | 923 | QueryIterator* iterator = (QueryIterator*)cookie; |
924 | 924 | VolumePutter _(volume); |
925 | 925 | |
926 | | PRINT(("netfs_read_query(%p, %p, %ld, %p, %lu)\n", ns, cookie, |
927 | | *count, buffer, bufferSize)); |
| 926 | PRINT("netfs_read_query(%p, %p, %ld, %p, %lu)\n", ns, cookie, |
| 927 | *count, buffer, bufferSize); |
928 | 928 | |
929 | 929 | status_t error = B_BAD_VALUE; |
930 | 930 | if (volume) { |
… |
… |
netfs_read_query(void *ns, void *cookie, long *count,
|
932 | 932 | *count, count); |
933 | 933 | } |
934 | 934 | |
935 | | PRINT(("netfs_read_query() done: (%lx, %ld)\n", error, *count)); |
| 935 | PRINT("netfs_read_query() done: (%lx, %ld)\n", error, *count); |
936 | 936 | return error; |
937 | 937 | } |
938 | 938 | |
diff --git a/src/add-ons/kernel/file_systems/netfs/server/ClientConnection.cpp b/src/add-ons/kernel/file_systems/netfs/server/ClientConnection.cpp
index 8e2bd1d..efd6d86 100644
a
|
b
|
ClientConnection::VisitOpenDirRequest(OpenDirRequest* request)
|
1612 | 1612 | } |
1613 | 1613 | else { |
1614 | 1614 | if (directory) |
1615 | | PRINT(("OpenDir() failed: client volume: %ld, node: (%ld, %lld)\n", |
1616 | | volume->GetID(), directory->GetVolumeID(), directory->GetID())); |
| 1615 | PRINT("OpenDir() failed: client volume: %ld, node: (%ld, %lld)\n", |
| 1616 | volume->GetID(), directory->GetVolumeID(), directory->GetID()); |
1617 | 1617 | } |
1618 | 1618 | |
1619 | 1619 | managerLocker.Unlock(); |
… |
… |
ClientConnection::VisitReadDirRequest(ReadDirRequest* request)
|
1679 | 1679 | } |
1680 | 1680 | |
1681 | 1681 | if (result == B_OK) { |
1682 | | PRINT(("ReadDir: (%ld, %lld)\n", request->volumeID, directory->GetID())); |
| 1682 | PRINT("ReadDir: (%ld, %lld)\n", request->volumeID, directory->GetID()); |
1683 | 1683 | } |
1684 | 1684 | |
1685 | 1685 | // rewind, if requested |
… |
… |
PRINT(("ReadDir: (%ld, %lld)\n", request->volumeID, directory->GetID()));
|
1713 | 1713 | //reply.entryInfo.directoryID, |
1714 | 1714 | //reply.entryInfo.nodeID, reply.entryInfo.name.GetString())); |
1715 | 1715 | if (directory) { |
1716 | | PRINT(("ReadDir done: volume: %ld, (%ld, %lld) -> (%lx, %ld)\n", |
| 1716 | PRINT("ReadDir done: volume: %ld, (%ld, %lld) -> (%lx, %ld)\n", |
1717 | 1717 | volume->GetID(), directory->GetVolumeID(), directory->GetID(), result, |
1718 | | reply.entryInfos.CountElements())); |
| 1718 | reply.entryInfos.CountElements()); |
1719 | 1719 | } |
1720 | 1720 | |
1721 | 1721 | managerLocker.Unlock(); |
… |
… |
ClientConnection::VisitWalkRequest(WalkRequest* request)
|
1789 | 1789 | |
1790 | 1790 | // send the reply |
1791 | 1791 | reply.error = result; |
1792 | | PRINT(("Walk: (%ld, %lld, `%s') -> (%lx, (%ld, %lld), `%s')\n", |
1793 | | request->nodeID.volumeID, request->nodeID.nodeID, request->name.GetString(), |
1794 | | result, reply.entryInfo.nodeInfo.st.st_dev, reply.entryInfo.nodeInfo.st.st_ino, |
1795 | | reply.linkPath.GetString())); |
| 1792 | PRINT("Walk: (%ld, %lld, `%s') -> (%lx, (%ld, %lld), `%s')\n", |
| 1793 | request->nodeID.volumeID, request->nodeID.nodeID, |
| 1794 | request->name.GetString(), result, |
| 1795 | reply.entryInfo.nodeInfo.st.st_dev, |
| 1796 | reply.entryInfo.nodeInfo.st.st_ino, reply.linkPath.GetString()); |
1796 | 1797 | return GetChannel()->SendRequest(&reply); |
1797 | 1798 | } |
1798 | 1799 | |
… |
… |
ClientConnection::VisitMultiWalkRequest(MultiWalkRequest* request)
|
1854 | 1855 | |
1855 | 1856 | // send the reply |
1856 | 1857 | reply.error = result; |
1857 | | PRINT(("MultiWalk: (%ld, %lld, %ld) -> (%lx, %ld)\n", |
1858 | | request->nodeID.volumeID, request->nodeID.nodeID, count, |
1859 | | result, reply.entryInfos.CountElements())); |
| 1858 | PRINT("MultiWalk: (%ld, %lld, %ld) -> (%lx, %ld)\n", |
| 1859 | request->nodeID.volumeID, request->nodeID.nodeID, count, |
| 1860 | result, reply.entryInfos.CountElements()); |
1860 | 1861 | return GetChannel()->SendRequest(&reply); |
1861 | 1862 | } |
1862 | 1863 | |
… |
… |
ClientConnection::VisitReadQueryRequest(ReadQueryRequest* request)
|
2434 | 2435 | break; |
2435 | 2436 | if (countRead == 0) |
2436 | 2437 | break; |
2437 | | PRINT((" query entry: %ld, %lld, \"%s\"\n", dirEntry->d_pdev, dirEntry->d_pino, dirEntry->d_name)); |
| 2438 | PRINT(" query entry: %ld, %lld, \"%s\"\n", |
| 2439 | dirEntry->d_pdev, dirEntry->d_pino, dirEntry->d_name); |
2438 | 2440 | |
2439 | 2441 | VolumeManagerLocker managerLocker; |
2440 | 2442 | VolumeManager* volumeManager = VolumeManager::GetDefault(); |
… |
… |
PRINT((" -> no client volumes\n"));
|
2473 | 2475 | // send the reply |
2474 | 2476 | reply.error = result; |
2475 | 2477 | reply.count = countRead; |
2476 | | PRINT(("ReadQuery: (%lx, %ld, dir: (%ld, %lld), node: (%ld, %lld, `%s')\n", |
2477 | | reply.error, reply.count, reply.entryInfo.directoryID.volumeID, |
2478 | | reply.entryInfo.directoryID.nodeID, reply.entryInfo.nodeInfo.st.st_dev, |
2479 | | reply.entryInfo.nodeInfo.st.st_ino, reply.entryInfo.name.GetString())); |
| 2478 | PRINT("ReadQuery: (%lx, %ld, dir: (%ld, %lld), node: (%ld, %lld, `%s')" |
| 2479 | "\n", reply.error, reply.count, |
| 2480 | reply.entryInfo.directoryID.volumeID, |
| 2481 | reply.entryInfo.directoryID.nodeID, |
| 2482 | reply.entryInfo.nodeInfo.st.st_dev, |
| 2483 | reply.entryInfo.nodeInfo.st.st_ino, |
| 2484 | reply.entryInfo.name.GetString()); |
2480 | 2485 | return GetChannel()->SendRequest(&reply); |
2481 | 2486 | } |
2482 | 2487 | |
… |
… |
ClientConnection::ProcessQueryEvent(NodeMonitoringEvent* event)
|
2570 | 2575 | event->opcode); |
2571 | 2576 | return; |
2572 | 2577 | } |
2573 | | PRINT(("ClientConnection::ProcessQueryEvent(): event: %p, type: %s: directory: (%ld, %lld)\n", event, typeid(event).name(), volumeID, directoryID)); |
| 2578 | PRINT("ClientConnection::ProcessQueryEvent(): event: %p, type: %s:" |
| 2579 | " directory: (%ld, %lld)\n", event, typeid(event).name(), |
| 2580 | volumeID, directoryID); |
2574 | 2581 | |
2575 | 2582 | // create an array for the IDs of the client volumes a found entry may |
2576 | 2583 | // reside on |
diff --git a/src/add-ons/kernel/file_systems/netfs/server/NetFSServer.cpp b/src/add-ons/kernel/file_systems/netfs/server/NetFSServer.cpp
index b425c67..4b067eb 100644
a
|
b
|
NetFSServer::_AddClientConnection(ClientConnection* clientConnection)
|
764 | 764 | void |
765 | 765 | NetFSServer::ClientConnectionClosed(ClientConnection* connection, bool broken) |
766 | 766 | { |
767 | | PRINT(("NetFSServer::ClientConnectionClosed(%d)\n", broken)); |
| 767 | PRINT("NetFSServer::ClientConnectionClosed(%d)\n", broken); |
768 | 768 | if (!connection) |
769 | 769 | return; |
770 | 770 | AutoLocker<Locker> locker(fLock); |
diff --git a/src/add-ons/kernel/file_systems/netfs/server/NodeMonitor.cpp b/src/add-ons/kernel/file_systems/netfs/server/NodeMonitor.cpp
index 4fa396c..9948f07 100644
a
|
b
|
NodeMonitor::StartWatching(const node_ref& ref)
|
102 | 102 | error = watch_node(&ref, flags, this); |
103 | 103 | } |
104 | 104 | if (error == B_OK) { |
105 | | PRINT(("NodeMonitor: started watching node: (%ld, %lld)\n", ref.device, |
106 | | ref.node)); |
| 105 | PRINT("NodeMonitor: started watching node: (%ld, %lld)\n", ref.device, |
| 106 | ref.node); |
107 | 107 | } |
108 | 108 | return error; |
109 | 109 | } |
… |
… |
ref.node));
|
112 | 112 | status_t |
113 | 113 | NodeMonitor::StopWatching(const node_ref& ref) |
114 | 114 | { |
115 | | PRINT(("NodeMonitor: stopped watching node: (%ld, %lld)\n", ref.device, |
116 | | ref.node)); |
| 115 | PRINT("NodeMonitor: stopped watching node: (%ld, %lld)\n", ref.device, |
| 116 | ref.node); |
117 | 117 | return watch_node(&ref, B_STOP_WATCHING, this); |
118 | 118 | } |
119 | 119 | |
diff --git a/src/add-ons/kernel/file_systems/netfs/server/VolumeManager.cpp b/src/add-ons/kernel/file_systems/netfs/server/VolumeManager.cpp
index f964b54..f180e22 100644
a
|
b
|
VolumeManager::LoadEntry(dev_t volumeID, ino_t directoryID, const char* name,
|
719 | 719 | Entry* entry = GetEntry(volumeID, directoryID, name); |
720 | 720 | if (!entry) { |
721 | 721 | // entry not known yet: create it |
722 | | PRINT(("VolumeManager::LoadEntry(%ld, %lld, `%s')\n", volumeID, directoryID, |
723 | | name)); |
| 722 | PRINT("VolumeManager::LoadEntry(%ld, %lld, `%s')\n", volumeID, |
| 723 | directoryID, name); |
724 | 724 | |
725 | 725 | // get the volume |
726 | 726 | Volume* volume = GetVolume(volumeID, true); |
… |
… |
VolumeManager::OpenQuery(QueryDomain* queryDomain, const char* queryString,
|
791 | 791 | if (!queryDomain || !queryString || !handle) |
792 | 792 | return B_BAD_VALUE; |
793 | 793 | bool liveQuery = (flags & B_LIVE_QUERY); |
794 | | PRINT(("VolumeManager::OpenQuery(%p, \"%s\", 0x%lx, %ld, %ld)\n", queryDomain, queryString, flags, remotePort, remoteToken)); |
| 794 | PRINT("VolumeManager::OpenQuery(%p, \"%s\", 0x%lx, %ld, %ld)\n", |
| 795 | queryDomain, queryString, flags, remotePort, remoteToken); |
795 | 796 | |
796 | 797 | // allocate the handle |
797 | 798 | QueryHandle* queryHandle = new(std::nothrow) QueryHandle(remotePort, |
… |
… |
PRINT(("VolumeManager::OpenQuery(%p, \"%s\", 0x%lx, %ld, %ld)\n", queryDomain, q
|
826 | 827 | // branches of the FS tree and don't have common nodes. |
827 | 828 | if (!queryDomain->QueryDomainIntersectsWith(volume)) |
828 | 829 | continue; |
829 | | PRINT(("VolumeManager::OpenQuery(): adding Query for volume %ld\n", volume->GetID())); |
| 830 | PRINT("VolumeManager::OpenQuery(): adding Query for volume %ld" |
| 831 | "\n", volume->GetID()); |
830 | 832 | |
831 | 833 | // create the query for this volume |
832 | 834 | BVolume bVolume(volume->GetID()); |
… |
… |
VolumeManager::_CheckVolumeRootMoved(EntryMovedEvent* event)
|
1708 | 1710 | event->nodeID = st.st_ino; |
1709 | 1711 | if (Volume* volume = GetVolume(st.st_dev)) { |
1710 | 1712 | if (volume->GetRootID() == st.st_ino) { |
1711 | | PRINT(("Mount point for volume %ld renamed\n", |
1712 | | volume->GetID())); |
| 1713 | PRINT("Mount point for volume %ld renamed\n", |
| 1714 | volume->GetID()); |
1713 | 1715 | } |
1714 | 1716 | } |
1715 | 1717 | } |
diff --git a/src/add-ons/kernel/file_systems/netfs/shared/InsecureConnection.cpp b/src/add-ons/kernel/file_systems/netfs/shared/InsecureConnection.cpp
index 1c3090a..253e5e0 100644
a
|
b
|
PRINT(("InsecureConnection::Init\n"));
|
161 | 161 | // open the remaining channels |
162 | 162 | int32 allChannels = upStreamChannels + downStreamChannels; |
163 | 163 | for (int32 i = 1; i < allChannels; i++) { |
164 | | PRINT((" creating channel %ld\n", i)); |
| 164 | PRINT(" creating channel %ld\n", i); |
165 | 165 | // open the channel |
166 | 166 | error = _OpenClientChannel(serverAddr, port, &channel); |
167 | 167 | if (error != B_OK) |
… |
… |
PRINT(("InsecureConnection::FinishInitialization()\n"));
|
292 | 292 | } |
293 | 293 | RETURN_ERROR(error); |
294 | 294 | } |
295 | | PRINT((" accepting channel %ld\n", i)); |
| 295 | PRINT(" accepting channel %ld\n", i); |
296 | 296 | // create a channel |
297 | 297 | channel = new(std::nothrow) InsecureChannel(channelFD); |
298 | 298 | if (!channel) { |
diff --git a/src/add-ons/kernel/file_systems/netfs/shared/RequestChannel.cpp b/src/add-ons/kernel/file_systems/netfs/shared/RequestChannel.cpp
index 348231f..f084cad 100644
a
|
b
|
RequestChannel::SendRequest(Request* request)
|
161 | 161 | { |
162 | 162 | if (!request) |
163 | 163 | RETURN_ERROR(B_BAD_VALUE); |
164 | | PRINT(("%p->RequestChannel::SendRequest(): request: %p, type: %s\n", this, request, typeid(*request).name())); |
| 164 | PRINT("%p->RequestChannel::SendRequest(): request: %p, type: %s\n", this, request, typeid(*request).name()); |
165 | 165 | |
166 | 166 | // get request size |
167 | 167 | int32 size; |
… |
… |
RequestChannel::ReceiveRequest(Request** _request)
|
245 | 245 | |
246 | 246 | requestDeleter.Detach(); |
247 | 247 | *_request = request; |
248 | | PRINT(("%p->RequestChannel::ReceiveRequest(): request: %p, type: %s\n", this, request, typeid(*request).name())); |
| 248 | PRINT("%p->RequestChannel::ReceiveRequest(): request: %p, type: %s\n", this, request, typeid(*request).name()); |
249 | 249 | return B_OK; |
250 | 250 | } |
251 | 251 | |
diff --git a/src/add-ons/kernel/file_systems/netfs/shared/RequestDumper.cpp b/src/add-ons/kernel/file_systems/netfs/shared/RequestDumper.cpp
index 6eec3a1..64ef627 100644
a
|
b
|
RequestDumper::RequestDumper()
|
24 | 24 | void |
25 | 25 | RequestDumper::DumpRequest(Request* request) |
26 | 26 | { |
27 | | PRINT(("request: %s\n", typeid(*request).name())); |
| 27 | PRINT("request: %s\n", typeid(*request).name()); |
28 | 28 | fIndentationLevel++; |
29 | 29 | request->ShowAround(this); |
30 | 30 | fIndentationLevel--; |
… |
… |
RequestDumper::DumpRequest(Request* request)
|
34 | 34 | void |
35 | 35 | RequestDumper::Visit(RequestMember* member, bool& data) |
36 | 36 | { |
37 | | PRINT(("%sbool: %s\n", _Indentation(), (data ? "true" : "false"))); |
| 37 | PRINT("%sbool: %s\n", _Indentation(), (data ? "true" : "false")); |
38 | 38 | } |
39 | 39 | |
40 | 40 | // Visit |
41 | 41 | void |
42 | 42 | RequestDumper::Visit(RequestMember* member, int8& data) |
43 | 43 | { |
44 | | PRINT(("%sint8: %d\n", _Indentation(), (int)data)); |
| 44 | PRINT("%sint8: %d\n", _Indentation(), (int)data); |
45 | 45 | } |
46 | 46 | |
47 | 47 | // Visit |
48 | 48 | void |
49 | 49 | RequestDumper::Visit(RequestMember* member, uint8& data) |
50 | 50 | { |
51 | | PRINT(("%suint8: %d\n", _Indentation(), (int)data)); |
| 51 | PRINT("%suint8: %d\n", _Indentation(), (int)data); |
52 | 52 | } |
53 | 53 | |
54 | 54 | // Visit |
55 | 55 | void |
56 | 56 | RequestDumper::Visit(RequestMember* member, int16& data) |
57 | 57 | { |
58 | | PRINT(("%sint16: %d\n", _Indentation(), (int)data)); |
| 58 | PRINT("%sint16: %d\n", _Indentation(), (int)data); |
59 | 59 | } |
60 | 60 | |
61 | 61 | // Visit |
62 | 62 | void |
63 | 63 | RequestDumper::Visit(RequestMember* member, uint16& data) |
64 | 64 | { |
65 | | PRINT(("%suint16: %d\n", _Indentation(), (int)data)); |
| 65 | PRINT("%suint16: %d\n", _Indentation(), (int)data); |
66 | 66 | } |
67 | 67 | |
68 | 68 | // Visit |
69 | 69 | void |
70 | 70 | RequestDumper::Visit(RequestMember* member, int32& data) |
71 | 71 | { |
72 | | PRINT(("%sint32: %ld\n", _Indentation(), data)); |
| 72 | PRINT("%sint32: %ld\n", _Indentation(), data); |
73 | 73 | } |
74 | 74 | |
75 | 75 | // Visit |
76 | 76 | void |
77 | 77 | RequestDumper::Visit(RequestMember* member, uint32& data) |
78 | 78 | { |
79 | | PRINT(("%suint32: %lu\n", _Indentation(), data)); |
| 79 | PRINT("%suint32: %lu\n", _Indentation(), data); |
80 | 80 | } |
81 | 81 | |
82 | 82 | // Visit |
83 | 83 | void |
84 | 84 | RequestDumper::Visit(RequestMember* member, int64& data) |
85 | 85 | { |
86 | | PRINT(("%sint64: %lld\n", _Indentation(), data)); |
| 86 | PRINT("%sint64: %lld\n", _Indentation(), data); |
87 | 87 | } |
88 | 88 | |
89 | 89 | // Visit |
90 | 90 | void |
91 | 91 | RequestDumper::Visit(RequestMember* member, uint64& data) |
92 | 92 | { |
93 | | PRINT(("%suint64: %llu\n", _Indentation(), data)); |
| 93 | PRINT("%suint64: %llu\n", _Indentation(), data); |
94 | 94 | } |
95 | 95 | |
96 | 96 | // Visit |
97 | 97 | void |
98 | 98 | RequestDumper::Visit(RequestMember* member, Data& data) |
99 | 99 | { |
100 | | PRINT(("%sdata: %p (%ld bytes)\n", _Indentation(), data.GetData(), |
101 | | data.GetSize())); |
| 100 | PRINT("%sdata: %p (%ld bytes)\n", _Indentation(), data.GetData(), |
| 101 | data.GetSize()); |
102 | 102 | } |
103 | 103 | |
104 | 104 | // Visit |
105 | 105 | void |
106 | 106 | RequestDumper::Visit(RequestMember* member, StringData& data) |
107 | 107 | { |
108 | | PRINT(("%sstring: \"%s\" (%p, %ld bytes)\n", _Indentation(), |
109 | | data.GetString(), data.GetString(), data.GetSize())); |
| 108 | PRINT("%sstring: \"%s\" (%p, %ld bytes)\n", _Indentation(), |
| 109 | data.GetString(), data.GetString(), data.GetSize()); |
110 | 110 | } |
111 | 111 | |
112 | 112 | // Visit |
113 | 113 | void |
114 | 114 | RequestDumper::Visit(RequestMember* member, RequestMember& subMember) |
115 | 115 | { |
116 | | PRINT(("%ssubmember:\n", _Indentation())); |
| 116 | PRINT("%ssubmember:\n", _Indentation()); |
117 | 117 | |
118 | 118 | fIndentationLevel++; |
119 | 119 | subMember.ShowAround(this); |
… |
… |
void
|
125 | 125 | RequestDumper::Visit(RequestMember* member, |
126 | 126 | FlattenableRequestMember& subMember) |
127 | 127 | { |
128 | | PRINT(("%sflattenable: %s\n", _Indentation(), typeid(subMember).name())); |
| 128 | PRINT("%sflattenable: %s\n", _Indentation(), typeid(subMember).name()); |
129 | 129 | } |
130 | 130 | |
131 | 131 | // _Indentation |