Changeset ce4e691 in rtems


Ignore:
Timestamp:
Mar 16, 2015, 5:01:37 PM (5 years ago)
Author:
Gedare Bloom <gedare@…>
Branches:
4.11, master
Children:
a62220fe
Parents:
ed152a0c
Message:

shell: fix printf warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/shell/main_df.c

    red152a0c rce4e691  
    2323#include <getopt.h>
    2424#include <string.h>
     25#include <inttypes.h>
    2526
    2627static const char suffixes[] =
     
    8485  if (context->block_size > 0)
    8586  {
    86     printf("%-15s %10llu %9llu %11llu %9llu%% %14s\n",
     87    printf("%-15s %10lu %9lu %11lu %9" PRIu64 "%% %14s\n",
    8788        mt_entry->dev == NULL ? "none" : mt_entry->dev,
    8889        (svfs.f_blocks * svfs.f_frsize + (context->block_size - 1)) / context->block_size,
    8990        ((svfs.f_blocks - svfs.f_bfree) * svfs.f_frsize + (context->block_size - 1)) / context->block_size,
    9091        (svfs.f_bfree * svfs.f_frsize + (context->block_size - 1)) / context->block_size,
    91         ((svfs.f_blocks - svfs.f_bfree) * 100 / svfs.f_blocks),
     92        (uint64_t)((svfs.f_blocks - svfs.f_bfree) * 100 / svfs.f_blocks),
    9293        mt_entry->target == NULL ? "none" : mt_entry->target);
    9394  }
     
    100101    rtems_shell_df_humanize_size(svfs.f_bfree * svfs.f_frsize, a_buf,
    101102        sizeof(a_buf));
    102     printf("%-15s %10s %9s %11s %9llu%% %14s\n",
     103    printf("%-15s %10s %9s %11s %9" PRIu64 "%% %14s\n",
    103104        mt_entry->dev == NULL ? "none" : mt_entry->dev, f_buf, u_buf, a_buf,
    104         (svfs.f_blocks - svfs.f_bfree) * 100 / svfs.f_blocks,
     105        (uint64_t)(svfs.f_blocks - svfs.f_bfree) * 100 / svfs.f_blocks,
    105106        mt_entry->target == NULL ? "none" : mt_entry->target);
    106107  }
Note: See TracChangeset for help on using the changeset viewer.