file_systems/netfs: Fix -Wformat=
Change-Id: I291900a38cedf6b0bf6b61e55256ba60bff7935d Reviewed-on: https://review.haiku-os.org/c/haiku/+/3349 Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
committed by
Jérôme Duval
parent
47472aae7b
commit
ebb21bd148
@@ -1608,12 +1608,13 @@ ClientConnection::VisitOpenDirRequest(OpenDirRequest* request)
|
||||
if (result == B_OK) {
|
||||
_GetNodeInfo(directory, &reply.nodeInfo);
|
||||
reply.cookie = handle->GetCookie();
|
||||
} else {
|
||||
if (directory != NULL) {
|
||||
PRINT("OpenDir() failed: client volume: %" B_PRId32 ", "
|
||||
"node: (%" B_PRIdDEV ", %" B_PRIdINO ")\n",
|
||||
volume->GetID(), directory->GetVolumeID(), directory->GetID());
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (directory)
|
||||
PRINT("OpenDir() failed: client volume: %ld, node: (%ld, %lld)\n",
|
||||
volume->GetID(), directory->GetVolumeID(), directory->GetID());
|
||||
}
|
||||
|
||||
managerLocker.Unlock();
|
||||
|
||||
@@ -1677,9 +1678,10 @@ ClientConnection::VisitReadDirRequest(ReadDirRequest* request)
|
||||
result = B_PERMISSION_DENIED;
|
||||
}
|
||||
|
||||
if (result == B_OK) {
|
||||
PRINT("ReadDir: (%ld, %lld)\n", request->volumeID, directory->GetID());
|
||||
}
|
||||
if (result == B_OK) {
|
||||
PRINT("ReadDir: (%" B_PRId32 ", %" B_PRIdINO ")\n", request->volumeID,
|
||||
directory->GetID());
|
||||
}
|
||||
|
||||
// rewind, if requested
|
||||
if (result == B_OK && request->rewind)
|
||||
@@ -1711,11 +1713,13 @@ if (result == B_OK) {
|
||||
//directoryID, reply.error, reply.entryInfos.CountElements(),
|
||||
//reply.entryInfo.directoryID,
|
||||
//reply.entryInfo.nodeID, reply.entryInfo.name.GetString()));
|
||||
if (directory) {
|
||||
PRINT("ReadDir done: volume: %ld, (%ld, %lld) -> (%lx, %ld)\n",
|
||||
volume->GetID(), directory->GetVolumeID(), directory->GetID(), result,
|
||||
reply.entryInfos.CountElements());
|
||||
}
|
||||
if (directory != NULL) {
|
||||
PRINT("ReadDir done: volume: %" B_PRId32 ", "
|
||||
"(%" B_PRIdDEV ", %" B_PRIdINO ") -> "
|
||||
"(%" B_PRIx32 ", %" B_PRId32 ")\n",
|
||||
volume->GetID(), directory->GetVolumeID(), directory->GetID(),
|
||||
result, reply.entryInfos.CountElements());
|
||||
}
|
||||
|
||||
managerLocker.Unlock();
|
||||
|
||||
@@ -1788,7 +1792,8 @@ ClientConnection::VisitWalkRequest(WalkRequest* request)
|
||||
|
||||
// send the reply
|
||||
reply.error = result;
|
||||
PRINT("Walk: (%ld, %lld, `%s') -> (%lx, (%ld, %lld), `%s')\n",
|
||||
PRINT("Walk: (%" B_PRIdDEV ", %" B_PRIdINO ", `%s') -> "
|
||||
"(%" B_PRIx32 ", (%" B_PRIdDEV ", %" B_PRIdINO "), `%s')\n",
|
||||
request->nodeID.volumeID, request->nodeID.nodeID,
|
||||
request->name.GetString(), result,
|
||||
reply.entryInfo.nodeInfo.st.st_dev,
|
||||
@@ -1854,7 +1859,8 @@ ClientConnection::VisitMultiWalkRequest(MultiWalkRequest* request)
|
||||
|
||||
// send the reply
|
||||
reply.error = result;
|
||||
PRINT("MultiWalk: (%ld, %lld, %ld) -> (%lx, %ld)\n",
|
||||
PRINT("MultiWalk: (%" B_PRIdDEV ", %" B_PRIdINO ", %" B_PRId32 ") -> "
|
||||
"(%" B_PRIx32 ", %" B_PRId32 ")\n",
|
||||
request->nodeID.volumeID, request->nodeID.nodeID, count,
|
||||
result, reply.entryInfos.CountElements());
|
||||
return GetChannel()->SendRequest(&reply);
|
||||
@@ -2432,7 +2438,7 @@ ClientConnection::VisitReadQueryRequest(ReadQueryRequest* request)
|
||||
break;
|
||||
if (countRead == 0)
|
||||
break;
|
||||
PRINT(" query entry: %ld, %lld, \"%s\"\n",
|
||||
PRINT(" query entry: %" B_PRIdDEV ", %" B_PRIdINO ", \"%s\"\n",
|
||||
dirEntry->d_pdev, dirEntry->d_pino, dirEntry->d_name);
|
||||
|
||||
VolumeManagerLocker managerLocker;
|
||||
@@ -2460,9 +2466,8 @@ ClientConnection::VisitReadQueryRequest(ReadQueryRequest* request)
|
||||
_GetNodeInfo(entry->GetDirectory(), &reply.dirInfo);
|
||||
_GetEntryInfo(entry, &reply.entryInfo);
|
||||
break;
|
||||
}
|
||||
else
|
||||
PRINT((" -> no client volumes\n"));
|
||||
} else
|
||||
PRINT((" -> no client volumes\n"));
|
||||
}
|
||||
|
||||
// entry is not in the volume: next round...
|
||||
@@ -2472,8 +2477,10 @@ PRINT((" -> no client volumes\n"));
|
||||
// send the reply
|
||||
reply.error = result;
|
||||
reply.count = countRead;
|
||||
PRINT("ReadQuery: (%lx, %ld, dir: (%ld, %lld), node: (%ld, %lld, `%s')"
|
||||
"\n", reply.error, reply.count,
|
||||
PRINT("ReadQuery: (%" B_PRIx32 ", %" B_PRId32 ", "
|
||||
"dir: (%" B_PRIdDEV ", %" B_PRIdINO "), "
|
||||
"node: (%" B_PRIdDEV ", %" B_PRIdINO ", `%s')\n",
|
||||
reply.error, reply.count,
|
||||
reply.entryInfo.directoryID.volumeID,
|
||||
reply.entryInfo.directoryID.nodeID,
|
||||
reply.entryInfo.nodeInfo.st.st_dev,
|
||||
@@ -2573,8 +2580,8 @@ ClientConnection::ProcessQueryEvent(NodeMonitoringEvent* event)
|
||||
return;
|
||||
}
|
||||
PRINT("ClientConnection::ProcessQueryEvent(): event: %p, type: %s:"
|
||||
" directory: (%ld, %lld)\n", event, typeid(event).name(),
|
||||
volumeID, directoryID);
|
||||
" directory: (%" B_PRIdDEV ", %" B_PRIdINO ")\n",
|
||||
event, typeid(event).name(), volumeID, directoryID);
|
||||
|
||||
// create an array for the IDs of the client volumes a found entry may
|
||||
// reside on
|
||||
|
||||
@@ -101,10 +101,10 @@ NodeMonitor::StartWatching(const node_ref& ref)
|
||||
if (error == B_OK)
|
||||
error = watch_node(&ref, flags, this);
|
||||
}
|
||||
if (error == B_OK) {
|
||||
PRINT("NodeMonitor: started watching node: (%ld, %lld)\n", ref.device,
|
||||
ref.node);
|
||||
}
|
||||
if (error == B_OK) {
|
||||
PRINT("NodeMonitor: started watching node: "
|
||||
"(%" B_PRIdDEV ", %" B_PRIdINO ")\n", ref.device, ref.node);
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -112,8 +112,8 @@ if (error == B_OK) {
|
||||
status_t
|
||||
NodeMonitor::StopWatching(const node_ref& ref)
|
||||
{
|
||||
PRINT("NodeMonitor: stopped watching node: (%ld, %lld)\n", ref.device,
|
||||
ref.node);
|
||||
PRINT("NodeMonitor: stopped watching node: "
|
||||
"(%" B_PRIdDEV ", %" B_PRIdINO ")\n", ref.device, ref.node);
|
||||
return watch_node(&ref, B_STOP_WATCHING, this);
|
||||
}
|
||||
|
||||
|
||||
@@ -719,8 +719,8 @@ VolumeManager::LoadEntry(dev_t volumeID, ino_t directoryID, const char* name,
|
||||
Entry* entry = GetEntry(volumeID, directoryID, name);
|
||||
if (!entry) {
|
||||
// entry not known yet: create it
|
||||
PRINT("VolumeManager::LoadEntry(%ld, %lld, `%s')\n", volumeID,
|
||||
directoryID, name);
|
||||
PRINT("VolumeManager::LoadEntry(%" B_PRIdDEV ", "
|
||||
"%" B_PRIdINO ", `%s')\n", volumeID, directoryID, name);
|
||||
|
||||
// get the volume
|
||||
Volume* volume = GetVolume(volumeID, true);
|
||||
@@ -791,7 +791,8 @@ VolumeManager::OpenQuery(QueryDomain* queryDomain, const char* queryString,
|
||||
if (!queryDomain || !queryString || !handle)
|
||||
return B_BAD_VALUE;
|
||||
bool liveQuery = (flags & B_LIVE_QUERY);
|
||||
PRINT("VolumeManager::OpenQuery(%p, \"%s\", 0x%lx, %ld, %ld)\n",
|
||||
PRINT("VolumeManager::OpenQuery(%p, \"%s\", 0x%" B_PRIx32 ", "
|
||||
"%" B_PRId32 ", %" B_PRId32 ")\n",
|
||||
queryDomain, queryString, flags, remotePort, remoteToken);
|
||||
|
||||
// allocate the handle
|
||||
@@ -827,8 +828,8 @@ VolumeManager::OpenQuery(QueryDomain* queryDomain, const char* queryString,
|
||||
// branches of the FS tree and don't have common nodes.
|
||||
if (!queryDomain->QueryDomainIntersectsWith(volume))
|
||||
continue;
|
||||
PRINT("VolumeManager::OpenQuery(): adding Query for volume %ld"
|
||||
"\n", volume->GetID());
|
||||
PRINT("VolumeManager::OpenQuery(): adding Query for volume "
|
||||
"%" B_PRIdDEV "\n", volume->GetID());
|
||||
|
||||
// create the query for this volume
|
||||
BVolume bVolume(volume->GetID());
|
||||
@@ -1710,7 +1711,7 @@ VolumeManager::_CheckVolumeRootMoved(EntryMovedEvent* event)
|
||||
event->nodeID = st.st_ino;
|
||||
if (Volume* volume = GetVolume(st.st_dev)) {
|
||||
if (volume->GetRootID() == st.st_ino) {
|
||||
PRINT("Mount point for volume %ld renamed\n",
|
||||
PRINT("Mount point for volume %" B_PRIdDEV " renamed\n",
|
||||
volume->GetID());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ PRINT(("InsecureConnection::Init\n"));
|
||||
// open the remaining channels
|
||||
int32 allChannels = upStreamChannels + downStreamChannels;
|
||||
for (int32 i = 1; i < allChannels; i++) {
|
||||
PRINT(" creating channel %ld\n", i);
|
||||
PRINT(" creating channel %" B_PRId32 "\n", i);
|
||||
// open the channel
|
||||
error = _OpenClientChannel(serverAddr, port, &channel);
|
||||
if (error != B_OK)
|
||||
@@ -292,7 +292,7 @@ PRINT(("InsecureConnection::FinishInitialization()\n"));
|
||||
}
|
||||
RETURN_ERROR(error);
|
||||
}
|
||||
PRINT(" accepting channel %ld\n", i);
|
||||
PRINT(" accepting channel %" B_PRId32 "\n", i);
|
||||
// create a channel
|
||||
channel = new(std::nothrow) InsecureChannel(channelFD);
|
||||
if (!channel) {
|
||||
|
||||
@@ -69,43 +69,43 @@ RequestDumper::Visit(RequestMember* member, uint16& data)
|
||||
void
|
||||
RequestDumper::Visit(RequestMember* member, int32& data)
|
||||
{
|
||||
PRINT("%sint32: %ld\n", _Indentation(), data);
|
||||
PRINT("%sint32: %" B_PRId32 "\n", _Indentation(), data);
|
||||
}
|
||||
|
||||
// Visit
|
||||
void
|
||||
RequestDumper::Visit(RequestMember* member, uint32& data)
|
||||
{
|
||||
PRINT("%suint32: %lu\n", _Indentation(), data);
|
||||
PRINT("%suint32: %" B_PRIu32 "\n", _Indentation(), data);
|
||||
}
|
||||
|
||||
// Visit
|
||||
void
|
||||
RequestDumper::Visit(RequestMember* member, int64& data)
|
||||
{
|
||||
PRINT("%sint64: %lld\n", _Indentation(), data);
|
||||
PRINT("%sint64: %" B_PRId64 "\n", _Indentation(), data);
|
||||
}
|
||||
|
||||
// Visit
|
||||
void
|
||||
RequestDumper::Visit(RequestMember* member, uint64& data)
|
||||
{
|
||||
PRINT("%suint64: %llu\n", _Indentation(), data);
|
||||
PRINT("%suint64: %" B_PRIu64 "\n", _Indentation(), data);
|
||||
}
|
||||
|
||||
// Visit
|
||||
void
|
||||
RequestDumper::Visit(RequestMember* member, Data& data)
|
||||
{
|
||||
PRINT("%sdata: %p (%ld bytes)\n", _Indentation(), data.GetData(),
|
||||
data.GetSize());
|
||||
PRINT("%sdata: %p (%" B_PRId32 " bytes)\n", _Indentation(),
|
||||
data.GetData(), data.GetSize());
|
||||
}
|
||||
|
||||
// Visit
|
||||
void
|
||||
RequestDumper::Visit(RequestMember* member, StringData& data)
|
||||
{
|
||||
PRINT("%sstring: \"%s\" (%p, %ld bytes)\n", _Indentation(),
|
||||
PRINT("%sstring: \"%s\" (%p, %" B_PRId32 " bytes)\n", _Indentation(),
|
||||
data.GetString(), data.GetString(), data.GetSize());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user