diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-01-10 09:05:49 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-01-10 09:06:56 +0100 |
commit | 7bde91bd5fd20e2c0c91193728c793e0675bdc03 (patch) | |
tree | 396a0aa9a2b80eafb01eb9671c57bd17c7a62f43 /cpukit | |
parent | psxconfig01: Fix pre-processor conditions (diff) | |
download | rtems-7bde91bd5fd20e2c0c91193728c793e0675bdc03.tar.bz2 |
Fix format warnings due to ino_t changes
Diffstat (limited to '')
-rw-r--r-- | cpukit/include/rtems/inttypes.h | 7 | ||||
-rw-r--r-- | cpukit/libfs/src/rfs/rtems-rfs-dir.c | 3 | ||||
-rw-r--r-- | cpukit/libmisc/shell/main_rm.c | 6 | ||||
-rw-r--r-- | cpukit/libmisc/shell/print-ls.c | 6 |
4 files changed, 15 insertions, 7 deletions
diff --git a/cpukit/include/rtems/inttypes.h b/cpukit/include/rtems/inttypes.h index 4e6e98f507..5af23b22c7 100644 --- a/cpukit/include/rtems/inttypes.h +++ b/cpukit/include/rtems/inttypes.h @@ -127,8 +127,11 @@ extern "C" { /* rtems_signal_set is a typedef to uint32_t */ #define PRIxrtems_signal_set PRIx32 -/* newlib's ino_t is a typedef to "unsigned long" */ -#define PRIxino_t "lx" +/* newlib's ino_t is a typedef to __uint64_t */ +#define PRIuino_t PRIu64 + +/* newlib's ino_t is a typedef to __uint64_t */ +#define PRIxino_t PRIx64 /* ioctl_command_t */ #define PRIdioctl_command_t "ld" diff --git a/cpukit/libfs/src/rfs/rtems-rfs-dir.c b/cpukit/libfs/src/rfs/rtems-rfs-dir.c index a49ab84f05..c9a2772895 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-dir.c +++ b/cpukit/libfs/src/rfs/rtems-rfs-dir.c @@ -622,7 +622,8 @@ rtems_rfs_dir_read (rtems_rfs_file_system* fs, dirent->d_namlen = elength; if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ)) - printf ("rtems-rfs: dir-read: found off:%" PRIooff_t " ino:%ld name=%s\n", + printf ("rtems-rfs: dir-read: found off:%" PRIooff_t + " ino:%" PRIuino_t " name=%s\n", dirent->d_off, dirent->d_ino, dirent->d_name); break; } diff --git a/cpukit/libmisc/shell/main_rm.c b/cpukit/libmisc/shell/main_rm.c index c8dabe73f4..ab712d59f9 100644 --- a/cpukit/libmisc/shell/main_rm.c +++ b/cpukit/libmisc/shell/main_rm.c @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD: src/bin/rm/rm.c,v 1.58 2006/10/31 02:22:36 delphij Exp $"); #endif #include <rtems.h> +#include <rtems/inttypes.h> #include <rtems/shell.h> #include <rtems/shellconfig.h> #define __need_getopt_newlib @@ -493,8 +494,9 @@ rm_overwrite_rm(rtems_shell_rm_globals* globals, char *file, struct stat *sbp) if (!S_ISREG(sbp->st_mode)) return (1); if (sbp->st_nlink > 1 && !fflag) { - warnx("%s (inode %lu): not overwritten due to multiple links", - file, sbp->st_ino); + warnx("%s (inode %" PRIuino_t + "): not overwritten due to multiple links", file, + sbp->st_ino); return (0); } if ((fd = open(file, O_WRONLY, 0)) == -1) diff --git a/cpukit/libmisc/shell/print-ls.c b/cpukit/libmisc/shell/print-ls.c index 75876b7a7d..15702b4931 100644 --- a/cpukit/libmisc/shell/print-ls.c +++ b/cpukit/libmisc/shell/print-ls.c @@ -50,6 +50,7 @@ __RCSID("$NetBSD: print.c,v 1.40 2004/11/17 17:00:00 mycroft Exp $"); #include <inttypes.h> #include <rtems.h> +#include <rtems/inttypes.h> #include <rtems/libio.h> #include <sys/param.h> @@ -135,7 +136,8 @@ printlong(rtems_shell_ls_globals* globals, DISPLAY *dp) continue; sp = p->fts_statp; if (f_inode) - (void)printf("%*lu ", dp->s_inode, sp->st_ino); + (void)printf("%*" PRIuino_t " ", dp->s_inode, + sp->st_ino); if (f_size && !f_humanize) { (void)printf("%*llu ", dp->s_block, (unsigned long long)howmany(sp->st_blocks, blocksize)); @@ -385,7 +387,7 @@ printaname(rtems_shell_ls_globals* globals, sp = p->fts_statp; chcnt = 0; if (f_inode) - chcnt += printf("%*lu ", inodefield, sp->st_ino); + chcnt += printf("%*" PRIuino_t " ", inodefield, sp->st_ino); if (f_size) { #if RTEMS_REMOVED if (f_humanize) { |