change log for rtems (2010-06-15)
rtems-vc at rtems.org
rtems-vc at rtems.org
Wed Jun 16 00:12:03 UTC 2010
*ralf* (on branch rtems-4-10-branch):
2010-06-15 Ralf Corsépius <ralf.corsepius at rtems.org>
* libfs/src/rfs/rtems-rfs-dir.c: Various 64bit compatibility fixes.
Add PRIdoff_t.
Remove stray "\"s.
* libfs/src/rfs/rtems-rfs-link.c: Various 64bit compatibility fixes.
M 1.2396 cpukit/ChangeLog
M 1.2346.2.18 cpukit/ChangeLog
M 1.7 cpukit/libfs/src/rfs/rtems-rfs-dir.c
M 1.6.2.1 cpukit/libfs/src/rfs/rtems-rfs-dir.c
M 1.4 cpukit/libfs/src/rfs/rtems-rfs-link.c
M 1.3.2.1 cpukit/libfs/src/rfs/rtems-rfs-link.c
diff -u rtems/cpukit/ChangeLog:1.2395 rtems/cpukit/ChangeLog:1.2396
--- rtems/cpukit/ChangeLog:1.2395 Tue Jun 15 17:45:17 2010
+++ rtems/cpukit/ChangeLog Tue Jun 15 18:34:55 2010
@@ -1,3 +1,10 @@
+2010-06-15 Ralf Corsépius <ralf.corsepius at rtems.org>
+
+ * libfs/src/rfs/rtems-rfs-dir.c: Various 64bit compatibility fixes.
+ Add PRIdoff_t.
+ Remove stray "\"s.
+ * libfs/src/rfs/rtems-rfs-link.c: Various 64bit compatibility fixes.
+
2010-06-15 Joel Sherrill <joel.sherrill at oarcorp.com>
PR 1561/cpukit
diff -u rtems/cpukit/ChangeLog:1.2346.2.17 rtems/cpukit/ChangeLog:1.2346.2.18
--- rtems/cpukit/ChangeLog:1.2346.2.17 Tue Jun 15 10:17:42 2010
+++ rtems/cpukit/ChangeLog Tue Jun 15 18:35:04 2010
@@ -1,5 +1,12 @@
2010-06-15 Ralf Corsépius <ralf.corsepius at rtems.org>
+ * libfs/src/rfs/rtems-rfs-dir.c: Various 64bit compatibility fixes.
+ Add PRIdoff_t.
+ Remove stray "\"s.
+ * libfs/src/rfs/rtems-rfs-link.c: Various 64bit compatibility fixes.
+
+2010-06-15 Ralf Corsépius <ralf.corsepius at rtems.org>
+
* libfs/src/rfs/rtems-rfs-file-system.h: Remove bogus typecast.
* libfs/src/rfs/rtems-rfs-block.c, libfs/src/rfs/rtems-rfs-buffer.c,
libnetworking/nfs/bootp_subr.c: Misc. 64bit-compatibility fixes.
diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-dir.c:1.6 rtems/cpukit/libfs/src/rfs/rtems-rfs-dir.c:1.7
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-dir.c:1.6 Mon Apr 12 00:29:25 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-dir.c Tue Jun 15 18:34:56 2010
@@ -29,6 +29,16 @@
#include "config.h"
#endif
+#include <inttypes.h>
+
+#if SIZEOF_OFF_T == 8
+#define PRIdoff_t PRIo64
+#elif SIZEOF_OFF_T == 4
+#define PRIdoff_t PRIo32
+#else
+#error "unsupported size of off_t"
+#endif
+
#include <rtems/rfs/rtems-rfs-block.h>
#include <rtems/rfs/rtems-rfs-buffer.h>
#include <rtems/rfs/rtems-rfs-file-system.h>
@@ -58,7 +68,7 @@
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
{
int c;
- printf ("rtems-rfs: dir-lookup-ino: lookup ino: root=%ld, path=",
+ printf ("rtems-rfs: dir-lookup-ino: lookup ino: root=%" PRId32 ", path=",
inode->ino);
for (c = 0; c < length; c++)
printf ("%c", name[c]);
@@ -72,7 +82,7 @@
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
- printf ("rtems-rfs: dir-lookup-ino: map open failed for ino %lu: %d: %s",
+ printf ("rtems-rfs: dir-lookup-ino: map open failed for ino %" PRIu32 ": %d: %s",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
return rc;
}
@@ -81,7 +91,7 @@
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
- printf ("rtems-rfs: dir-lookup-ino: handle open failed for ino %lu: %d: %s",
+ printf ("rtems-rfs: dir-lookup-ino: handle open failed for ino %" PRIu32 ": %d: %s",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
rtems_rfs_block_map_close (fs, &map);
return rc;
@@ -121,7 +131,7 @@
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
- printf ("rtems-rfs: dir-lookup-ino: block read, ino=%lu block=%ld: %d: %s\n",
+ printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " block=%" PRId32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), block, rc, strerror (rc));
break;
}
@@ -150,8 +160,8 @@
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
- printf ("rtems-rfs: dir-lookup-ino: " \
- "bad length or ino for ino %lu: %u/%ld @ %04lx\n",
+ printf ("rtems-rfs: dir-lookup-ino: "
+ "bad length or ino for ino %" PRIu32 ": %u/%" PRId32 " @ %04" PRIx32 "\n",
rtems_rfs_inode_ino (inode), elength, *ino, map.bpos.boff);
rc = EIO;
break;
@@ -160,8 +170,8 @@
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
- printf ("rtems-rfs: dir-lookup-ino: " \
- "checking entry for ino %ld: off=%04lx length:%d ino:%ld\n",
+ printf ("rtems-rfs: dir-lookup-ino: "
+ "checking entry for ino %" PRId32 ": off=%04" PRIx32 " length:%d ino:%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
@@ -170,8 +180,8 @@
*offset = rtems_rfs_block_map_pos (fs, &map);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND))
- printf ("rtems-rfs: dir-lookup-ino: " \
- "entry found in ino %lu, ino=%lu offset=%lu\n",
+ printf ("rtems-rfs: dir-lookup-ino: "
+ "entry found in ino %" PRIu32 ", ino=%" PRIu32 " offset=%" PRIu32 "\n",
rtems_rfs_inode_ino (inode), *ino, *offset);
rtems_rfs_buffer_handle_close (fs, &entries);
@@ -190,8 +200,8 @@
if ((rc > 0) && (rc != ENXIO))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
- printf ("rtems-rfs: dir-lookup-ino: " \
- "block map next block failed in ino %lu: %d: %s\n",
+ printf ("rtems-rfs: dir-lookup-ino: "
+ "block map next block failed in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
if (rc == ENXIO)
@@ -203,7 +213,7 @@
{
rc = EIO;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
- printf ("rtems-rfs: dir-lookup-ino: block is 0 in ino %lu: %d: %s\n",
+ printf ("rtems-rfs: dir-lookup-ino: block is 0 in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
}
@@ -228,7 +238,7 @@
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
{
int c;
- printf ("rtems-rfs: dir-add-entry: dir=%ld, name=",
+ printf ("rtems-rfs: dir-add-entry: dir=%" PRId32 ", name=",
rtems_rfs_inode_ino (dir));
for (c = 0; c < length; c++)
printf ("%c", name[c]);
@@ -269,8 +279,8 @@
if (rc != ENXIO)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
- printf ("rtems-rfs: dir-add-entry: " \
- "block map find failed for ino %lu: %d: %s\n",
+ printf ("rtems-rfs: dir-add-entry: "
+ "block map find failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
break;
}
@@ -282,8 +292,8 @@
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
- printf ("rtems-rfs: dir-add-entry: " \
- "block map grow failed for ino %lu: %d: %s\n",
+ printf ("rtems-rfs: dir-add-entry: "
+ "block map grow failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
break;
}
@@ -297,8 +307,8 @@
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
- printf ("rtems-rfs: dir-add-entry: " \
- "block buffer req failed for ino %lu: %d: %s\n",
+ printf ("rtems-rfs: dir-add-entry: "
+ "block buffer req failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
break;
}
@@ -342,8 +352,8 @@
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
- printf ("rtems-rfs: dir-add-entry: " \
- "bad length or ino for ino %lu: %u/%ld @ %04x\n",
+ printf ("rtems-rfs: dir-add-entry: "
+ "bad length or ino for ino %" PRIu32 ": %u/%" PRId32 " @ %04x\n",
rtems_rfs_inode_ino (dir), elength, eino, offset);
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
@@ -373,9 +383,9 @@
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
- printf ("rtems-rfs: dir-del-entry: dir=%ld, entry=%ld offset=%lu\n",
+ printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n",
rtems_rfs_inode_ino (dir), ino, offset);
-
+
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
@@ -410,8 +420,8 @@
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
- printf ("rtems-rfs: dir-del-entry: " \
- "block buffer req failed for ino %lu: %d: %s\n",
+ printf ("rtems-rfs: dir-del-entry: "
+ "block buffer req failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
break;
}
@@ -433,13 +443,13 @@
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
- printf ("rtems-rfs: dir-del-entry: " \
- "bad length or ino for ino %lu: %u/%ld @ %04x\n",
+ printf ("rtems-rfs: dir-del-entry: "
+ "bad length or ino for ino %" PRIu32 ": %u/%" PRId32 " @ %04x\n",
rtems_rfs_inode_ino (dir), elength, eino, offset);
rc = EIO;
break;
}
-
+
if (ino == rtems_rfs_dir_entry_ino (entry))
{
uint32_t remaining;
@@ -457,8 +467,8 @@
elength = rtems_rfs_dir_entry_length (entry);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
- printf ("rtems-rfs: dir-del-entry: " \
- "last block free for ino %lu: elength=%i offset=%d last=%s\n",
+ printf ("rtems-rfs: dir-del-entry: "
+ "last block free for ino %" PRIu32 ": elength=%i offset=%d last=%s\n",
ino, elength, offset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
@@ -469,8 +479,8 @@
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
- printf ("rtems-rfs: dir-del-entry: " \
- "block map shrink failed for ino %lu: %d: %s\n",
+ printf ("rtems-rfs: dir-del-entry: "
+ "block map shrink failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
}
}
@@ -517,7 +527,7 @@
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
- printf ("rtems-rfs: dir-read: dir=%ld offset=%Ld\n",
+ printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
rtems_rfs_inode_ino (dir), offset);
*length = 0;
@@ -577,8 +587,8 @@
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
- printf ("rtems-rfs: dir-read: " \
- "bad length or ino for ino %lu: %u/%ld @ %04lx\n",
+ printf ("rtems-rfs: dir-read: "
+ "bad length or ino for ino %" PRIu32 ": %u/%" PRId32 " @ %04" PRIx32 "\n",
rtems_rfs_inode_ino (dir), elength, eino, map.bpos.boff);
rc = EIO;
break;
@@ -608,16 +618,16 @@
dirent->d_namlen = elength;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
- printf ("rtems-rfs: dir-read: found off:%Ld ino:%ld name=%s\n",
- (uint64_t) dirent->d_off, dirent->d_ino, dirent->d_name);
+ printf ("rtems-rfs: dir-read: found off:%" PRIdoff_t " ino:%ld name=%s\n",
+ dirent->d_off, dirent->d_ino, dirent->d_name);
break;
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
- printf ("rtems-rfs: dir-read: next block: off:%ld length:%zd\n",
- (uint32_t) offset, *length);
+ printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
+ offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc == ENXIO)
@@ -640,7 +650,7 @@
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
- printf ("rtems-rfs: dir-empty: dir=%ld\n", rtems_rfs_inode_ino (dir));
+ printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
empty = true;
@@ -692,8 +702,8 @@
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY))
- printf ("rtems-rfs: dir-empty: " \
- "bad length or ino for ino %lu: %u/%ld @ %04x\n",
+ printf ("rtems-rfs: dir-empty: "
+ "bad length or ino for ino %" PRIu32 ": %u/%" PRIu32 " @ %04x\n",
rtems_rfs_inode_ino (dir), elength, eino, offset);
rc = EIO;
break;
diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-dir.c:1.6 rtems/cpukit/libfs/src/rfs/rtems-rfs-dir.c:1.6.2.1
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-dir.c:1.6 Mon Apr 12 00:29:25 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-dir.c Tue Jun 15 18:35:05 2010
@@ -29,6 +29,16 @@
#include "config.h"
#endif
+#include <inttypes.h>
+
+#if SIZEOF_OFF_T == 8
+#define PRIdoff_t PRIo64
+#elif SIZEOF_OFF_T == 4
+#define PRIdoff_t PRIo32
+#else
+#error "unsupported size of off_t"
+#endif
+
#include <rtems/rfs/rtems-rfs-block.h>
#include <rtems/rfs/rtems-rfs-buffer.h>
#include <rtems/rfs/rtems-rfs-file-system.h>
@@ -58,7 +68,7 @@
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
{
int c;
- printf ("rtems-rfs: dir-lookup-ino: lookup ino: root=%ld, path=",
+ printf ("rtems-rfs: dir-lookup-ino: lookup ino: root=%" PRId32 ", path=",
inode->ino);
for (c = 0; c < length; c++)
printf ("%c", name[c]);
@@ -72,7 +82,7 @@
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
- printf ("rtems-rfs: dir-lookup-ino: map open failed for ino %lu: %d: %s",
+ printf ("rtems-rfs: dir-lookup-ino: map open failed for ino %" PRIu32 ": %d: %s",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
return rc;
}
@@ -81,7 +91,7 @@
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
- printf ("rtems-rfs: dir-lookup-ino: handle open failed for ino %lu: %d: %s",
+ printf ("rtems-rfs: dir-lookup-ino: handle open failed for ino %" PRIu32 ": %d: %s",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
rtems_rfs_block_map_close (fs, &map);
return rc;
@@ -121,7 +131,7 @@
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
- printf ("rtems-rfs: dir-lookup-ino: block read, ino=%lu block=%ld: %d: %s\n",
+ printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " block=%" PRId32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), block, rc, strerror (rc));
break;
}
@@ -150,8 +160,8 @@
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
- printf ("rtems-rfs: dir-lookup-ino: " \
- "bad length or ino for ino %lu: %u/%ld @ %04lx\n",
+ printf ("rtems-rfs: dir-lookup-ino: "
+ "bad length or ino for ino %" PRIu32 ": %u/%" PRId32 " @ %04" PRIx32 "\n",
rtems_rfs_inode_ino (inode), elength, *ino, map.bpos.boff);
rc = EIO;
break;
@@ -160,8 +170,8 @@
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
- printf ("rtems-rfs: dir-lookup-ino: " \
- "checking entry for ino %ld: off=%04lx length:%d ino:%ld\n",
+ printf ("rtems-rfs: dir-lookup-ino: "
+ "checking entry for ino %" PRId32 ": off=%04" PRIx32 " length:%d ino:%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
@@ -170,8 +180,8 @@
*offset = rtems_rfs_block_map_pos (fs, &map);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND))
- printf ("rtems-rfs: dir-lookup-ino: " \
- "entry found in ino %lu, ino=%lu offset=%lu\n",
+ printf ("rtems-rfs: dir-lookup-ino: "
+ "entry found in ino %" PRIu32 ", ino=%" PRIu32 " offset=%" PRIu32 "\n",
rtems_rfs_inode_ino (inode), *ino, *offset);
rtems_rfs_buffer_handle_close (fs, &entries);
@@ -190,8 +200,8 @@
if ((rc > 0) && (rc != ENXIO))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
- printf ("rtems-rfs: dir-lookup-ino: " \
- "block map next block failed in ino %lu: %d: %s\n",
+ printf ("rtems-rfs: dir-lookup-ino: "
+ "block map next block failed in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
if (rc == ENXIO)
@@ -203,7 +213,7 @@
{
rc = EIO;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
- printf ("rtems-rfs: dir-lookup-ino: block is 0 in ino %lu: %d: %s\n",
+ printf ("rtems-rfs: dir-lookup-ino: block is 0 in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
}
@@ -228,7 +238,7 @@
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
{
int c;
- printf ("rtems-rfs: dir-add-entry: dir=%ld, name=",
+ printf ("rtems-rfs: dir-add-entry: dir=%" PRId32 ", name=",
rtems_rfs_inode_ino (dir));
for (c = 0; c < length; c++)
printf ("%c", name[c]);
@@ -269,8 +279,8 @@
if (rc != ENXIO)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
- printf ("rtems-rfs: dir-add-entry: " \
- "block map find failed for ino %lu: %d: %s\n",
+ printf ("rtems-rfs: dir-add-entry: "
+ "block map find failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
break;
}
@@ -282,8 +292,8 @@
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
- printf ("rtems-rfs: dir-add-entry: " \
- "block map grow failed for ino %lu: %d: %s\n",
+ printf ("rtems-rfs: dir-add-entry: "
+ "block map grow failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
break;
}
@@ -297,8 +307,8 @@
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
- printf ("rtems-rfs: dir-add-entry: " \
- "block buffer req failed for ino %lu: %d: %s\n",
+ printf ("rtems-rfs: dir-add-entry: "
+ "block buffer req failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
break;
}
@@ -342,8 +352,8 @@
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
- printf ("rtems-rfs: dir-add-entry: " \
- "bad length or ino for ino %lu: %u/%ld @ %04x\n",
+ printf ("rtems-rfs: dir-add-entry: "
+ "bad length or ino for ino %" PRIu32 ": %u/%" PRId32 " @ %04x\n",
rtems_rfs_inode_ino (dir), elength, eino, offset);
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
@@ -373,9 +383,9 @@
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
- printf ("rtems-rfs: dir-del-entry: dir=%ld, entry=%ld offset=%lu\n",
+ printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n",
rtems_rfs_inode_ino (dir), ino, offset);
-
+
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
@@ -410,8 +420,8 @@
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
- printf ("rtems-rfs: dir-del-entry: " \
- "block buffer req failed for ino %lu: %d: %s\n",
+ printf ("rtems-rfs: dir-del-entry: "
+ "block buffer req failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
break;
}
@@ -433,13 +443,13 @@
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
- printf ("rtems-rfs: dir-del-entry: " \
- "bad length or ino for ino %lu: %u/%ld @ %04x\n",
+ printf ("rtems-rfs: dir-del-entry: "
+ "bad length or ino for ino %" PRIu32 ": %u/%" PRId32 " @ %04x\n",
rtems_rfs_inode_ino (dir), elength, eino, offset);
rc = EIO;
break;
}
-
+
if (ino == rtems_rfs_dir_entry_ino (entry))
{
uint32_t remaining;
@@ -457,8 +467,8 @@
elength = rtems_rfs_dir_entry_length (entry);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
- printf ("rtems-rfs: dir-del-entry: " \
- "last block free for ino %lu: elength=%i offset=%d last=%s\n",
+ printf ("rtems-rfs: dir-del-entry: "
+ "last block free for ino %" PRIu32 ": elength=%i offset=%d last=%s\n",
ino, elength, offset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
@@ -469,8 +479,8 @@
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
- printf ("rtems-rfs: dir-del-entry: " \
- "block map shrink failed for ino %lu: %d: %s\n",
+ printf ("rtems-rfs: dir-del-entry: "
+ "block map shrink failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
}
}
@@ -517,7 +527,7 @@
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
- printf ("rtems-rfs: dir-read: dir=%ld offset=%Ld\n",
+ printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
rtems_rfs_inode_ino (dir), offset);
*length = 0;
@@ -577,8 +587,8 @@
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
- printf ("rtems-rfs: dir-read: " \
- "bad length or ino for ino %lu: %u/%ld @ %04lx\n",
+ printf ("rtems-rfs: dir-read: "
+ "bad length or ino for ino %" PRIu32 ": %u/%" PRId32 " @ %04" PRIx32 "\n",
rtems_rfs_inode_ino (dir), elength, eino, map.bpos.boff);
rc = EIO;
break;
@@ -608,16 +618,16 @@
dirent->d_namlen = elength;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
- printf ("rtems-rfs: dir-read: found off:%Ld ino:%ld name=%s\n",
- (uint64_t) dirent->d_off, dirent->d_ino, dirent->d_name);
+ printf ("rtems-rfs: dir-read: found off:%" PRIdoff_t " ino:%ld name=%s\n",
+ dirent->d_off, dirent->d_ino, dirent->d_name);
break;
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
- printf ("rtems-rfs: dir-read: next block: off:%ld length:%zd\n",
- (uint32_t) offset, *length);
+ printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
+ offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc == ENXIO)
@@ -640,7 +650,7 @@
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
- printf ("rtems-rfs: dir-empty: dir=%ld\n", rtems_rfs_inode_ino (dir));
+ printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
empty = true;
@@ -692,8 +702,8 @@
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY))
- printf ("rtems-rfs: dir-empty: " \
- "bad length or ino for ino %lu: %u/%ld @ %04x\n",
+ printf ("rtems-rfs: dir-empty: "
+ "bad length or ino for ino %" PRIu32 ": %u/%" PRIu32 " @ %04x\n",
rtems_rfs_inode_ino (dir), elength, eino, offset);
rc = EIO;
break;
diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-link.c:1.3 rtems/cpukit/libfs/src/rfs/rtems-rfs-link.c:1.4
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-link.c:1.3 Fri Mar 26 23:04:40 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-link.c Tue Jun 15 18:34:56 2010
@@ -22,6 +22,8 @@
#include "config.h"
#endif
+#include <inttypes.h>
+
#include <rtems/rfs/rtems-rfs-block.h>
#include <rtems/rfs/rtems-rfs-buffer.h>
#include <rtems/rfs/rtems-rfs-file-system.h>
@@ -46,10 +48,10 @@
if (rtems_rfs_trace (RTEMS_RFS_TRACE_LINK))
{
int c;
- printf ("rtems-rfs: link: parent(%lu) -> ", parent);
+ printf ("rtems-rfs: link: parent(%" PRIu32 ") -> ", parent);
for (c = 0; c < length; c++)
printf ("%c", name[c]);
- printf ("(%lu)\n", target);
+ printf ("(%" PRIu32 ")\n", target);
}
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
@@ -118,7 +120,7 @@
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
- printf ("rtems-rfs: unlink: parent(%lu) -X-> (%lu)\n", parent, target);
+ printf ("rtems-rfs: unlink: parent(%" PRIu32 ") -X-> (%" PRIu32 ")\n", parent, target);
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
if (rc)
@@ -179,7 +181,7 @@
links = rtems_rfs_inode_get_links (&target_inode);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
- printf ("rtems-rfs: unlink: target:%lu links:%u\n", target, links);
+ printf ("rtems-rfs: unlink: target:%" PRIu32 " links:%u\n", target, links);
if (links > 1)
{
@@ -258,7 +260,7 @@
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
{
int c;
- printf ("rtems-rfs: symlink: parent:%lu name:", parent);
+ printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (" link:");
@@ -367,7 +369,7 @@
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
- printf ("rtems-rfs: symlink-read: link:%lu\n", link);
+ printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
rc = rtems_rfs_inode_open (fs, link, &inode, true);
if (rc)
diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-link.c:1.3 rtems/cpukit/libfs/src/rfs/rtems-rfs-link.c:1.3.2.1
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-link.c:1.3 Fri Mar 26 23:04:40 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-link.c Tue Jun 15 18:35:05 2010
@@ -22,6 +22,8 @@
#include "config.h"
#endif
+#include <inttypes.h>
+
#include <rtems/rfs/rtems-rfs-block.h>
#include <rtems/rfs/rtems-rfs-buffer.h>
#include <rtems/rfs/rtems-rfs-file-system.h>
@@ -46,10 +48,10 @@
if (rtems_rfs_trace (RTEMS_RFS_TRACE_LINK))
{
int c;
- printf ("rtems-rfs: link: parent(%lu) -> ", parent);
+ printf ("rtems-rfs: link: parent(%" PRIu32 ") -> ", parent);
for (c = 0; c < length; c++)
printf ("%c", name[c]);
- printf ("(%lu)\n", target);
+ printf ("(%" PRIu32 ")\n", target);
}
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
@@ -118,7 +120,7 @@
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
- printf ("rtems-rfs: unlink: parent(%lu) -X-> (%lu)\n", parent, target);
+ printf ("rtems-rfs: unlink: parent(%" PRIu32 ") -X-> (%" PRIu32 ")\n", parent, target);
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
if (rc)
@@ -179,7 +181,7 @@
links = rtems_rfs_inode_get_links (&target_inode);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
- printf ("rtems-rfs: unlink: target:%lu links:%u\n", target, links);
+ printf ("rtems-rfs: unlink: target:%" PRIu32 " links:%u\n", target, links);
if (links > 1)
{
@@ -258,7 +260,7 @@
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
{
int c;
- printf ("rtems-rfs: symlink: parent:%lu name:", parent);
+ printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (" link:");
@@ -367,7 +369,7 @@
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
- printf ("rtems-rfs: symlink-read: link:%lu\n", link);
+ printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
rc = rtems_rfs_inode_open (fs, link, &inode, true);
if (rc)
--
Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20100615/4b38cbbf/attachment-0001.html>
More information about the vc
mailing list