Changeset 118

Show
Ignore:
Timestamp:
02/20/06 11:11:14 (3 years ago)
Author:
ludo
Message:

busybox du fixed (from r3071)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/client/src_initrd/busybox-0.60.5/du.c

    r11 r118  
    3838#endif 
    3939 
    40 typedef void (Display) (long, char *); 
     40typedef void (Display) (long long, char *); 
    4141 
    4242static int du_depth = 0; 
     
    4747static Display *print; 
    4848 
    49 static void print_normal(long size, char *filename) 
     49static void print_normal(long long size, char *filename) 
    5050{ 
    5151#ifdef BB_FEATURE_HUMAN_READABLE 
    5252        printf("%s\t%s\n", make_human_readable_str(size<<10, 1, disp_hr), filename); 
    5353#else 
    54         printf("%ld\t%s\n", size, filename); 
     54        printf("%lld\t%s\n", size, filename); 
    5555#endif 
    5656} 
    5757 
    58 static void print_summary(long size, char *filename) 
     58static void print_summary(long long size, char *filename) 
    5959{ 
    6060        if (du_depth == 1) { 
     
    6464 
    6565/* tiny recursive du */ 
    66 static long du(char *filename) 
     66static long long du(char *filename) 
    6767{ 
    6868        struct stat statbuf; 
    69         long sum; 
     69        long long sum; 
    7070 
    7171        if ((lstat(filename, &statbuf)) != 0) { 
     
    171171                        status = EXIT_FAILURE; 
    172172        } else { 
    173                 long sum; 
     173                long long sum; 
    174174 
    175175                for (i=optind; i < argc; i++) { 
  • trunk/client/src_initrd/busybox-0.60.5/libbb/human_readable.c

    r11 r118  
    2929#include "libbb.h" 
    3030 
    31 const char *make_human_readable_str(unsigned long size,  
     31const char *make_human_readable_str(unsigned long long size,  
    3232                                                                        unsigned long block_size, 
    3333                                                                        unsigned long display_unit) 
  • trunk/client/src_initrd/busybox-0.60.5/libbb/libbb.h

    r11 r118  
    201201        GIGABYTE = (MEGABYTE*1024) 
    202202}; 
    203 const char *make_human_readable_str(unsigned long size, unsigned long block_size, unsigned long display_unit); 
     203const char *make_human_readable_str(unsigned long long size, unsigned long block_size, unsigned long display_unit); 
    204204 
    205205int ask_confirmation(void);