From Murai Takashi <tmurai01@xxxxxxxxx>:
Murai Takashi has uploaded this change for review. (
https://review.haiku-os.org/c/haiku/+/3335 ;)
Change subject: file_systems/reiserfs: Fix -WFormat=
......................................................................
file_systems/reiserfs: Fix -WFormat=
Change-Id: Id8b4c3137cfcabaef09d8adf55a3ab6667b5c55c
---
M src/add-ons/kernel/file_systems/reiserfs/BlockCache.cpp
M src/add-ons/kernel/file_systems/reiserfs/DirItem.h
M src/add-ons/kernel/file_systems/reiserfs/Settings.cpp
M src/add-ons/kernel/file_systems/reiserfs/StatItem.h
M src/add-ons/kernel/file_systems/reiserfs/kernel_interface.cpp
5 files changed, 117 insertions(+), 103 deletions(-)
git pull ssh://git.haiku-os.org:22/haiku refs/changes/35/3335/1
diff --git a/src/add-ons/kernel/file_systems/reiserfs/BlockCache.cpp
b/src/add-ons/kernel/file_systems/reiserfs/BlockCache.cpp
index a5db7ef..0b92669 100644
--- a/src/add-ons/kernel/file_systems/reiserfs/BlockCache.cpp
+++ b/src/add-ons/kernel/file_systems/reiserfs/BlockCache.cpp
@@ -6,12 +6,12 @@
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
-//
+//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -52,13 +52,13 @@
// constructor
BlockCache::BlockCache()
: fDevice(-1),
- fBlockSize(0),
- fBlockCount(0),
- fLock(),
- fBlocks(),
- fReads(0),
- fBlockGets(0),
- fBlockReleases(0)
+ fBlockSize(0),
+ fBlockCount(0),
+ fLock(),
+ fBlocks(),
+ fReads(0),
+ fBlockGets(0),
+ fBlockReleases(0)
{
}
@@ -73,9 +73,9 @@
}
delete block;
}
- PRINT(("statistics: %Ld block reads\n", fReads));
- PRINT(("statistics: %Ld block gets\n", fBlockGets));
- PRINT(("statistics: %Ld block releases\n", fBlockReleases));
+ PRINT(("statistics: %" B_PRId64 " block reads\n", fReads));
+ PRINT(("statistics: %" B_PRId64 " block gets\n", fBlockGets));
+ PRINT(("statistics: %" B_PRId64 " block releases\n", fBlockReleases));
if (fCacheHandle)
block_cache_delete(fCacheHandle, false);
fLock.Unlock();
diff --git a/src/add-ons/kernel/file_systems/reiserfs/DirItem.h
b/src/add-ons/kernel/file_systems/reiserfs/DirItem.h
index e6d8f79..fdff8f3 100644
--- a/src/add-ons/kernel/file_systems/reiserfs/DirItem.h
+++ b/src/add-ons/kernel/file_systems/reiserfs/DirItem.h
@@ -57,9 +57,9 @@
void Dump()
{
PRINT((" dir entry\n"));
- PRINT((" offset: %lu\n", GetOffset()));
- PRINT((" dir ID: %lu\n", GetDirID()));
- PRINT((" object ID: %lu\n", GetObjectID()));
+ PRINT((" offset: %" B_PRIu32 "\n", GetOffset()));
+ PRINT((" dir ID: %" B_PRIu32 "\n", GetDirID()));
+ PRINT((" object ID: %" B_PRIu32 "\n", GetObjectID()));
PRINT((" location: %hu\n", GetLocation()));
PRINT((" state: %hx\n", GetState()));
}
diff --git a/src/add-ons/kernel/file_systems/reiserfs/Settings.cpp
b/src/add-ons/kernel/file_systems/reiserfs/Settings.cpp
index ec538c8..d520a1d 100644
--- a/src/add-ons/kernel/file_systems/reiserfs/Settings.cpp
+++ b/src/add-ons/kernel/file_systems/reiserfs/Settings.cpp
@@ -6,12 +6,12 @@
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
-//
+//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -40,9 +40,9 @@
// constructor
Settings::Settings()
: fDefaultVolumeName(),
- fVolumeName(),
- fHideEsoteric(kDefaultHideEsoteric),
- fHiddenEntries(5)
+ fVolumeName(),
+ fHideEsoteric(kDefaultHideEsoteric),
+ fHiddenEntries(5)
{
}
@@ -74,7 +74,8 @@
status_t
Settings::SetTo(off_t volumeOffset, off_t volumeSize)
{
-PRINT(("Settings::SetTo(%Ld, %Ld)\n", volumeOffset, volumeSize));
+ PRINT(("Settings::SetTo(%" B_PRIdOFF ", %" B_PRIdOFF ")\n",
volumeOffset,
+ volumeSize));
// unset
Unset();
// load the driver settings and find the entry for the volume
@@ -86,7 +87,8 @@
// init the object and unload the settings
_Init(ds, volume);
unload_driver_settings(settings);
-PRINT(("Settings::SetTo(%Ld, %Ld) done: B_OK\n", volumeOffset, volumeSize));
+ PRINT(("Settings::SetTo(%" B_PRIdOFF ", %" B_PRIdOFF ") done: B_OK\n",
+ volumeOffset, volumeSize));
return B_OK;
}
@@ -143,7 +145,7 @@
PRINT((" default volume name: `%s'\n", GetDefaultVolumeName()));
PRINT((" volume name: `%s'\n", GetVolumeName()));
PRINT((" hide esoteric entries: %d\n", GetHideEsoteric()));
- PRINT((" %ld hidden entries:\n", fHiddenEntries.CountItems()));
+ PRINT((" %" B_PRId32 " hidden entries:\n",
fHiddenEntries.CountItems()));
for (int32 i = 0; const char *entry = HiddenEntryAt(i); i++)
PRINT((" `%s'\n", entry));
}
@@ -160,17 +162,17 @@
"default_volume_name", (const char*)NULL, NULL));
PRINT((" default_volume_name is: `%s'\n", fDefaultVolumeName.GetString()));
fHideEsoteric = _GetParameterValue(settings, "hide_esoteric_entries",
-
kDefaultHideEsoteric,
-
kDefaultHideEsoteric);
+
kDefaultHideEsoteric,
+
kDefaultHideEsoteric);
PRINT((" hide_esoteric_entries is: %d\n", fHideEsoteric));
// get the per volume settings
if (volume) {
PRINT((" getting volume parameters:\n"));
fVolumeName.SetTo(_GetParameterValue(volume, "name", (const
char*)NULL,
-
NULL));
+
NULL));
PRINT((" name is: `%s'\n", fVolumeName.GetString()));
fHideEsoteric = _GetParameterValue(volume,
"hide_esoteric_entries",
-
fHideEsoteric, fHideEsoteric);
+
fHideEsoteric, fHideEsoteric);
PRINT((" hide_esoteric_entries is: %d\n", fHideEsoteric));
int32 cookie = 0;
while (const driver_parameter *parameter
@@ -202,7 +204,7 @@
// _FindVolumeParameter
const driver_parameter *
Settings::_FindVolumeParameter(const driver_settings *settings,
- const char *name)
+ const char
*name)
{
if (settings) {
int32 cookie = 0;
@@ -220,9 +222,10 @@
// _FindVolumeParameter
const driver_parameter *
Settings::_FindVolumeParameter(const driver_settings *settings,
- off_t offset, off_t
size)
+ off_t offset,
off_t size)
{
-PRINT(("Settings::_FindVolumeParameter(%Ld, %Ld)\n", offset, size));
+ PRINT(("Settings::_FindVolumeParameter(%" B_PRIdOFF ", %" B_PRIdOFF
")\n",
+ offset, size));
if (settings) {
int32 cookie = 0;
while (const driver_parameter *parameter
@@ -231,13 +234,13 @@
== offset
&& _GetParameterValue(parameter, "size", size +
1, size + 1)
== size) {
-PRINT(("Settings::_FindVolumeParameter() done: found parameter: index: %ld, "
-"(%p)\n", cookie - 1, parameter));
+ PRINT(("Settings::_FindVolumeParameter() done:
found parameter:"
+ " index: %" B_PRId32 ", (%p)\n", cookie
- 1, parameter));
return parameter;
}
}
}
-PRINT(("Settings::_FindVolumeParameter() done: failed\n"));
+ PRINT(("Settings::_FindVolumeParameter() done: failed\n"));
return NULL;
}
diff --git a/src/add-ons/kernel/file_systems/reiserfs/StatItem.h
b/src/add-ons/kernel/file_systems/reiserfs/StatItem.h
index e3db5c9..2151431 100644
--- a/src/add-ons/kernel/file_systems/reiserfs/StatItem.h
+++ b/src/add-ons/kernel/file_systems/reiserfs/StatItem.h
@@ -6,12 +6,12 @@
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
-//
+//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -103,61 +103,61 @@
uint16 GetMode() const
{
return (GetVersion() == STAT_DATA_V2 ?
le2h(fCurrentData->sd_mode)
-
: le2h(fOldData->sd_mode));
+
: le2h(fOldData->sd_mode));
}
uint32 GetNLink() const
{
return (GetVersion() == STAT_DATA_V2 ?
le2h(fCurrentData->sd_nlink)
-
: le2h(fOldData->sd_nlink));
+
: le2h(fOldData->sd_nlink));
}
uint32 GetUID() const
{
return (GetVersion() == STAT_DATA_V2 ?
le2h(fCurrentData->sd_uid)
-
: le2h(fOldData->sd_uid));
+
: le2h(fOldData->sd_uid));
}
uint32 GetGID() const
{
return (GetVersion() == STAT_DATA_V2 ?
le2h(fCurrentData->sd_gid)
-
: le2h(fOldData->sd_gid));
+
: le2h(fOldData->sd_gid));
}
uint64 GetSize() const
{
return (GetVersion() == STAT_DATA_V2 ?
le2h(fCurrentData->sd_size)
-
: le2h(fOldData->sd_size));
+
: le2h(fOldData->sd_size));
}
uint32 GetATime() const
{
return (GetVersion() == STAT_DATA_V2 ?
le2h(fCurrentData->sd_atime)
-
: le2h(fOldData->sd_atime));
+
: le2h(fOldData->sd_atime));
}
uint32 GetMTime() const
{
return (GetVersion() == STAT_DATA_V2 ?
le2h(fCurrentData->sd_mtime)
-
: le2h(fOldData->sd_mtime));
+
: le2h(fOldData->sd_mtime));
}
uint32 GetCTime() const
{
return (GetVersion() == STAT_DATA_V2 ?
le2h(fCurrentData->sd_ctime)
-
: le2h(fOldData->sd_ctime));
+
: le2h(fOldData->sd_ctime));
}
uint32 GetBlocks() const
{
return (GetVersion() == STAT_DATA_V2 ?
le2h(fCurrentData->sd_blocks)
-
: le2h(fOldData->u.sd_blocks));
+
: le2h(fOldData->u.sd_blocks));
}
uint32 GetRDev() const
{
return (GetVersion() == STAT_DATA_V2 ?
le2h(fCurrentData->u.sd_rdev)
-
: le2h(fOldData->u.sd_rdev));
+
: le2h(fOldData->u.sd_rdev));
}
uint32 GetGeneration() const
@@ -176,16 +176,16 @@
{
PRINT(("StatData:\n"));
PRINT((" mode: %hx\n", GetMode()));
- PRINT((" nlink: %lu\n", GetNLink()));
- PRINT((" uid: %lx\n", GetUID()));
- PRINT((" gid: %lx\n", GetGID()));
- PRINT((" size: %Lu\n", GetSize()));
- PRINT((" atime: %lu\n", GetATime()));
- PRINT((" mtime: %lu\n", GetMTime()));
- PRINT((" ctime: %lu\n", GetCTime()));
- PRINT((" blocks: %lu\n", GetBlocks()));
- PRINT((" rdev: %lu\n", GetRDev()));
- PRINT((" generation: %lu\n", GetGeneration()));
+ PRINT((" nlink: %" B_PRIu32 "\n", GetNLink()));
+ PRINT((" uid: %" B_PRIx32 "\n", GetUID()));
+ PRINT((" gid: %" B_PRIx32 "\n", GetGID()));
+ PRINT((" size: %" B_PRIu64 "\n", GetSize()));
+ PRINT((" atime: %" B_PRIu32 "\n", GetATime()));
+ PRINT((" mtime: %" B_PRIu32 "\n", GetMTime()));
+ PRINT((" ctime: %" B_PRIu32 "\n", GetCTime()));
+ PRINT((" blocks: %" B_PRIu32 "\n", GetBlocks()));
+ PRINT((" rdev: %" B_PRIu32 "\n", GetRDev()));
+ PRINT((" generation: %" B_PRIu32 "\n", GetGeneration()));
}
StatData &operator=(const StatData &data)
diff --git a/src/add-ons/kernel/file_systems/reiserfs/kernel_interface.cpp
b/src/add-ons/kernel/file_systems/reiserfs/kernel_interface.cpp
index 4f36f8b..222c271 100644
--- a/src/add-ons/kernel/file_systems/reiserfs/kernel_interface.cpp
+++ b/src/add-ons/kernel/file_systems/reiserfs/kernel_interface.cpp
@@ -182,8 +182,10 @@
// FUNCTION_START();
Volume *volume = (Volume*)fs->private_volume;
VNode *dir = (VNode*)_dir->private_node;
-FUNCTION(("dir: (%Ld: %lu, %lu), entry: `%s'\n", dir->GetID(), dir->GetDirID(),
- dir->GetObjectID(), entryName));
+ FUNCTION(("dir: (%" B_PRIdINO ": %" B_PRIu32 ", %" B_PRIu32 "), "
+ "entry: `%s'\n",
+ dir->GetID(), dir->GetDirID(), dir->GetObjectID(),
+ entryName));
status_t error = B_OK;
VNode *entryNode = NULL;
@@ -236,8 +238,8 @@
{
TOUCH(reenter);
// FUNCTION_START();
- FUNCTION(("(%Ld: %lu, %ld)\n", vnid, VNode::GetDirIDFor(vnid),
- VNode::GetObjectIDFor(vnid)));
+ FUNCTION(("(%" B_PRIdINO ": %" B_PRIu32 ", %" B_PRIu32 ")\n",
+ vnid, VNode::GetDirIDFor(vnid), VNode::GetObjectIDFor(vnid)));
Volume *volume = (Volume*)fs->private_volume;
status_t error = B_OK;
VNode *foundNode = new(nothrow) VNode;
@@ -287,8 +289,8 @@
// FUNCTION_START();
Volume *volume = (Volume*)fs->private_volume;
VNode *node = (VNode*)_node->private_node;
-FUNCTION(("node: (%Ld: %lu, %lu)\n", node->GetID(), node->GetDirID(),
- node->GetObjectID()));
+ FUNCTION(("node: (%" B_PRIdINO ": %" B_PRIu32 ", %" B_PRIu32 ")\n",
+ node->GetID(), node->GetDirID(), node->GetObjectID()));
status_t error = B_OK;
// read symlinks only
if (!node->IsSymlink())
@@ -305,8 +307,8 @@
{
TOUCH(fs);
VNode *node = (VNode*)_node->private_node;
- FUNCTION(("node: (%Ld: %lu, %lu)\n", node->GetID(), node->GetDirID(),
- node->GetObjectID()));
+ FUNCTION(("node: (%" B_PRIdINO ": %" B_PRIu32 ", %" B_PRIu32 ")\n",
+ node->GetID(), node->GetDirID(), node->GetObjectID()));
// write access requested?
if (mode & W_OK)
@@ -326,8 +328,8 @@
// FUNCTION_START();
Volume *volume = (Volume*)fs->private_volume;
VNode *node = (VNode*)_node->private_node;
-FUNCTION(("node: (%Ld: %lu, %lu)\n", node->GetID(), node->GetDirID(),
- node->GetObjectID()));
+ FUNCTION(("node: (%" B_PRIdINO ": %" B_PRIu32 ", %" B_PRIu32 ")\n",
+ node->GetID(), node->GetDirID(), node->GetObjectID()));
status_t error = B_OK;
StatData *statData = node->GetStatData();
st->st_dev = volume->GetID();
@@ -355,8 +357,8 @@
// FUNCTION_START();
Volume *volume = (Volume*)fs->private_volume;
VNode *node = (VNode*)_node->private_node;
-FUNCTION(("node: (%Ld: %lu, %lu)\n", node->GetID(), node->GetDirID(),
- node->GetObjectID()));
+ FUNCTION(("node: (%" B_PRIdINO ": %" B_PRIu32 ", %" B_PRIu32 ")\n",
+ node->GetID(), node->GetDirID(), node->GetObjectID()));
status_t error = B_OK;
// check the open mode
if ((openMode & O_RWMASK) == O_WRONLY || (openMode & O_RWMASK) == O_RDWR
@@ -386,8 +388,8 @@
TOUCH(fs); TOUCH(cookie);
// FUNCTION_START();
VNode *node = (VNode*)_node->private_node;
-FUNCTION(("node: (%Ld: %lu, %lu)\n", node->GetID(), node->GetDirID(),
- node->GetObjectID()));
+ FUNCTION(("node: (%" B_PRIdINO ": %" B_PRIu32 ", %" B_PRIu32 ")\n",
+ node->GetID(), node->GetDirID(), node->GetObjectID()));
TOUCH(node);
return B_OK;
}
@@ -399,8 +401,8 @@
TOUCH(fs);
// FUNCTION_START();
VNode *node = (VNode*)_node->private_node;
-FUNCTION(("node: (%Ld: %lu, %lu)\n", node->GetID(), node->GetDirID(),
- node->GetObjectID()));
+ FUNCTION(("node: (%" B_PRIdINO ": %" B_PRIu32 ", %" B_PRIu32 ")\n",
+ node->GetID(), node->GetDirID(), node->GetObjectID()));
TOUCH(node);
StreamReader *reader = (StreamReader*)cookie;
delete reader;
@@ -416,9 +418,10 @@
// FUNCTION_START();
// Volume *volume = (Volume*)fs->private_volume;
VNode *node = (VNode*)_node->private_node;
- FUNCTION(("((%Ld: %lu, %lu), %Ld, %p, %lu)\n", node->GetID(),
- node->GetDirID(), node->GetObjectID(), pos, buffer,
- *bufferSize));
+ FUNCTION(("((%" B_PRIdINO ": %" B_PRIu32 ", %" B_PRIu32 "), "
+ "%" B_PRIdOFF ", %p, %lu)\n",
+ node->GetID(), node->GetDirID(), node->GetObjectID(),
+ pos, buffer, *bufferSize));
status_t error = B_OK;
// don't read anything but files
if (!node->IsFile()) {
@@ -446,8 +449,8 @@
DirectoryCookie(Tree *tree, uint32 dirID, uint32 objectID,
uint64 startOffset = 0, bool fixedHash
= false)
: DirEntryIterator(tree, dirID, objectID, startOffset,
- fixedHash),
- fEncounteredDotDot(false)
+ fixedHash),
+ fEncounteredDotDot(false)
{
}
@@ -475,8 +478,8 @@
// FUNCTION_START();
Volume *volume = (Volume*)fs->private_volume;
VNode *node = (VNode*)_node->private_node;
-FUNCTION(("node: (%Ld: %lu, %lu)\n", node->GetID(), node->GetDirID(),
- node->GetObjectID()));
+ FUNCTION(("node: (%" B_PRIdINO ": %" B_PRIu32 ", %" B_PRIu32 ")\n",
+ node->GetID(), node->GetDirID(), node->GetObjectID()));
status_t error = (node->IsDir() ? B_OK : B_NOT_A_DIRECTORY);
if (error == B_OK) {
DirectoryCookie *iterator = new(nothrow) DirectoryCookie(
@@ -497,7 +500,7 @@
// set_dirent_name
static status_t
set_dirent_name(struct dirent *buffer, size_t bufferSize,
- const char *name, int32
nameLen)
+ const char *name, int32 nameLen)
{
size_t length = (buffer->d_name + nameLen + 1) - (char*)buffer;
if (length <= bufferSize) {
@@ -516,8 +519,8 @@
TOUCH(fs); TOUCH(cookie);
// FUNCTION_START();
VNode *node = (VNode*)_node->private_node;
-FUNCTION(("node: (%Ld: %lu, %lu)\n", node->GetID(), node->GetDirID(),
- node->GetObjectID()));
+ FUNCTION(("node: (%" B_PRIdINO ": %" B_PRIu32 ", %" B_PRIu32 ")\n",
+ node->GetID(), node->GetDirID(), node->GetObjectID()));
TOUCH(node);
return B_OK;
}
@@ -529,8 +532,8 @@
TOUCH(fs);
// FUNCTION_START();
VNode *node = (VNode*)_node->private_node;
-FUNCTION(("node: (%Ld: %lu, %lu)\n", node->GetID(), node->GetDirID(),
- node->GetObjectID()));
+ FUNCTION(("node: (%" B_PRIdINO ": %" B_PRIu32 ", %" B_PRIu32 ")\n",
+ node->GetID(), node->GetDirID(), node->GetObjectID()));
TOUCH(node);
DirectoryCookie *iterator = (DirectoryCookie*)cookie;
delete iterator;
@@ -545,8 +548,8 @@
// FUNCTION_START();
Volume *volume = (Volume*)fs->private_volume;
VNode *node = (VNode*)_node->private_node;
-FUNCTION(("node: (%Ld: %lu, %lu)\n", node->GetID(), node->GetDirID(),
- node->GetObjectID()));
+ FUNCTION(("node: (%" B_PRIdINO ": %" B_PRIu32 ", %" B_PRIu32 ")\n",
+ node->GetID(), node->GetDirID(), node->GetObjectID()));
DirectoryCookie *iterator = (DirectoryCookie*)cookie;
status_t error = iterator->Resume();
if (error == B_OK) {
@@ -556,7 +559,7 @@
DirEntry *entry = NULL;
bool done = false;
while (error == B_OK && !done
- && (error = iterator->GetNext(&item, &index,
&entry)) == B_OK) {
+ && (error = iterator->GetNext(&item, &index,
&entry)) == B_OK) {
uint32 dirID = entry->GetDirID();
uint32 objectID = entry->GetObjectID();
// skip hidden entries and entries the user specified
to be hidden
@@ -585,18 +588,22 @@
buffer->d_dev = volume->GetID();
buffer->d_ino = VNode::GetIDFor(dirID,
objectID);
*count = 1;
-PRINT(("Successfully read entry: dir: (%Ld: %ld, %ld), name: `%s', "
- "id: (%Ld, %ld, %ld), reclen: %hu\n", node->GetID(), node->GetDirID(),
- node->GetObjectID(), buffer->d_name, buffer->d_ino, dirID, objectID,
- buffer->d_reclen));
+ PRINT(("Successfully read entry: dir: (%"
B_PRIdINO ": "
+ "%" B_PRIu32 ", %" B_PRIu32 "),
name: `%s', "
+ "id: (%" B_PRIdINO ", %"
B_PRIu32 ", %" B_PRIu32 "), "
+ "reclen: %hu\n",
+ node->GetID(),
+ node->GetDirID(), node->GetObjectID(),
buffer->d_name,
+ buffer->d_ino, dirID, objectID,
+ buffer->d_reclen));
if (!strcmp("..", buffer->d_name))
iterator->SetEncounteredDotDot(true);
done = true;
}
- }
- if (error == B_ENTRY_NOT_FOUND) {
- if (iterator->EncounteredDotDot()) {
- error = B_OK;
+ }
+ if (error == B_ENTRY_NOT_FOUND) {
+ if (iterator->EncounteredDotDot()) {
+ error = B_OK;
*count = 0;
} else {
// this is necessary for the root directory
@@ -614,17 +621,21 @@
buffer->d_ino = node->GetID();
// < That's not correct!
*count = 1;
-PRINT(("faking `..' entry: dir: (%Ld: %ld, %ld), name: `%s', "
- "id: (%Ld, %ld, %ld), reclen: %hu\n", node->GetID(),
node->GetDirID(),
- node->GetObjectID(), buffer->d_name, buffer->d_ino, node->GetDirID(),
- node->GetObjectID(), buffer->d_reclen));
+ PRINT(("faking `..' entry: dir: (%"
B_PRIdINO ": "
+ "%" B_PRIu32 ", %"
B_PRIu32 "), name: `%s', "
+ "id: (%" B_PRIdINO ",
%" B_PRIu32 ", %" B_PRIu32
+ "), reclen: %hu\n",
+ node->GetID(),
+ node->GetDirID(),
node->GetObjectID(), buffer->d_name,
+ buffer->d_ino,
node->GetDirID(), node->GetObjectID(),
+ buffer->d_reclen));
iterator->SetEncounteredDotDot(true);
}
}
- }
- iterator->Suspend();
+ }
+ iterator->Suspend();
}
-PRINT(("returning %ld entries\n", *count));
+ PRINT(("returning %" B_PRIu32 " entries\n", *count));
RETURN_ERROR(error);
}
@@ -635,8 +646,8 @@
TOUCH(fs);
// FUNCTION_START();
VNode *node = (VNode*)_node->private_node;
-FUNCTION(("node: (%Ld: %lu, %lu)\n", node->GetID(), node->GetDirID(),
- node->GetObjectID()));
+ FUNCTION(("node: (%" B_PRIdINO ": %" B_PRIu32 ", %" B_PRIu32 ")\n",
+ node->GetID(), node->GetDirID(), node->GetObjectID()));
TOUCH(node);
DirectoryCookie *iterator = (DirectoryCookie*)cookie;
status_t error = iterator->Rewind(); // no need to Resume()
--
To view, visit https://review.haiku-os.org/c/haiku/+/3335
To unsubscribe, or for help writing mail filters, visit
https://review.haiku-os.org/settings
Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: Id8b4c3137cfcabaef09d8adf55a3ab6667b5c55c
Gerrit-Change-Number: 3335
Gerrit-PatchSet: 1
Gerrit-Owner: Murai Takashi <tmurai01@xxxxxxxxx>
Gerrit-MessageType: newchange