/*
 * 5799-WZQ (C) COPYRIGHT IBM CORPORATION 1987,1988
 * LICENSED MATERIALS - PROPERTY OF IBM
 * REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
 */
/* $Header:xxxfs.c 12.0$ */
/* $ACIS:xxxfs.c 12.0$ */
/* $Source: /ibm/acis/usr/sys/dist/etc/RCS/xxxfs.c,v $ */

#ifndef lint
static char *rcsid = "$Header:xxxfs.c 12.0$";
#endif

/*
 * merged mkfs/newfs front end for miniroot
 * usage:
 *	mkfs  mkfs_parameters
 *	newfs newfs_parameters
 */

#include <stdio.h>

char *basename(c)
char *c;
{
	char *p;
	p=c;
	while (*c) if (*c++ == '/') p=c;
	return(p);
}

main (argc,argv)

int argc;
char **argv;

{
	char *basename(),*name;

	if (strcmp((name=basename(argv[0])),"newfs")==0) {
		main_newfs(argc,argv);
	}
	else if (strcmp(name,"mkfs")==0) {
		main_mkfs(argc,argv);
	}
	else if (strcmp(name,"ifconfig")==0) {
		main_ifconfig(argc,argv);
	}
	else {
		fprintf(stderr,"%s:must be invoked as mkfs, newfs, or ifconfig.\n",name);
		exit (-1);
	}
}
