Ticket #8420: 0001-Fix-8420-NetFS-does-not-compile-with-DEBUG.patch

File 0001-Fix-8420-NetFS-does-not-compile-with-DEBUG.patch, 49.5 KB (added by pdziepak, 13 years ago)
  • src/add-ons/kernel/file_systems/netfs/client/RootVolume.cpp

    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,  
    152152                || serverNameLen == sizeof(params->serverName)) {
    153153                return B_BAD_VALUE;
    154154            }
    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);
    157157
    158158            // get the server address
    159159            NetAddress netAddress;
    RootVolume::IOCtl(Node* node, void* cookie, int cmd, void* buffer,  
    178178                || serverNameLen == sizeof(params->serverName)) {
    179179                return B_BAD_VALUE;
    180180            }
    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);
    183183
    184184            // get the server volume
    185185            ServerVolume* serverVolume = _GetServerVolume(params->serverName);
    RootVolume::IOCtl(Node* node, void* cookie, int cmd, void* buffer,  
    193193            return B_OK;
    194194        }
    195195        default:
    196             PRINT(("RootVolume::IOCtl(): unknown ioctl: %d\n", cmd));
     196            PRINT("RootVolume::IOCtl(): unknown ioctl: %d\n", cmd);
    197197            return B_BAD_VALUE;
    198198            break;
    199199    }
    RootVolume::IOCtl(Node* node, void* cookie, int cmd, void* buffer,  
    207207void
    208208RootVolume::ServerAdded(ExtendedServerInfo* serverInfo)
    209209{
    210 PRINT(("RootVolume::ServerAdded(%s)\n", serverInfo->GetServerName()));
     210    PRINT("RootVolume::ServerAdded(%s)\n", serverInfo->GetServerName());
    211211    // check, if the server does already exist
    212212    ServerVolume* serverVolume = _GetServerVolume(serverInfo->GetAddress());
    213213    if (serverVolume) {
    214         WARN(("RootVolume::ServerAdded(): WARNING: ServerVolume does already "
    215             "exist.\n"));
     214        WARN("RootVolume::ServerAdded(): WARNING: ServerVolume does "
     215            "already exist.\n");
    216216        serverVolume->PutVolume();
    217217        return;
    218218    }
    void  
    258258RootVolume::ServerUpdated(ExtendedServerInfo* oldInfo,
    259259    ExtendedServerInfo* newInfo)
    260260{
    261 PRINT(("RootVolume::ServerUpdated(%s)\n", newInfo->GetServerName()));
     261    PRINT("RootVolume::ServerUpdated(%s)\n", newInfo->GetServerName());
    262262    // get the volume
    263263    ServerVolume* serverVolume = _GetServerVolume(newInfo->GetAddress());
    264264    if (!serverVolume)
    PRINT(("RootVolume::ServerUpdated(%s)\n", newInfo->GetServerName()));  
    273273void
    274274RootVolume::ServerRemoved(ExtendedServerInfo* serverInfo)
    275275{
    276 PRINT(("RootVolume::ServerRemoved(%s)\n", serverInfo->GetServerName()));
     276    PRINT("RootVolume::ServerRemoved(%s)\n", serverInfo->GetServerName());
    277277    // get the volume
    278278    ServerVolume* serverVolume = _GetServerVolume(serverInfo->GetAddress());
    279279    if (!serverVolume)
  • src/add-ons/kernel/file_systems/netfs/client/ServerManager.cpp

    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()  
    303303        ssize_t bytesRead = recvfrom(fBroadcastListenerSocket, &message,
    304304            sizeof(message), 0, (sockaddr*)&addr, &addrSize);
    305305        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));
    308308            continue;
    309309        }
    310310
    311311        // check message size, magic, and protocol version
    312312        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));
    315316            continue;
    316317        }
    317318        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");
    320321            continue;
    321322        }
    322323        if (message.protocolVersion
    323324            != (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);
    328330            continue;
    329331        }
    330332
  • src/add-ons/kernel/file_systems/netfs/client/ServerVolume.cpp

    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)  
    7777        fLock.Unlock();
    7878
    7979        if (remove) {
    80             PRINT(("  removing share: %s\n", name));
     80            PRINT("  removing share: %s\n", name);
    8181            if (Volume* volume = GetChildVolume(name)) {
    8282                volume->SetUnmounting(true);
    8383                volume->PutVolume();
    ServerVolume::SetServerInfo(ExtendedServerInfo* serverInfo)  
    101101        if (volume) {
    102102            volume->PutVolume();
    103103        } else {
    104             PRINT(("  adding share: %s\n", shareInfo->GetShareName()));
     104            PRINT("  adding share: %s\n",
     105                shareInfo->GetShareName());
    105106            status_t error = _AddShare(shareInfo);
    106107            if (error != B_OK) {
    107108                ERROR("ServerVolume::SetServerInfo(): ERROR: Failed to add "
  • src/add-ons/kernel/file_systems/netfs/client/ShareVolume.cpp

    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"));  
    353353    int32 count = fNodes->Size();
    354354    if (count == 0)
    355355        return;
    356 PRINT(("  %ld nodes to remove\n", count));
     356    PRINT("  %ld nodes to remove\n", count);
    357357    vnode_id* ids = new(std::nothrow) vnode_id[count];
    358358    if (!ids) {
    359359        ERROR("ShareVolume::PrepareToUnmount(): ERROR: Insufficient memory to "
    PRINT((" %ld nodes to remove\n", count));  
    395395    for (int32 i = 0; i < count; i++) {
    396396        Node* node;
    397397        if (GetVNode(ids[i], &node) == B_OK) {
    398 PRINT(("  removing node %lld\n", ids[i]));
     398            PRINT("  removing node %lld\n", ids[i]);
    399399            Volume::RemoveVNode(ids[i]);
    400400            PutVNode(ids[i]);
    401401        }
    ShareVolume::OpenDir(Node* _node, void** _cookie)  
    11661166    ObjectDeleter<Request> replyDeleter(reply);
    11671167    if (reply->error != B_OK)
    11681168{
    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);
    11711172        RETURN_ERROR(reply->error);
    11721173}
    11731174
    ShareVolume::GetQueryEntry(const EntryInfo& entryInfo,  
    20172018    buffer->d_ino = localNodeID;
    20182019
    20192020    *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);
    20242025    return B_OK;
    20252026}
    20262027
    ShareVolume::_HandleEntryCreatedRequest(EntryCreatedRequest* request)  
    21712172    status_t error = _GetLocalNodeID(request->directoryID, &vnida, true);
    21722173    if (error == B_OK)
    21732174        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);
    21752181
    21762182    // send notifications / do additional processing
    21772183    if (request->queryUpdate) {
    ShareVolume::_GetLocalNodeID(NodeID remoteID, ino_t* _localID, bool enter)  
    23632369        fVolumeManager->RemoveNodeID(localID);
    23642370        return error;
    23652371    }
    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);
    23682375
    23692376    *_localID = localID;
    23702377    return B_OK;
    ShareVolume::_RemoveLocalNodeID(ino_t localID)  
    23962403
    23972404    // remove from ID maps
    23982405    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);
    24002408    fRemoteNodeIDs->Remove(localID);
    24012409    fLocalNodeIDs->Remove(remoteID);
    24022410
    ShareVolume::_LoadNode(const NodeInfo& nodeInfo, ShareNode** _node)  
    24632471            delete node;
    24642472            return error;
    24652473        }
    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);
    24692478    }
    24702479
    24712480    if (_node)
    ShareVolume::_MountShare()  
    30233032    // get the share name
    30243033    const char* share = shareInfo->GetShareName();
    30253034
    3026 PRINT(("ShareVolume::_MountShare(%s, %s)\n", server, share));
     3035    PRINT("ShareVolume::_MountShare(%s, %s)\n", server, share);
    30273036    // init a connection to the authentication server
    30283037    AuthenticationServer authenticationServer;
    30293038    error = authenticationServer.InitCheck();
    PRINT(("ShareVolume::_MountShare(%s, %s)\n", server, share));  
    30943103        fLocalNodeIDs->Remove(fRootNode->GetRemoteID());
    30953104        RETURN_ERROR(error);
    30963105    }
    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);
    30983110
    30993111    // Add ourselves to the server connection, so that we can receive
    31003112    // node monitoring events. There a race condition: We might already
  • src/add-ons/kernel/file_systems/netfs/client/Volume.cpp

    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,  
    172172    nspace_id nsida, nspace_id nsidb, vnode_id vnida, vnode_id vnidb,
    173173    vnode_id vnidc, const char *name)
    174174{
    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);
    176178    return send_notification(port, token, what, op, nsida, nsidb, vnida,
    177179        vnidb, vnidc, name);
    178180}
  • src/add-ons/kernel/file_systems/netfs/client/VolumeManager.cpp

    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)  
    333333    {
    334334        AutoLocker<Locker> locker(this);
    335335        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);
    338338            // remove from volume set -- now noone can get a reference to it
    339339            // anymore
    340340            fVolumes->Remove(volume);
  • src/add-ons/kernel/file_systems/netfs/client/netfs.cpp

    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)  
    224224{
    225225    VolumeManager* volumeManager = (VolumeManager*)ns;
    226226
    227     PRINT(("netfs_unmount()\n"));
     227    PRINT("netfs_unmount()\n");
    228228
    229229    volumeManager->UnmountRootVolume();
    230230    delete volumeManager;
    netfs_unmount(void *ns)  
    233233        ObjectTracker::ExitDefault();
    234234    #endif
    235235
    236     PRINT(("netfs_unmount() done\n"));
     236    PRINT("netfs_unmount() done\n");
    237237
    238238    exit_debugging();
    239239    return B_OK;
    netfs_sync(void *ns)  
    250250    Volume* volume = volumeManager->GetRootVolume();
    251251    VolumePutter _(volume);
    252252
    253     PRINT(("netfs_sync(%p)\n", ns));
     253    PRINT("netfs_sync(%p)\n", ns);
    254254
    255255    status_t error = B_BAD_VALUE;
    256256    if (volume)
    257257        error = volume->Sync();
    258258
    259     PRINT(("netfs_sync() done: %lx \n", error));
     259    PRINT("netfs_sync() done: %lx \n", error);
    260260
    261261    return error;
    262262}
    netfs_read_fs_stat(void *ns, struct fs_info *info)  
    272272    Volume* volume = volumeManager->GetRootVolume();
    273273    VolumePutter _(volume);
    274274
    275     PRINT(("netfs_read_fs_stat(%p, %p)\n", ns, info));
     275    PRINT("netfs_read_fs_stat(%p, %p)\n", ns, info);
    276276
    277277    status_t error = B_BAD_VALUE;
    278278    if (volume)
    279279        error = volume->ReadFSStat(info);
    280280
    281     PRINT(("netfs_read_fs_stat() done: %lx \n", error));
     281    PRINT("netfs_read_fs_stat() done: %lx \n", error);
    282282
    283283    return error;
    284284}
    netfs_write_fs_stat(void *ns, struct fs_info *info, long mask)  
    294294    Volume* volume = volumeManager->GetRootVolume();
    295295    VolumePutter _(volume);
    296296
    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);
    298298
    299299    status_t error = B_BAD_VALUE;
    300300    if (volume)
    301301        error = volume->WriteFSStat(info, mask);
    302302
    303     PRINT(("netfs_write_fs_stat() done: %lx \n", error));
     303    PRINT("netfs_write_fs_stat() done: %lx \n", error);
    304304
    305305    return error;
    306306}
    netfs_read_vnode(void *ns, vnode_id vnid, char reenter, void **node)  
    319319    Volume* volume = volumeManager->GetVolume(vnid);
    320320    VolumePutter _(volume);
    321321
    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);
    323323
    324324    status_t error = B_BAD_VALUE;
    325325    if (volume)
    326326        error = volume->ReadVNode(vnid, reenter, (Node**)node);
    327327
    328     PRINT(("netfs_read_vnode() done: (%lx, %p)\n", error, *node));
     328    PRINT("netfs_read_vnode() done: (%lx, %p)\n", error, *node);
    329329
    330330    return error;
    331331}
    int  
    371371netfs_fsync(void *ns, void *_node)
    372372{
    373373    Node* node = (Node*)_node;
    374     PRINT(("netfs_fsync(%p, %p)\n", ns, node));
     374    PRINT("netfs_fsync(%p, %p)\n", ns, node);
    375375    status_t error = node->GetVolume()->FSync(node);
    376     PRINT(("netfs_fsync() done: %lx\n", error));
     376    PRINT("netfs_fsync() done: %lx\n", error);
    377377    return error;
    378378}
    379379
    int  
    385385netfs_read_stat(void *ns, void *_node, struct stat *st)
    386386{
    387387    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);
    389389    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);
    391391    return error;
    392392}
    393393
    int  
    397397netfs_write_stat(void *ns, void *_node, struct stat *st, long mask)
    398398{
    399399    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);
    401401    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);
    403403    return error;
    404404}
    405405
    int  
    409409netfs_access(void *ns, void *_node, int mode)
    410410{
    411411    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);
    413413    status_t error = node->GetVolume()->Access(node, mode);
    414     PRINT(("netfs_access() done: %lx\n", error));
     414    PRINT("netfs_access() done: %lx\n", error);
    415415    return error;
    416416}
    417417
    netfs_create(void *ns, void *_dir, const char *name, int openMode, int mode,  
    425425    vnode_id *vnid, void **cookie)
    426426{
    427427    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);
    430430    status_t error = dir->GetVolume()->Create(dir, name, openMode, mode, vnid,
    431431        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);
    434434    return error;
    435435}
    436436
    int  
    440440netfs_open(void *ns, void *_node, int openMode, void **cookie)
    441441{
    442442    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);
    444444    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);
    446446    return error;
    447447}
    448448
    int  
    452452netfs_close(void *ns, void *_node, void *cookie)
    453453{
    454454    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);
    456456    status_t error = node->GetVolume()->Close(node, cookie);
    457     PRINT(("netfs_close() done: %lx\n", error));
     457    PRINT("netfs_close() done: %lx\n", error);
    458458    return error;
    459459}
    460460
    int  
    464464netfs_free_cookie(void *ns, void *_node, void *cookie)
    465465{
    466466    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);
    468468    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);
    470470    return error;
    471471}
    472472
    netfs_read(void *ns, void *_node, void *cookie, off_t pos, void *buffer,  
    477477    size_t *bufferSize)
    478478{
    479479    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);
    482482    status_t error = node->GetVolume()->Read(node, cookie, pos, buffer,
    483483        *bufferSize, bufferSize);
    484     PRINT(("netfs_read() done: (%lx, %lu)\n", error, *bufferSize));
     484    PRINT("netfs_read() done: (%lx, %lu)\n", error, *bufferSize);
    485485    return error;
    486486}
    487487
    netfs_write(void *ns, void *_node, void *cookie, off_t pos,  
    492492    const void *buffer, size_t *bufferSize)
    493493{
    494494    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);
    497497    status_t error = node->GetVolume()->Write(node, cookie, pos, buffer,
    498498        *bufferSize, bufferSize);
    499     PRINT(("netfs_write() done: (%lx, %lu)\n", error, *bufferSize));
     499    PRINT("netfs_write() done: (%lx, %lu)\n", error, *bufferSize);
    500500    return error;
    501501}
    502502
    netfs_ioctl(void *ns, void *_node, void *cookie, int cmd, void *buffer,  
    507507    size_t bufferSize)
    508508{
    509509    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);
    512512    status_t error = node->GetVolume()->IOCtl(node, cookie, cmd, buffer,
    513513        bufferSize);
    514     PRINT(("netfs_ioctl() done: (%lx)\n", error));
     514    PRINT("netfs_ioctl() done: (%lx)\n", error);
    515515    return error;
    516516}
    517517
    netfs_link(void *ns, void *_dir, const char *name, void *_node)  
    537537{
    538538    Node* dir = (Node*)_dir;
    539539    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);
    541541    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);
    543543    return error;
    544544}
    545545
    int  
    549549netfs_unlink(void *ns, void *_dir, const char *name)
    550550{
    551551    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);
    553553    status_t error = dir->GetVolume()->Unlink(dir, name);
    554     PRINT(("netfs_unlink() done: (%lx)\n", error));
     554    PRINT("netfs_unlink() done: (%lx)\n", error);
    555555    return error;
    556556}
    557557
    int  
    561561netfs_symlink(void *ns, void *_dir, const char *name, const char *path)
    562562{
    563563    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);
    565565    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);
    567567    return error;
    568568}
    569569
    int  
    573573netfs_read_link(void *ns, void *_node, char *buffer, size_t *bufferSize)
    574574{
    575575    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);
    578578    status_t error = node->GetVolume()->ReadLink(node, buffer, *bufferSize,
    579579        bufferSize);
    580     PRINT(("netfs_read_link() done: (%lx, %lu)\n", error, *bufferSize));
     580    PRINT("netfs_read_link() done: (%lx, %lu)\n", error, *bufferSize);
    581581    return error;
    582582}
    583583
    netfs_rename(void *ns, void *_oldDir, const char *oldName, void *_newDir,  
    589589{
    590590    Node* oldDir = (Node*)_oldDir;
    591591    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);
    594594    status_t error = oldDir->GetVolume()->Rename(oldDir, oldName,
    595595        newDir, newName);
    596     PRINT(("netfs_rename() done: (%lx)\n", error));
     596    PRINT("netfs_rename() done: (%lx)\n", error);
    597597    return error;
    598598}
    599599
    int  
    606606netfs_mkdir(void *ns, void *_dir, const char *name, int mode)
    607607{
    608608    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);
    610610    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);
    612612    return error;
    613613}
    614614
    int  
    618618netfs_rmdir(void *ns, void *_dir, const char *name)
    619619{
    620620    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);
    622622    status_t error = dir->GetVolume()->RmDir(dir, name);
    623     PRINT(("netfs_rmdir() done: (%lx)\n", error));
     623    PRINT("netfs_rmdir() done: (%lx)\n", error);
    624624    return error;
    625625}
    626626
    int  
    630630netfs_open_dir(void *ns, void *_node, void **cookie)
    631631{
    632632    Node* node = (Node*)_node;
    633     PRINT(("netfs_open_dir(%p, %p)\n", ns, node));
     633    PRINT("netfs_open_dir(%p, %p)\n", ns, node);
    634634    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);
    636636    return error;
    637637}
    638638
    int  
    642642netfs_close_dir(void *ns, void *_node, void *cookie)
    643643{
    644644    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);
    646646    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);
    648648    return error;
    649649}
    650650
    int  
    654654netfs_free_dir_cookie(void *ns, void *_node, void *cookie)
    655655{
    656656    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);
    658658    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);
    660660    return error;
    661661}
    662662
    netfs_read_dir(void *ns, void *_node, void *cookie, long *count,  
    667667    struct dirent *buffer, size_t bufferSize)
    668668{
    669669    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);
    672672    status_t error = node->GetVolume()->ReadDir(node, cookie, buffer,
    673673        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);
    675675    #if DEBUG
    676676        dirent* entry = buffer;
    677677        for (int32 i = 0; i < *count; i++) {
    netfs_read_dir(void *ns, void *_node, void *cookie, long *count,  
    681681            int nameLen = strnlen(entry->d_name, B_FILE_NAME_LENGTH - 1);
    682682            strncpy(name, entry->d_name, nameLen);
    683683            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);
    688688            entry = (dirent*)((char*)entry + entry->d_reclen);
    689689        }
    690690    #endif
    int  
    698698netfs_rewind_dir(void *ns, void *_node, void *cookie)
    699699{
    700700    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);
    702702    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);
    704704    return error;
    705705}
    706706
    netfs_walk(void *ns, void *_dir, const char *entryName,  
    711711    char **resolvedPath, vnode_id *vnid)
    712712{
    713713    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);
    716716    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);
    719719    return error;
    720720}
    721721
    int  
    728728netfs_open_attrdir(void *ns, void *_node, void **cookie)
    729729{
    730730    Node* node = (Node*)_node;
    731     PRINT(("netfs_open_attrdir(%p, %p)\n", ns, node));
     731    PRINT("netfs_open_attrdir(%p, %p)\n", ns, node);
    732732    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);
    734734    return error;
    735735}
    736736
    int  
    740740netfs_close_attrdir(void *ns, void *_node, void *cookie)
    741741{
    742742    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);
    744744    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);
    746746    return error;
    747747}
    748748
    int  
    752752netfs_free_attrdir_cookie(void *ns, void *_node, void *cookie)
    753753{
    754754    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);
    756756    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);
    758758    return error;
    759759}
    760760
    netfs_read_attrdir(void *ns, void *_node, void *cookie, long *count,  
    765765    struct dirent *buffer, size_t bufferSize)
    766766{
    767767    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);
    770770    status_t error = node->GetVolume()->ReadAttrDir(node, cookie, buffer,
    771771        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);
    773773    return error;
    774774}
    775775
    int  
    779779netfs_rewind_attrdir(void *ns, void *_node, void *cookie)
    780780{
    781781    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);
    783783    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);
    785785    return error;
    786786}
    787787
    netfs_read_attr(void *ns, void *_node, const char *name, int type,  
    792792    void *buffer, size_t *bufferSize, off_t pos)
    793793{
    794794    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);
    797797    status_t error = node->GetVolume()->ReadAttr(node, name, type, pos, buffer,
    798798        *bufferSize, bufferSize);
    799     PRINT(("netfs_read_attr() done: (%lx, %ld)\n", error, *bufferSize));
     799    PRINT("netfs_read_attr() done: (%lx, %ld)\n", error, *bufferSize);
    800800    return error;
    801801}
    802802
    netfs_write_attr(void *ns, void *_node, const char *name, int type,  
    807807    const void *buffer, size_t *bufferSize, off_t pos)
    808808{
    809809    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);
    812812    status_t error = node->GetVolume()->WriteAttr(node, name, type, pos, buffer,
    813813        *bufferSize, bufferSize);
    814     PRINT(("netfs_write_attr() done: (%lx, %ld)\n", error, *bufferSize));
     814    PRINT("netfs_write_attr() done: (%lx, %ld)\n", error, *bufferSize);
    815815    return error;
    816816}
    817817
    int  
    821821netfs_remove_attr(void *ns, void *_node, const char *name)
    822822{
    823823    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);
    825825    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);
    827827    return error;
    828828}
    829829
    netfs_rename_attr(void *ns, void *_node, const char *oldName,  
    834834    const char *newName)
    835835{
    836836    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);
    839839    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);
    841841    return error;
    842842}
    843843
    netfs_stat_attr(void *ns, void *_node, const char *name,  
    848848    struct attr_info *attrInfo)
    849849{
    850850    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);
    853853    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);
    855855    return error;
    856856}
    857857
    netfs_open_query(void *ns, const char *queryString, ulong flags,  
    868868    Volume* volume = volumeManager->GetRootVolume();
    869869    VolumePutter _(volume);
    870870
    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);
    873873
    874874    status_t error = B_BAD_VALUE;
    875875    if (volume) {
    netfs_open_query(void *ns, const char *queryString, ulong flags,  
    877877            (QueryIterator**)cookie);
    878878    }
    879879
    880     PRINT(("netfs_open_query() done: (%lx, %p)\n", error, *cookie));
     880    PRINT("netfs_open_query() done: (%lx, %p)\n", error, *cookie);
    881881    return error;
    882882}
    883883
    static  
    886886int
    887887netfs_close_query(void *ns, void *cookie)
    888888{
    889     PRINT(("netfs_close_query(%p, %p)\n", ns, cookie));
     889    PRINT("netfs_close_query(%p, %p)\n", ns, cookie);
    890890
    891891    status_t error = B_OK;
    892892    // no-op: we don't use this hook
    893893
    894     PRINT(("netfs_close_query() done: (%lx)\n", error));
     894    PRINT("netfs_close_query() done: (%lx)\n", error);
    895895    return error;
    896896}
    897897
    netfs_free_query_cookie(void *ns, void *node, void *cookie)  
    903903    VolumeManager* volumeManager = (VolumeManager*)ns;
    904904    QueryIterator* iterator = (QueryIterator*)cookie;
    905905
    906     PRINT(("netfs_free_query_cookie(%p, %p)\n", ns, cookie));
     906    PRINT("netfs_free_query_cookie(%p, %p)\n", ns, cookie);
    907907
    908908    status_t error = B_OK;
    909909    volumeManager->GetQueryManager()->PutIterator(iterator);
    910910
    911     PRINT(("netfs_free_query_cookie() done: (%lx)\n", error));
     911    PRINT("netfs_free_query_cookie() done: (%lx)\n", error);
    912912    return error;
    913913}
    914914
    netfs_read_query(void *ns, void *cookie, long *count,  
    923923    QueryIterator* iterator = (QueryIterator*)cookie;
    924924    VolumePutter _(volume);
    925925
    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);
    928928
    929929    status_t error = B_BAD_VALUE;
    930930    if (volume) {
    netfs_read_query(void *ns, void *cookie, long *count,  
    932932        *count, count);
    933933    }
    934934
    935     PRINT(("netfs_read_query() done: (%lx, %ld)\n", error, *count));
     935    PRINT("netfs_read_query() done: (%lx, %ld)\n", error, *count);
    936936    return error;
    937937}
    938938
  • src/add-ons/kernel/file_systems/netfs/server/ClientConnection.cpp

    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)  
    16121612    }
    16131613else {
    16141614if (directory)
    1615 PRINT(("OpenDir() failed: client volume: %ld, node: (%ld, %lld)\n",
    1616 volume->GetID(), directory->GetVolumeID(), directory->GetID()));
     1615PRINT("OpenDir() failed: client volume: %ld, node: (%ld, %lld)\n",
     1616volume->GetID(), directory->GetVolumeID(), directory->GetID());
    16171617}
    16181618
    16191619    managerLocker.Unlock();
    ClientConnection::VisitReadDirRequest(ReadDirRequest* request)  
    16791679    }
    16801680
    16811681if (result == B_OK) {
    1682 PRINT(("ReadDir: (%ld, %lld)\n", request->volumeID, directory->GetID()));
     1682    PRINT("ReadDir: (%ld, %lld)\n", request->volumeID, directory->GetID());
    16831683}
    16841684
    16851685    // rewind, if requested
    PRINT(("ReadDir: (%ld, %lld)\n", request->volumeID, directory->GetID()));  
    17131713//reply.entryInfo.directoryID,
    17141714//reply.entryInfo.nodeID, reply.entryInfo.name.GetString()));
    17151715if (directory) {
    1716 PRINT(("ReadDir done: volume: %ld, (%ld, %lld) -> (%lx, %ld)\n",
     1716PRINT("ReadDir done: volume: %ld, (%ld, %lld) -> (%lx, %ld)\n",
    17171717volume->GetID(), directory->GetVolumeID(), directory->GetID(), result,
    1718 reply.entryInfos.CountElements()));
     1718reply.entryInfos.CountElements());
    17191719}
    17201720
    17211721    managerLocker.Unlock();
    ClientConnection::VisitWalkRequest(WalkRequest* request)  
    17891789
    17901790    // send the reply
    17911791    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());
    17961797    return GetChannel()->SendRequest(&reply);
    17971798}
    17981799
    ClientConnection::VisitMultiWalkRequest(MultiWalkRequest* request)  
    18541855
    18551856    // send the reply
    18561857    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());
    18601861    return GetChannel()->SendRequest(&reply);
    18611862}
    18621863
    ClientConnection::VisitReadQueryRequest(ReadQueryRequest* request)  
    24342435            break;
    24352436        if (countRead == 0)
    24362437            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);
    24382440
    24392441        VolumeManagerLocker managerLocker;
    24402442        VolumeManager* volumeManager = VolumeManager::GetDefault();
    PRINT((" -> no client volumes\n"));  
    24732475    // send the reply
    24742476    reply.error = result;
    24752477    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());
    24802485    return GetChannel()->SendRequest(&reply);
    24812486}
    24822487
    ClientConnection::ProcessQueryEvent(NodeMonitoringEvent* event)  
    25702575            event->opcode);
    25712576        return;
    25722577    }
    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);
    25742581
    25752582    // create an array for the IDs of the client volumes a found entry may
    25762583    // reside on
  • src/add-ons/kernel/file_systems/netfs/server/NetFSServer.cpp

    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)  
    764764void
    765765NetFSServer::ClientConnectionClosed(ClientConnection* connection, bool broken)
    766766{
    767 PRINT(("NetFSServer::ClientConnectionClosed(%d)\n", broken));
     767    PRINT("NetFSServer::ClientConnectionClosed(%d)\n", broken);
    768768    if (!connection)
    769769        return;
    770770    AutoLocker<Locker> locker(fLock);
  • src/add-ons/kernel/file_systems/netfs/server/NodeMonitor.cpp

    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)  
    102102            error = watch_node(&ref, flags, this);
    103103    }
    104104if (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);
    107107}
    108108    return error;
    109109}
    ref.node));  
    112112status_t
    113113NodeMonitor::StopWatching(const node_ref& ref)
    114114{
    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);
    117117    return watch_node(&ref, B_STOP_WATCHING, this);
    118118}
    119119
  • src/add-ons/kernel/file_systems/netfs/server/VolumeManager.cpp

    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,  
    719719    Entry* entry = GetEntry(volumeID, directoryID, name);
    720720    if (!entry) {
    721721        // 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);
    724724
    725725        // get the volume
    726726        Volume* volume = GetVolume(volumeID, true);
    VolumeManager::OpenQuery(QueryDomain* queryDomain, const char* queryString,  
    791791    if (!queryDomain || !queryString || !handle)
    792792        return B_BAD_VALUE;
    793793    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);
    795796
    796797    // allocate the handle
    797798    QueryHandle* queryHandle = new(std::nothrow) QueryHandle(remotePort,
    PRINT(("VolumeManager::OpenQuery(%p, \"%s\", 0x%lx, %ld, %ld)\n", queryDomain, q  
    826827        // branches of the FS tree and don't have common nodes.
    827828        if (!queryDomain->QueryDomainIntersectsWith(volume))
    828829            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());
    830832
    831833        // create the query for this volume
    832834        BVolume bVolume(volume->GetID());
    VolumeManager::_CheckVolumeRootMoved(EntryMovedEvent* event)  
    17081710        event->nodeID = st.st_ino;
    17091711        if (Volume* volume = GetVolume(st.st_dev)) {
    17101712            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());
    17131715            }
    17141716        }
    17151717    }
  • src/add-ons/kernel/file_systems/netfs/shared/InsecureConnection.cpp

    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"));  
    161161    // open the remaining channels
    162162    int32 allChannels = upStreamChannels + downStreamChannels;
    163163    for (int32 i = 1; i < allChannels; i++) {
    164 PRINT(("  creating channel %ld\n", i));
     164        PRINT("  creating channel %ld\n", i);
    165165        // open the channel
    166166        error = _OpenClientChannel(serverAddr, port, &channel);
    167167        if (error != B_OK)
    PRINT(("InsecureConnection::FinishInitialization()\n"));  
    292292            }
    293293            RETURN_ERROR(error);
    294294        }
    295 PRINT(("  accepting channel %ld\n", i));
     295        PRINT("  accepting channel %ld\n", i);
    296296        // create a channel
    297297        channel = new(std::nothrow) InsecureChannel(channelFD);
    298298        if (!channel) {
  • src/add-ons/kernel/file_systems/netfs/shared/RequestChannel.cpp

    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)  
    161161{
    162162    if (!request)
    163163        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());
    165165
    166166    // get request size
    167167    int32 size;
    RequestChannel::ReceiveRequest(Request** _request)  
    245245
    246246    requestDeleter.Detach();
    247247    *_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());
    249249    return B_OK;
    250250}
    251251
  • src/add-ons/kernel/file_systems/netfs/shared/RequestDumper.cpp

    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()  
    2424void
    2525RequestDumper::DumpRequest(Request* request)
    2626{
    27     PRINT(("request: %s\n", typeid(*request).name()));
     27    PRINT("request: %s\n", typeid(*request).name());
    2828    fIndentationLevel++;
    2929    request->ShowAround(this);
    3030    fIndentationLevel--;
    RequestDumper::DumpRequest(Request* request)  
    3434void
    3535RequestDumper::Visit(RequestMember* member, bool& data)
    3636{
    37     PRINT(("%sbool:   %s\n", _Indentation(), (data ? "true" : "false")));
     37    PRINT("%sbool:   %s\n", _Indentation(), (data ? "true" : "false"));
    3838}
    3939
    4040// Visit
    4141void
    4242RequestDumper::Visit(RequestMember* member, int8& data)
    4343{
    44     PRINT(("%sint8:   %d\n", _Indentation(), (int)data));
     44    PRINT("%sint8:   %d\n", _Indentation(), (int)data);
    4545}
    4646
    4747// Visit
    4848void
    4949RequestDumper::Visit(RequestMember* member, uint8& data)
    5050{
    51     PRINT(("%suint8:  %d\n", _Indentation(), (int)data));
     51    PRINT("%suint8:  %d\n", _Indentation(), (int)data);
    5252}
    5353
    5454// Visit
    5555void
    5656RequestDumper::Visit(RequestMember* member, int16& data)
    5757{
    58     PRINT(("%sint16:  %d\n", _Indentation(), (int)data));
     58    PRINT("%sint16:  %d\n", _Indentation(), (int)data);
    5959}
    6060
    6161// Visit
    6262void
    6363RequestDumper::Visit(RequestMember* member, uint16& data)
    6464{
    65     PRINT(("%suint16: %d\n", _Indentation(), (int)data));
     65    PRINT("%suint16: %d\n", _Indentation(), (int)data);
    6666}
    6767
    6868// Visit
    6969void
    7070RequestDumper::Visit(RequestMember* member, int32& data)
    7171{
    72     PRINT(("%sint32:  %ld\n", _Indentation(), data));
     72    PRINT("%sint32:  %ld\n", _Indentation(), data);
    7373}
    7474
    7575// Visit
    7676void
    7777RequestDumper::Visit(RequestMember* member, uint32& data)
    7878{
    79     PRINT(("%suint32: %lu\n", _Indentation(), data));
     79    PRINT("%suint32: %lu\n", _Indentation(), data);
    8080}
    8181
    8282// Visit
    8383void
    8484RequestDumper::Visit(RequestMember* member, int64& data)
    8585{
    86     PRINT(("%sint64:  %lld\n", _Indentation(), data));
     86    PRINT("%sint64:  %lld\n", _Indentation(), data);
    8787}
    8888
    8989// Visit
    9090void
    9191RequestDumper::Visit(RequestMember* member, uint64& data)
    9292{
    93     PRINT(("%suint64: %llu\n", _Indentation(), data));
     93    PRINT("%suint64: %llu\n", _Indentation(), data);
    9494}
    9595
    9696// Visit
    9797void
    9898RequestDumper::Visit(RequestMember* member, Data& data)
    9999{
    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());
    102102}
    103103
    104104// Visit
    105105void
    106106RequestDumper::Visit(RequestMember* member, StringData& data)
    107107{
    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());
    110110}
    111111
    112112// Visit
    113113void
    114114RequestDumper::Visit(RequestMember* member, RequestMember& subMember)
    115115{
    116     PRINT(("%ssubmember:\n", _Indentation()));
     116    PRINT("%ssubmember:\n", _Indentation());
    117117
    118118    fIndentationLevel++;
    119119    subMember.ShowAround(this);
    void  
    125125RequestDumper::Visit(RequestMember* member,
    126126    FlattenableRequestMember& subMember)
    127127{
    128     PRINT(("%sflattenable: %s\n", _Indentation(), typeid(subMember).name()));
     128    PRINT("%sflattenable: %s\n", _Indentation(), typeid(subMember).name());
    129129}
    130130
    131131// _Indentation