o __P removal.

o Use ANSI function definitions.
o main(int, char *[])
This commit is contained in:
imp 2002-03-18 05:00:52 +00:00
parent bb0a40943a
commit d5c1c3afc3

View File

@ -79,22 +79,20 @@ struct flagval {
#define CCD_UNCONFIGALL 3 /* unconfigure all devices */
#define CCD_DUMP 4 /* dump a ccd's configuration */
static int checkdev __P((char *));
static int do_io __P((char *, u_long, struct ccd_ioctl *));
static int do_single __P((int, char **, int));
static int do_all __P((int));
static int dump_ccd __P((int, char **));
static int getmaxpartitions __P((void));
static int getrawpartition __P((void));
static int flags_to_val __P((char *));
static void print_ccd_info __P((struct ccd_s *));
static char *resolve_ccdname __P((char *));
static void usage __P((void));
static int checkdev(char *);
static int do_io(char *, u_long, struct ccd_ioctl *);
static int do_single(int, char **, int);
static int do_all(int);
static int dump_ccd(int, char **);
static int getmaxpartitions(void);
static int getrawpartition(void);
static int flags_to_val(char *);
static void print_ccd_info(struct ccd_s *);
static char *resolve_ccdname(char *);
static void usage(void);
int
main(argc, argv)
int argc;
char **argv;
main(int argc, char *argv[])
{
int ch, options = 0, action = CCD_CONFIG;
@ -168,10 +166,7 @@ main(argc, argv)
}
static int
do_single(argc, argv, action)
int argc;
char **argv;
int action;
do_single(int argc, char **argv, int action)
{
struct ccd_ioctl ccio;
char *ccd, *cp, *cp2, **disks;
@ -289,8 +284,7 @@ do_single(argc, argv, action)
}
static int
do_all(action)
int action;
do_all(int action)
{
FILE *f;
char line[_POSIX2_LINE_MAX];
@ -354,8 +348,7 @@ do_all(action)
}
static int
checkdev(path)
char *path;
checkdev(char *path)
{
struct stat st;
@ -369,9 +362,7 @@ checkdev(path)
}
static int
pathtounit(path, unitp)
char *path;
int *unitp;
pathtounit(char *path, int *unitp)
{
struct stat st;
int maxpartitions;
@ -391,8 +382,7 @@ pathtounit(path, unitp)
}
static char *
resolve_ccdname(name)
char *name;
resolve_ccdname(char *name)
{
char c, *path;
size_t len, newlen;
@ -424,10 +414,7 @@ resolve_ccdname(name)
}
static int
do_io(path, cmd, cciop)
char *path;
u_long cmd;
struct ccd_ioctl *cciop;
do_io(char *path, u_long cmd, struct ccd_ioctl *cciop)
{
int fd;
char *cp;
@ -466,9 +453,7 @@ do_io(path, cmd, cciop)
}
static int
dump_ccd(argc, argv)
int argc;
char **argv;
dump_ccd(int argc, char **argv)
{
char *ccd, *cp;
int i, error, numccd, numconfiged = 0;
@ -533,8 +518,7 @@ dump_ccd(argc, argv)
}
static void
print_ccd_info(cs)
struct ccd_s *cs;
print_ccd_info(struct ccd_s *cs)
{
char *cp, *ccd;
static int header_printed = 0;
@ -595,20 +579,19 @@ print_ccd_info(cs)
}
static int
getmaxpartitions()
getmaxpartitions(void)
{
return (MAXPARTITIONS);
}
static int
getrawpartition()
getrawpartition(void)
{
return (RAW_PART);
}
static int
flags_to_val(flags)
char *flags;
flags_to_val(char *flags)
{
char *cp, *tok;
int i, tmp, val = ~CCDF_USERMASK;
@ -666,7 +649,7 @@ flags_to_val(flags)
}
static void
usage()
usage(void)
{
fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n",
"usage: ccdconfig [-cv] ccd ileave [flags] dev [...]",