2 Copyright © 1995-2007, 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 ******************************************************************************/
56 #include <proto/dos.h>
60 const TEXT version
[] = "$VER: AddBuffers 41.1 (18.2.1997)\n";
62 #define ARG_TEMPLATE "DRIVE/A,BUFFERS/N"
72 int __nocommandline
= 1;
76 IPTR args
[NOOFARGS
] = { (IPTR
)NULL
, (IPTR
)0 };
80 int error
= RETURN_OK
;
83 rda
= ReadArgs(ARG_TEMPLATE
, args
, NULL
);
87 STRPTR drive
= (STRPTR
)args
[ARG_DRIVE
];
88 ULONG
*bufsptr
= (ULONG
*)args
[ARG_BUFFERS
];
95 result
= AddBuffers(drive
, buffers
);
99 Printf("%s has %ld buffers\n", drive
, IoErr());
103 Printf("%s has %ld buffers\n", drive
, (LONG
)result
);
107 PrintFault(IoErr(), "AddBuffers");
115 PrintFault(IoErr(), "AddBuffers");