[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [BusyBox] Bug in human_readable.c???
From: Thomas =?iso-8859-15?q?Fr=F6hlich?= <bornland () gmx ! at>
Date: 2003-08-29 8:24:24
[Download RAW message or body]
I use BusyBox v1.00-pre3.
with ls -a I got:
-rwxr-xr-x 1 0 0 1090552 Aug 28 2003 initall
-rw-r--r-- 1 0 0 365 Aug 28 2003 modules.info
with ls -ah I got:
-rwxr-xr-x 1 0 0 0 Aug 28 2003 initall
-rw-r--r-- 1 0 0 0 Aug 28 2003 modules.info
with df -h I got:
Filesystem Size Used Available Use% Mounted on
/dev/root 0 0 0 23% /
/dev/mtdblock/3 0 0 0 49% /data
tmpfs 0 0 0 0% /dev/shm
tmpfs 0 0 0 0% /tmp
with my patch & df -h I got:
Filesystem Size Used Available Use% Mounted on
/dev/root 8.0M 1.9M 6.1M 23% /
/dev/mtdblock/3 8.0M 3.9M 4.1M 49% /data
tmpfs 1.4M 0 1.4M 0% /dev/shm
tmpfs 1.4M 0 1.4M 0% /tmp
I hope I didn't destroy "report a wrong file size for files larger than
4GBtye"-Patch, but I couldn't test it!
regards
Thomas
PATCH:
--- include/libbb.h 22 Aug 2003 23:08:37 -0000 1.109
+++ include/libbb.h 29 Aug 2003 08:31:22 -0000
@@ -267,7 +267,7 @@
MEGABYTE = (KILOBYTE*1024),
GIGABYTE = (MEGABYTE*1024)
};
-const char *make_human_readable_str(unsigned long long size,
+const char *make_human_readable_str(unsigned long size,
unsigned long block_size, unsigned long display_unit);
int bb_ask_confirmation(void);
--- libbb/human_readable.c 22 Aug 2003 23:08:36 -0000 1.8
+++ libbb/human_readable.c 29 Aug 2003 08:31:47 -0000
@@ -28,8 +28,8 @@
#include <stdio.h>
#include "libbb.h"
-const char *make_human_readable_str(unsigned long long size,
- unsigned long block_size, unsigned long display_unit)
+const char *make_human_readable_str(unsigned long size,
+ unsigned long block_size, unsigned long display_unit)
{
/* The code will adjust for additional (appended) units. */
static const char zero_and_units[] = { '0', 0, 'k', 'M', 'G', 'T' }
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic