2 Copyright © 1995-2014, 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 (typically 512 bytes per buffer).
29 Specifying 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 ******************************************************************************/
56 #include <proto/dos.h>
60 const TEXT version
[] = "$VER: AddBuffers 41.2 (2.4.2014)\n";
62 #define ARG_TEMPLATE "DRIVE/A,BUFFERS/N"
72 int __nocommandline
= 1;
76 IPTR args
[NOOFARGS
] = { (IPTR
)NULL
, (IPTR
)0 };
79 LONG return_code
= RETURN_OK
;
83 rda
= ReadArgs(ARG_TEMPLATE
, args
, NULL
);
87 STRPTR drive
= (STRPTR
)args
[ARG_DRIVE
];
88 ULONG
*bufsptr
= (ULONG
*)args
[ARG_BUFFERS
];
95 if(AddBuffers(drive
, buffers
))
97 Printf("%s has %ld buffers\n", drive
, IoErr());
102 return_code
= RETURN_FAIL
;
110 return_code
= RETURN_FAIL
;
114 PrintFault(IoErr(), "AddBuffers");