svn commit: trunk/busybox/coreutils
vda at busybox.net
vda at busybox.net
Sat Nov 25 14:46:22 UTC 2006
Author: vda
Date: 2006-11-25 06:46:21 -0800 (Sat, 25 Nov 2006)
New Revision: 16665
Log:
dd: support >2gb values for seek, skip, count
Modified:
trunk/busybox/coreutils/dd.c
Changeset:
Modified: trunk/busybox/coreutils/dd.c
===================================================================
--- trunk/busybox/coreutils/dd.c 2006-11-25 14:44:13 UTC (rev 16664)
+++ trunk/busybox/coreutils/dd.c 2006-11-25 14:46:21 UTC (rev 16665)
@@ -44,6 +44,12 @@
return n;
}
+#if ENABLE_LFS
+#define XATOU_SFX xatoull_sfx
+#else
+#define XATOU_SFX xatoul_sfx
+#endif
+
int dd_main(int argc, char **argv)
{
enum {
@@ -79,13 +85,13 @@
obs = xatoul_range_sfx(arg+4, 0, ((size_t)-1L)/2, dd_suffixes);
else if (!strncmp("bs=", arg, 3))
ibs = obs = xatoul_range_sfx(arg+3, 0, ((size_t)-1L)/2, dd_suffixes);
- // FIXME: make them capable of eating LARGE numbers
+ /* These can be large: */
else if (!strncmp("count=", arg, 6))
- count = xatoul_sfx(arg+6, dd_suffixes);
+ count = XATOU_SFX(arg+6, dd_suffixes);
else if (!strncmp("seek=", arg, 5))
- seek = xatoul_sfx(arg+5, dd_suffixes);
+ seek = XATOU_SFX(arg+5, dd_suffixes);
else if (!strncmp("skip=", arg, 5))
- skip = xatoul_sfx(arg+5, dd_suffixes);
+ skip = XATOU_SFX(arg+5, dd_suffixes);
else if (!strncmp("if=", arg, 3))
infile = arg+3;
More information about the busybox-cvs
mailing list