forked from Imagelibrary/rtems
2010-06-15 Ralf Corsépius <ralf.corsepius@rtems.org>
* libfs/src/rfs/rtems-rfs-block.c, libfs/src/rfs/rtems-rfs-buffer.c, libnetworking/nfs/bootp_subr.c: Misc. 64bit-compatibility fixes.
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
2010-06-15 Ralf Corsépius <ralf.corsepius@rtems.org>
|
2010-06-15 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
|
* libfs/src/rfs/rtems-rfs-block.c, libfs/src/rfs/rtems-rfs-buffer.c,
|
||||||
|
libnetworking/nfs/bootp_subr.c: Misc. 64bit-compatibility fixes.
|
||||||
* posix/include/rtems/posix/pthread.h: Remove stray comment.
|
* posix/include/rtems/posix/pthread.h: Remove stray comment.
|
||||||
Work-around doxygen comment bug.
|
Work-around doxygen comment bug.
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,8 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
#include <rtems/rfs/rtems-rfs-block.h>
|
#include <rtems/rfs/rtems-rfs-block.h>
|
||||||
#include <rtems/rfs/rtems-rfs-data.h>
|
#include <rtems/rfs/rtems-rfs-data.h>
|
||||||
#include <rtems/rfs/rtems-rfs-group.h>
|
#include <rtems/rfs/rtems-rfs-group.h>
|
||||||
@@ -224,8 +226,8 @@ rtems_rfs_block_find_indirect (rtems_rfs_file_system* fs,
|
|||||||
if (*result >= rtems_rfs_fs_blocks (fs))
|
if (*result >= rtems_rfs_fs_blocks (fs))
|
||||||
{
|
{
|
||||||
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_FIND))
|
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_FIND))
|
||||||
printf ("rtems-rfs: block-find: invalid block in table:" \
|
printf ("rtems-rfs: block-find: invalid block in table:"
|
||||||
" block=%ld, indirect=%ld/%d\n", *result, block, offset);
|
" block=%" PRId32 ", indirect=%" PRId32 "/%d\n", *result, block, offset);
|
||||||
*result = 0;
|
*result = 0;
|
||||||
rc = EIO;
|
rc = EIO;
|
||||||
}
|
}
|
||||||
@@ -394,7 +396,7 @@ rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
|
|||||||
{
|
{
|
||||||
int b;
|
int b;
|
||||||
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
|
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
|
||||||
printf ("rtems-rfs: block-map-grow: upping: block-count=%ld\n",
|
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
|
||||||
map->size.count);
|
map->size.count);
|
||||||
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
|
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
|
||||||
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
|
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
|
||||||
@@ -415,7 +417,7 @@ rtems_rfs_block_map_grow (rtems_rfs_file_system* fs,
|
|||||||
int b;
|
int b;
|
||||||
|
|
||||||
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
|
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
|
||||||
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%lu\n",
|
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n",
|
||||||
blocks, map->size.count);
|
blocks, map->size.count);
|
||||||
|
|
||||||
if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs))
|
if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs))
|
||||||
@@ -657,7 +659,7 @@ rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
|
|||||||
size_t blocks)
|
size_t blocks)
|
||||||
{
|
{
|
||||||
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
|
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
|
||||||
printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%lu\n",
|
printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%" PRIu32 "\n",
|
||||||
blocks, map->size.count);
|
blocks, map->size.count);
|
||||||
|
|
||||||
if (map->size.count == 0)
|
if (map->size.count == 0)
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <rtems/rfs/rtems-rfs-buffer.h>
|
#include <rtems/rfs/rtems-rfs-buffer.h>
|
||||||
@@ -44,7 +45,7 @@ rtems_rfs_scan_chain (rtems_chain_control* chain,
|
|||||||
node = rtems_chain_last (chain);
|
node = rtems_chain_last (chain);
|
||||||
|
|
||||||
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
|
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
|
||||||
printf ("rtems-rfs: buffer-scan: count=%lu, block=%lu: ", *count, block);
|
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
|
||||||
|
|
||||||
while (!rtems_chain_is_head (chain, node))
|
while (!rtems_chain_is_head (chain, node))
|
||||||
{
|
{
|
||||||
@@ -105,7 +106,7 @@ rtems_rfs_buffer_handle_request (rtems_rfs_file_system* fs,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
|
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
|
||||||
printf ("rtems-rfs: buffer-request: block=%lu\n", block);
|
printf ("rtems-rfs: buffer-request: block=%" PRIu32 "\n", block);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First check to see if the buffer has already been requested and is
|
* First check to see if the buffer has already been requested and is
|
||||||
|
|||||||
@@ -464,7 +464,7 @@ bootpc_call(
|
|||||||
} /* send/receive a number of times then return an error */
|
} /* send/receive a number of times then return an error */
|
||||||
{
|
{
|
||||||
uint32_t addr = ntohl(sin->sin_addr.s_addr);
|
uint32_t addr = ntohl(sin->sin_addr.s_addr);
|
||||||
printf("BOOTP timeout for server %lu.%lu.%lu.%lu\n",
|
printf("BOOTP timeout for server %"PRIu32".%"PRIu32".%"PRIu32".%"PRIu32"\n",
|
||||||
(addr >> 24) & 0xff, (addr >> 16) & 0xff,
|
(addr >> 24) & 0xff, (addr >> 16) & 0xff,
|
||||||
(addr >> 8) & 0xff, addr & 0xff);
|
(addr >> 8) & 0xff, addr & 0xff);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user