2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: AddBuffers CLI command
10 /******************************************************************************
14 AddBuffers (drive) [(N)]
26 Add buffers to the list of available buffers for a specific
27 drive. Adding buffers speeds disk access but has the drawback
28 of using up system memory (512 bytes per buffer). Specifying
29 a negative number subtracts buffers from the drive.
30 If only the DRIVE argument is specified, the number of
31 buffers for that drive are displayed without changing the buffer
36 DRIVE -- the drive to alter the buffer allocation of
37 BUFFERS -- the number of buffers to add (or subtract in case of
38 a negative number) to a drive.
54 ******************************************************************************/
57 #include <proto/dos.h>
61 static const char version
[] = "$VER: AddBuffers 41.1 (18.2.1997)\n";
63 #define ARG_TEMPLATE "DRIVE/A,BUFFERS/N"
73 int __nocommandline
= 1;
77 IPTR args
[NOOFARGS
] = { (IPTR
)NULL
, (IPTR
)0 };
81 int error
= RETURN_OK
;
84 rda
= ReadArgs(ARG_TEMPLATE
, args
, NULL
);
88 STRPTR drive
= (STRPTR
)args
[ARG_DRIVE
];
89 ULONG
*bufsptr
= (ULONG
*)args
[ARG_BUFFERS
];
96 result
= AddBuffers(drive
, buffers
);
100 Printf("%s has %ld buffers\n", drive
, IoErr());
104 Printf("%s has %ld buffers\n", drive
, (LONG
)result
);
108 PrintFault(IoErr(), "AddBuffers");
116 PrintFault(IoErr(), "AddBuffers");