NetBSD/sbin/mount_msdos/mount_msdos.c
mycroft aee4b07b8a Add RCS identifiers, remove some completely useless RCS logs and patchkit
headers, and a few other insignificant changes.
1993-08-02 17:48:44 +00:00

66 lines
894 B
C

/*
* Who wrote this???
*/
#ifndef lint
static char rcsid[] = "$Id: mount_msdos.c,v 1.2 1993/08/02 17:51:11 mycroft Exp $";
#endif /* not lint */
#include <stdio.h>
#include <sys/types.h>
#include <sys/mount.h>
char *progname;
void
usage ()
{
fprintf (stderr, "usage: %s bdev dir\n", progname);
exit (1);
}
int
main (argc, argv)
int argc;
char **argv;
{
char *dev;
char *dir;
struct pcfs_args args;
int c;
extern char *optarg;
extern int optind;
int opts;
progname = argv[0];
opts = 0;
while ((c = getopt (argc, argv, "F:")) != EOF) {
switch (c) {
case 'F':
opts |= atoi (optarg);
break;
default:
usage ();
}
}
if (optind + 2 != argc)
usage ();
dev = argv[optind];
dir = argv[optind + 1];
args.fspec = dev;
args.exflags = 0;
args.exroot = 0;
if (mount (MOUNT_MSDOS, dir, opts, &args) < 0) {
perror ("mount");
exit (1);
}
exit (0);
}