SCCS-vsn: bin/dd/args.c 5.3
-static char sccsid[] = "@(#)args.c 5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)args.c 5.3 (Berkeley) %G%";
#endif /* not lint */
#include <sys/types.h>
#endif /* not lint */
#include <sys/types.h>
* just wanted to set both the input and output block sizes
* and didn't want the bs semantics, so we don't warn.
*/
* just wanted to set both the input and output block sizes
* and didn't want the bs semantics, so we don't warn.
*/
- if (ddflags & (C_BLOCK|C_LCASE|C_SWAB|C_UCASE|C_UNBLOCK))
+ if (ddflags & (C_BLOCK|C_LCASE|C_UCASE|C_UNBLOCK))
ddflags &= ~C_BS;
/* Bs supersedes ibs and obs. */
ddflags &= ~C_BS;
/* Bs supersedes ibs and obs. */
goto erange;
++expr;
break;
goto erange;
++expr;
break;
+ case 'm':
+ t = num;
+ num *= 1048576;
+ if (t > num)
+ goto erange;
+ ++expr;
+ break;
case 'w': /* POSIX extension. */
t = num;
num *= sizeof(int);
case 'w': /* POSIX extension. */
t = num;
num *= sizeof(int);
switch(*expr) {
case '\0':
break;
switch(*expr) {
case '\0':
break;
+ case '*': /* Backward compatible. */
t = num;
num *= get_bsz(expr + 1);
if (t > num)
t = num;
num *= get_bsz(expr + 1);
if (t > num)