Ticket #8420: netfs_debug.patch

File netfs_debug.patch, 22.5 KB (added by pdziepak, 7 years ago)
  • src/add-ons/kernel/file_systems/netfs/authentication_server/AuthenticationServer.cpp

    diff --git a/src/add-ons/kernel/file_systems/netfs/authentication_server/AuthenticationServer.cpp b/src/add-ons/kernel/file_systems/netfs/authentication_server/AuthenticationServer.cpp
    index e648624..67eef1b 100644
    a b AuthenticationServer::_RequestThread() 
    350350                context, server, share, badPassword, request.ReplyPort(),
    351351                request.ReplyToken());
    352352            if (!task) {
    353                 ERROR("AuthenticationServer::_RequestThread(): ERROR: "
    354                     "failed to allocate ");
     353                ERROR(("AuthenticationServer::_RequestThread(): ERROR: "
     354                    "failed to allocate "));
    355355                continue;
    356356            }
    357357            status_t error = taskManager.RunTask(task);
    358358            if (error != B_OK) {
    359                 ERROR("AuthenticationServer::_RequestThread(): Failed to "
    360                     "start server info task: %s\n", strerror(error));
     359                ERROR(("AuthenticationServer::_RequestThread(): Failed to "
     360                    "start server info task: %s\n", strerror(error)));
    361361                continue;
    362362            }
    363363        }
  • src/add-ons/kernel/file_systems/netfs/client/QueryManager.cpp

    diff --git a/src/add-ons/kernel/file_systems/netfs/client/QueryManager.cpp b/src/add-ons/kernel/file_systems/netfs/client/QueryManager.cpp
    index 33be9bc..101562c 100644
    a b QueryManager::PutIterator(QueryIterator* iterator) 
    200200                delete iteratorList;
    201201            }
    202202        } else {
    203             ERROR("QueryManager::PutIterator(): ERROR: No iterator list "
    204                 "for volume %p!\n", iterator->GetVolume());
     203            ERROR(("QueryManager::PutIterator(): ERROR: No iterator list "
     204                "for volume %p!\n", iterator->GetVolume()));
    205205        }
    206206
    207207        // free the iterator and surrender its volume reference
  • 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..35f569e 100644
    a b public: 
    7676        // create a socket
    7777        fFD = socket(AF_INET, SOCK_STREAM, 0);
    7878        if (fFD < 0) {
    79             ERROR("ServerManager::ServerInfoTask: ERROR: Failed to create "
    80                 "socket: %s\n", strerror(errno));
     79            ERROR(("ServerManager::ServerInfoTask: ERROR: Failed to create "
     80                "socket: %s\n", strerror(errno)));
    8181            return errno;
    8282        }
    8383        return B_OK;
    public: 
    8989        sockaddr_in addr = fServerInfo->GetAddress().GetAddress();
    9090        addr.sin_port = htons(kDefaultServerInfoPort);
    9191        if (connect(fFD, (sockaddr*)&addr, sizeof(addr)) < 0) {
    92             ERROR("ServerManager::ServerInfoTask: ERROR: Failed to connect "
    93                 "to server info port: %s\n", strerror(errno));
     92            ERROR(("ServerManager::ServerInfoTask: ERROR: Failed to connect "
     93                "to server info port: %s\n", strerror(errno)));
    9494            return errno;
    9595        }
    9696
    public: 
    102102        Request* _request;
    103103        status_t error = requestChannel.ReceiveRequest(&_request);
    104104        if (error != B_OK) {
    105             ERROR("ServerManager::ServerInfoTask: ERROR: Failed to receive "
    106                 "server info request: %s\n", strerror(errno));
     105            ERROR(("ServerManager::ServerInfoTask: ERROR: Failed to receive "
     106                "server info request: %s\n", strerror(errno)));
    107107            return error;
    108108        }
    109109        ObjectDeleter<Request> requestDeleter(_request);
    110110        ServerInfoRequest* request = dynamic_cast<ServerInfoRequest*>(_request);
    111111        if (!request) {
    112             ERROR("ServerManager::ServerInfoTask: ERROR: Received request "
    113                 "is not a server info request.\n");
     112            ERROR(("ServerManager::ServerInfoTask: ERROR: Received request "
     113                "is not a server info request.\n"));
    114114            return B_BAD_DATA;
    115115        }
    116116
    ServerManager::_BroadcastListener() 
    396396        }
    397397        status_t error = taskManager.RunTask(task);
    398398        if (error != B_OK) {
    399             ERROR("ServerManager::_BroadcastListener(): Failed to start server "
    400                 "info task: %s\n", strerror(error));
     399            ERROR(("ServerManager::_BroadcastListener(): Failed to start server "
     400                "info task: %s\n", strerror(error)));
    401401            continue;
    402402        }
    403403    }
    ServerManager::_InitBroadcastListener() 
    418418    addr.sin_port = htons(kDefaultBroadcastPort);
    419419    addr.sin_addr.s_addr = INADDR_ANY;
    420420    if (bind(fBroadcastListenerSocket, (sockaddr*)&addr, sizeof(addr)) < 0) {
    421         ERROR("ServerManager::_InitBroadcastListener(): ERROR: bind()ing the "
    422             "broadcasting socket failed: %s\n", strerror(errno));
     421        ERROR(("ServerManager::_InitBroadcastListener(): ERROR: bind()ing the "
     422            "broadcasting socket failed: %s\n", strerror(errno)));
    423423        safe_closesocket(fBroadcastListenerSocket);
    424424        return errno;
    425425    }
    ServerManager::_ServerAdded(ExtendedServerInfo* serverInfo) 
    470470            fListener->ServerAdded(serverInfo);
    471471        }
    472472    } else {
    473         WARN("ServerManager::_ServerAdded(%p): WARNING: Unexpected server "
    474             "info.\n", serverInfo);
     473        WARN(("ServerManager::_ServerAdded(%p): WARNING: Unexpected server "
     474            "info.\n", serverInfo));
    475475    }
    476476}
    477477
    ServerManager::_ServerUpdated(ExtendedServerInfo* serverInfo) 
    505505        }
    506506        oldInfo->ReleaseReference();
    507507    } else {
    508         WARN("ServerManager::_ServerUpdated(%p): WARNING: Unexpected server "
    509             "info.\n", serverInfo);
     508        WARN(("ServerManager::_ServerUpdated(%p): WARNING: Unexpected server "
     509            "info.\n", serverInfo));
    510510    }
    511511}
    512512
    ServerManager::_AddingServerFailed(ExtendedServerInfo* serverInfo) 
    528528            fListener->ServerRemoved(serverInfo);
    529529        }
    530530    } else {
    531         WARN("ServerManager::_AddingServerFailed(%p): WARNING: Unexpected "
    532             "server info.\n", serverInfo);
     531        WARN(("ServerManager::_AddingServerFailed(%p): WARNING: Unexpected "
     532            "server info.\n", serverInfo));
    533533    }
    534534}
    535535
    ServerManager::_UpdatingServerFailed(ExtendedServerInfo* serverInfo) 
    557557        serverInfo->SetState(STATE_OBSOLETE);
    558558        oldInfo->SetState(STATE_READY);
    559559    } else {
    560         WARN("ServerManager::_UpdatingServerFailed(%p): WARNING: Unexpected "
    561             "server info.\n", serverInfo);
     560        WARN(("ServerManager::_UpdatingServerFailed(%p): WARNING: Unexpected "
     561            "server info.\n", serverInfo));
    562562    }
    563563}
    564564
  • 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..9725727 100644
    a b ServerVolume::SetServerInfo(ExtendedServerInfo* serverInfo) 
    104104            PRINT(("  adding share: %s\n", shareInfo->GetShareName()));
    105105            status_t error = _AddShare(shareInfo);
    106106            if (error != B_OK) {
    107                 ERROR("ServerVolume::SetServerInfo(): ERROR: Failed to add "
    108                     "share `%s': %s\n", shareName, strerror(error));
     107                ERROR(("ServerVolume::SetServerInfo(): ERROR: Failed to add "
     108                    "share `%s': %s\n", shareName, strerror(error)));
    109109            }
    110110        }
    111111    }
    ServerVolume::Init(const char* name) 
    139139
    140140        error = _AddShare(shareInfo);
    141141        if (error != B_OK) {
    142             ERROR("ServerVolume::Init(): ERROR: Failed to add share `%s': "
    143                 "%s\n", shareInfo->GetShareName(), strerror(error));
     142            ERROR(("ServerVolume::Init(): ERROR: Failed to add share `%s': "
     143                "%s\n", shareInfo->GetShareName(), strerror(error)));
    144144        }
    145145    }
    146146
  • 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..42fd45d 100644
    a b PRINT(("ShareVolume::~ShareVolume()\n")); 
    190190    if (fNodes) {
    191191        // there shouldn't be any more nodes
    192192        if (fNodes->Size() > 0) {
    193             WARN("ShareVolume::~ShareVolume(): WARNING: There are still "
    194                 "%ld nodes\n", fNodes->Size());
     193            WARN(("ShareVolume::~ShareVolume(): WARNING: There are still "
     194                "%ld nodes\n", fNodes->Size()));
    195195        }
    196196        for (NodeMap::Iterator it = fNodes->GetIterator(); it.HasNext();)
    197197            delete it.Next().value;
    PRINT(("ShareVolume::~ShareVolume()\n")); 
    202202    if (fEntries) {
    203203        // there shouldn't be any more entries
    204204        if (fEntries->Size() > 0) {
    205             WARN("ShareVolume::~ShareVolume(): WARNING: There are still "
    206                 "%ld entries\n", fEntries->Size());
     205            WARN(("ShareVolume::~ShareVolume(): WARNING: There are still "
     206                "%ld entries\n", fEntries->Size()));
    207207        }
    208208        for (EntryMap::Iterator it = fEntries->GetIterator(); it.HasNext();)
    209209            delete it.Next().value;
    PRINT(("ShareVolume::PrepareToUnmount()\n")); 
    356356PRINT(("  %ld nodes to remove\n", count));
    357357    vnode_id* ids = new(std::nothrow) vnode_id[count];
    358358    if (!ids) {
    359         ERROR("ShareVolume::PrepareToUnmount(): ERROR: Insufficient memory to "
    360             "allocate the node ID array!\n");
     359        ERROR(("ShareVolume::PrepareToUnmount(): ERROR: Insufficient memory to "
     360            "allocate the node ID array!\n"));
    361361        return;
    362362    }
    363363    ArrayDeleter<vnode_id> _(ids);
    void 
    415415ShareVolume::RemoveChildVolume(Volume* volume)
    416416{
    417417    // should never be called
    418     WARN("WARNING: ShareVolume::RemoveChildVolume(%p) invoked!\n", volume);
     418    WARN(("WARNING: ShareVolume::RemoveChildVolume(%p) invoked!\n", volume));
    419419}
    420420
    421421
    ShareVolume::_ReadRemoteDir(ShareDir* directory, 
    21372137
    21382138            // add the entry
    21392139            if (!iterator->AddEntry(entry)) {
    2140                 ERROR("ShareVolume::_ReadRemoteDir(): ERROR: Failed to add "
    2141                     "entry to remote iterator!\n");
     2140                ERROR(("ShareVolume::_ReadRemoteDir(): ERROR: Failed to add "
     2141                    "entry to remote iterator!\n"));
    21422142            }
    21432143        }
    21442144
    ShareVolume::_RemoveAttrDirIterator(ShareNode* node, 
    27412741    DoublyLinkedList<ShareAttrDirIterator>* iteratorList
    27422742        = fAttrDirIterators->Get(node->GetID());
    27432743    if (!iteratorList) {
    2744         WARN("ShareVolume::_RemoveAttrDirIterator(): Iterator list not "
    2745             "found: node: %lld\n", node->GetID());
     2744        WARN(("ShareVolume::_RemoveAttrDirIterator(): Iterator list not "
     2745            "found: node: %lld\n", node->GetID()));
    27462746        return;
    27472747    }
    27482748
  • src/add-ons/kernel/file_systems/netfs/headers/shared/BlockingQueue.h

    diff --git a/src/add-ons/kernel/file_systems/netfs/headers/shared/BlockingQueue.h b/src/add-ons/kernel/file_systems/netfs/headers/shared/BlockingQueue.h
    index 2ba67c3..06261ec 100644
    a b BlockingQueue<Element>::Remove(Element* element) 
    175175        return B_ENTRY_NOT_FOUND;
    176176    }
    177177    if (count > 1) {
    178         ERROR("ERROR: BlockingQueue::Remove(): Removed %ld elements!\n",
    179             count);
     178        ERROR(("ERROR: BlockingQueue::Remove(): Removed %ld elements!\n",
     179            count));
    180180    }
    181181    return error;
    182182}
  • src/add-ons/kernel/file_systems/netfs/headers/shared/DebugSupport.h

    diff --git a/src/add-ons/kernel/file_systems/netfs/headers/shared/DebugSupport.h b/src/add-ons/kernel/file_systems/netfs/headers/shared/DebugSupport.h
    index 8e0dc49..b023970 100644
    a b void dbg_printf_end(); 
    121121    dbg_printf_end();                                                       \
    122122}
    123123
    124 #define TPRINT(x...)    DEBUG_CONTEXT( __out(x) )
     124#define TPRINT(x)   DEBUG_CONTEXT( __out x )
    125125#define TREPORT_ERROR(status)                                               \
    126126    DEBUG_CONTEXT_LINE( __out("%s\n", strerror(status)) )
    127127#define TRETURN_ERROR(err)                                                  \
    void dbg_printf_end(); 
    138138        TREPORT_ERROR(_status);                                             \
    139139        var = _status;                                                      \
    140140}
    141 #define TFUNCTION(x...)     DEBUG_CONTEXT_FUNCTION( ": ", __out(x) )
     141#define TFUNCTION(x)        DEBUG_CONTEXT_FUNCTION( ": ", __out x )
    142142#define TFUNCTION_START()   DEBUG_CONTEXT_FUNCTION( "\n",  )
    143143#define TFUNCTION_END()     DEBUG_CONTEXT_FUNCTION( " done\n",  )
    144144
    145145#if DEBUG
    146     #define PRINT(x...)             TPRINT(x)
     146    #define PRINT(x)                TPRINT(x)
    147147    #define REPORT_ERROR(status)    TREPORT_ERROR(status)
    148148    #define RETURN_ERROR(err)       TRETURN_ERROR(err)
    149149    #define SET_ERROR(var, err)     TSET_ERROR(var, err)
    150     #define FATAL(x...)             DEBUG_CONTEXT( __out(x) )
    151     #define ERROR(x...)             DEBUG_CONTEXT( __out(x) )
    152     #define WARN(x...)              DEBUG_CONTEXT( __out(x) )
    153     #define INFORM(x...)            DEBUG_CONTEXT( __out(x) )
    154     #define FUNCTION(x...)          TFUNCTION(x)
     150    #define FATAL(x)                DEBUG_CONTEXT( __out x )
     151    #define ERROR(x)                DEBUG_CONTEXT( __out x )
     152    #define WARN(x)             DEBUG_CONTEXT( __out x )
     153    #define INFORM(x)           DEBUG_CONTEXT( __out x )
     154    #define FUNCTION(x)         TFUNCTION(x)
    155155    #define FUNCTION_START()        TFUNCTION_START()
    156156    #define FUNCTION_END()          TFUNCTION_END()
    157157    #define DARG(x)                 x
    158158    #define D(x)                    {x;};
    159159#else
    160     #define PRINT(x...)             ;
     160    #define PRINT(x)                ;
    161161    #define REPORT_ERROR(status)    ;
    162162    #define RETURN_ERROR(status)    return status;
    163163    #define SET_ERROR(var, err)     var = err;
    164     #define FATAL(x...)             DEBUG_CONTEXT( __out(x) )
    165     #define ERROR(x...)             DEBUG_CONTEXT( __out(x) )
    166     #define WARN(x...)              DEBUG_CONTEXT( __out(x) )
    167     #define INFORM(x...)            DEBUG_CONTEXT( __out(x) )
    168     #define FUNCTION(x...)          ;
     164    #define FATAL(x)                DEBUG_CONTEXT( __out x )
     165    #define ERROR(x)                DEBUG_CONTEXT( __out x )
     166    #define WARN(x)             DEBUG_CONTEXT( __out x )
     167    #define INFORM(x)           DEBUG_CONTEXT( __out x )
     168    #define FUNCTION(x)         ;
    169169    #define FUNCTION_START()        ;
    170170    #define FUNCTION_END()          ;
    171171    #define DARG(x)
  • 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..7608f06 100644
    a b ClientConnection::VisitWriteAttrRequest(WriteAttrRequest* request) 
    22012201        if (fInverseClientEndianess) {
    22022202            if (_KnownAttributeType(type)) {
    22032203                if (pos != 0) {
    2204                     WARN("WriteAttr(): WARNING: Need to convert attribute "
     2204                    WARN(("WriteAttr(): WARNING: Need to convert attribute "
    22052205                        "endianess, but position is not 0: attribute: %s, "
    22062206                        "pos: %lld, size: %ld\n", request->name.GetString(),
    2207                         pos, size);
     2207                        pos, size));
    22082208                }
    22092209                swap_data(type, buffer, size, B_SWAP_ALWAYS);
    22102210            } else
    ClientConnection::ProcessQueryEvent(NodeMonitoringEvent* event) 
    25662566    } else {
    25672567        // We only support "entry created" and "entry removed" query events.
    25682568        // "entry moved" is split by the volume manager into those.
    2569         ERROR("Ignoring unexpected query event: opcode: 0x%lx\n",
    2570             event->opcode);
     2569        ERROR(("Ignoring unexpected query event: opcode: 0x%lx\n",
     2570            event->opcode));
    25712571        return;
    25722572    }
    25732573PRINT(("ClientConnection::ProcessQueryEvent(): event: %p, type: %s: directory: (%ld, %lld)\n", event, typeid(event).name(), volumeID, directoryID));
  • 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..712f7d3 100644
    a b public: 
    168168        // send the request
    169169        status_t error = requestChannel.SendRequest(&request);
    170170        if (error != B_OK) {
    171             ERROR("ServerInfoSender: ERROR: Failed to send request: %s\n",
    172                 strerror(error));
     171            ERROR(("ServerInfoSender: ERROR: Failed to send request: %s\n",
     172                strerror(error)));
    173173        }
    174174
    175175        SetDone(true);
    NetFSServer::Init() 
    328328        fBroadcaster = spawn_thread(&_BroadcasterEntry, "broadcaster",
    329329            B_NORMAL_PRIORITY, this);
    330330        if (fBroadcaster < 0) {
    331             WARN("NetFSServer::Init(): Failed to spawn broadcaster thread "
    332                 "(%s). Continuing anyway.\n", strerror(fBroadcaster));
     331            WARN(("NetFSServer::Init(): Failed to spawn broadcaster thread "
     332                "(%s). Continuing anyway.\n", strerror(fBroadcaster)));
    333333        }
    334334    }
    335335    return B_OK;
    NetFSServer::_LoadSecurityContext(SecurityContext** _securityContext) 
    809809        const char* userName = parameter.ValueAt(0);
    810810        const char* password = parameter.GetParameterValue("password");
    811811        if (!userName) {
    812             WARN("Skipping nameless user settings entry.\n");
     812            WARN(("Skipping nameless user settings entry.\n"));
    813813            continue;
    814814        }
    815815//      PRINT(("user: %s, password: %s\n", parameter.ValueAt(0),
    816816//          parameter.GetParameterValue("password")));
    817817        error = securityContext->AddUser(userName, password);
    818818        if (error != B_OK)
    819             ERROR("ERROR: Failed to add user `%s'\n", userName);
     819            ERROR(("ERROR: Failed to add user `%s'\n", userName));
    820820    }
    821821
    822822    // load shares
    NetFSServer::_LoadSecurityContext(SecurityContext** _securityContext) 
    825825        const char* shareName = parameter.ValueAt(0);
    826826        const char* path = parameter.GetParameterValue("path");
    827827        if (!shareName || !path) {
    828             WARN("settings: Skipping invalid share settings entry (no name"
    829                 " or no path).\n");
     828            WARN(("settings: Skipping invalid share settings entry (no name"
     829                " or no path).\n"));
    830830            continue;
    831831        }
    832832//      PRINT(("share: %s, path: %s\n", parameter.ValueAt(0),
    NetFSServer::_LoadSecurityContext(SecurityContext** _securityContext) 
    834834        Share* share;
    835835        error = securityContext->AddShare(shareName, path, &share);
    836836        if (error != B_OK) {
    837             ERROR("ERROR: Failed to add share `%s'\n", shareName);
     837            ERROR(("ERROR: Failed to add share `%s'\n", shareName));
    838838            continue;
    839839        }
    840840        BReference<Share> shareReference(share, true);
    NetFSServer::_LoadSecurityContext(SecurityContext** _securityContext) 
    847847//          PRINT(("  user: %s\n", userName));
    848848            User* user = securityContext->FindUser(userName);
    849849            if (!user) {
    850                 ERROR("ERROR: Undefined user `%s'.\n", userName);
     850                ERROR(("ERROR: Undefined user `%s'.\n", userName));
    851851                continue;
    852852            }
    853853            BReference<User> userReference(user, true);
    NetFSServer::_LoadSecurityContext(SecurityContext** _securityContext) 
    877877            error = securityContext->SetNodePermissions(share->GetPath(), user,
    878878                permissions);
    879879            if (error != B_OK) {
    880                 ERROR("ERROR: Failed to set permissions for share `%s'\n",
    881                     share->GetName());
     880                ERROR(("ERROR: Failed to set permissions for share `%s'\n",
     881                    share->GetName()));
    882882            }
    883883        }
    884884    }
    NetFSServer::_InitSettings() 
    894894{
    895895    status_t error = _LoadSettings();
    896896    if (error != B_OK) {
    897         WARN("NetFSServer::_InitSettings(): WARNING: Failed to load settings "
    898             "file: %s - falling back to driver settings.\n", strerror(error));
     897        WARN(("NetFSServer::_InitSettings(): WARNING: Failed to load settings "
     898            "file: %s - falling back to driver settings.\n", strerror(error)));
    899899
    900900        // fall back to the driver settings file
    901901        error = _LoadSecurityContext(&fSecurityContext);
    902902        if (error != B_OK) {
    903             WARN("NetFSServer::_InitSettings(): WARNING: Failed to load "
    904                 "settings from driver settings: %s\n", strerror(error));
     903            WARN(("NetFSServer::_InitSettings(): WARNING: Failed to load "
     904                "settings from driver settings: %s\n", strerror(error)));
    905905
    906906            // use defaults
    907907            // create a security context
    NetFSServer::_ConnectionListener() 
    11171117                    connection);
    11181118            if (initializer) {
    11191119                if (initializer->Run() != B_OK) {
    1120                     ERROR("Failed to run connection initializer.\n")
     1120                    ERROR(("Failed to run connection initializer.\n"))
    11211121                    delete initializer;
    11221122                }
    11231123            } else {
    1124                 ERROR("Failed to create connection initializer.\n")
     1124                ERROR(("Failed to create connection initializer.\n"))
    11251125                delete connection;
    11261126            }
    11271127
    NetFSServer::_Broadcaster() 
    11691169    // create the socket
    11701170    fBroadcastingSocket = socket(AF_INET, SOCK_DGRAM, 0);
    11711171    if (fBroadcastingSocket < 0) {
    1172         WARN("NetFSServer::_Broadcaster(): WARN: Failed to init broadcasting: "
    1173             "%s.\n", strerror(errno));
     1172        WARN(("NetFSServer::_Broadcaster(): WARN: Failed to init broadcasting: "
     1173            "%s.\n", strerror(errno)));
    11741174        return errno;
    11751175    }
    11761176
    NetFSServer::_Broadcaster() 
    11791179        int soBroadcastValue = 1;
    11801180        if (setsockopt(fBroadcastingSocket, SOL_SOCKET, SO_BROADCAST,
    11811181            &soBroadcastValue, sizeof(soBroadcastValue)) < 0) {
    1182             WARN("NetFSServer::_Broadcaster(): WARN: Failed to set "
    1183                 "SO_BROADCAST on socket: %s.\n", strerror(errno));
     1182            WARN(("NetFSServer::_Broadcaster(): WARN: Failed to set "
     1183                "SO_BROADCAST on socket: %s.\n", strerror(errno)));
    11841184        }
    11851185    #endif
    11861186
    NetFSServer::_Broadcaster() 
    12051205        ssize_t bytesSent = sendto(fBroadcastingSocket, &message,
    12061206            sizeof(message), 0, (sockaddr*)&addr, addrSize);
    12071207        if (bytesSent < 0) {
    1208             WARN("NetFSServer::_Broadcaster(): WARN: sending failed: %s.\n",
    1209                 strerror(errno));
     1208            WARN(("NetFSServer::_Broadcaster(): WARN: sending failed: %s.\n",
     1209                strerror(errno)));
    12101210            return errno;
    12111211        }
    12121212
    NetFSServer::_GetServerInfo(ServerInfo& serverInfo) 
    12971297    // set the server name and the connection method
    12981298    char hostName[1024];
    12991299    if (gethostname(hostName, sizeof(hostName)) < 0) {
    1300         ERROR("NetFSServer::_GetServerInfo(): ERROR: Failed to get host "
    1301             "name.");
     1300        ERROR(("NetFSServer::_GetServerInfo(): ERROR: Failed to get host "
     1301            "name."));
    13021302        return B_ERROR;
    13031303    }
    13041304    status_t error = serverInfo.SetServerName(hostName);
  • src/add-ons/kernel/file_systems/netfs/server/Node.cpp

    diff --git a/src/add-ons/kernel/file_systems/netfs/server/Node.cpp b/src/add-ons/kernel/file_systems/netfs/server/Node.cpp
    index b36c78a..1474167 100644
    a b Node::UpdateStat() 
    150150
    151151    // check if it is the same node
    152152    if (st.st_dev != fStat.st_dev || st.st_ino != fStat.st_ino) {
    153         ERROR("Node::UpdateStat(): ERROR: GetPath() returned path that "
     153        ERROR(("Node::UpdateStat(): ERROR: GetPath() returned path that "
    154154            "doesn't point to this node: node: (%ld, %lld), path: `%s'\n",
    155             GetVolumeID(), GetID(), path.GetPath());
     155            GetVolumeID(), GetID(), path.GetPath()));
    156156        return B_ENTRY_NOT_FOUND;
    157157    }
    158158
  • 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..8644b0f 100644
    a b PRINT(("%p->RequestChannel::SendRequest(): request: %p, type: %s\n", this, reque 
    169169    if (error != B_OK)
    170170        RETURN_ERROR(error);
    171171    if (size < 0 || size > kMaxSaneRequestSize) {
    172         ERROR("RequestChannel::SendRequest(): ERROR: Invalid request size: "
    173             "%ld\n", size);
     172        ERROR(("RequestChannel::SendRequest(): ERROR: Invalid request size: "
     173            "%ld\n", size));
    174174        RETURN_ERROR(B_BAD_DATA);
    175175    }
    176176
    RequestChannel::ReceiveRequest(Request** _request) 
    208208    header.type = B_HOST_TO_BENDIAN_INT32(header.type);
    209209    header.size = B_HOST_TO_BENDIAN_INT32(header.size);
    210210    if (header.size < 0 || header.size > kMaxSaneRequestSize) {
    211         ERROR("RequestChannel::ReceiveRequest(): ERROR: Invalid request size: "
    212             "%ld\n", header.size);
     211        ERROR(("RequestChannel::ReceiveRequest(): ERROR: Invalid request size: "
     212            "%ld\n", header.size));
    213213        RETURN_ERROR(B_BAD_DATA);
    214214    }
    215215