> Simple patch to allow uppercase size modifiers (K, M, and G). I know this is not the most important thing in the world, but this annoys me so I'm going to give it one last shot:
can somebody please give me one reason why this should not go in? Look, when you ask various tools to display human-readable output they do so using /uppercase/ characters. Examples are disklabel, bioctl, ls, df, du, and wc. The fdisk and disklabel editors both accept uppercase letters and so does newfs. Why must dd be different? Something about the rule of least surprise comes to mind ... > Index: args.c > =================================================================== > RCS file: /cvs/src/bin/dd/args.c,v > retrieving revision 1.18 > diff -u -p -r1.18 args.c > --- args.c 27 Oct 2009 23:59:21 -0000 1.18 > +++ args.c 2 Oct 2011 18:04:34 -0000 > @@ -341,6 +341,7 @@ get_bsz(char *val) > ++expr; > break; > case 'k': > + case 'K': > t = num; > num *= 1024; > if (t > num) > @@ -348,6 +349,7 @@ get_bsz(char *val) > ++expr; > break; > case 'm': > + case 'M': > t = num; > num *= 1048576; > if (t > num) > @@ -411,6 +413,7 @@ get_off(char *val) > ++expr; > break; > case 'k': > + case 'K': > t = num; > num *= 1024; > if (t > num) > @@ -418,6 +421,7 @@ get_off(char *val) > ++expr; > break; > case 'm': > + case 'M': > t = num; > num *= 1048576; > if (t > num)