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