xref: /original-bsd/sys/i386/floppy/mv/mv.c (revision edc2ab72)
1 /*-
2  * Copyright (c) 1991, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)mv.c	8.1 (Berkeley) 06/11/93
8  */
9 
10 int eval;
11 
12 main(argc, argv)
13 	int argc;
14 	char **argv;
15 {
16 	if (*++argv && **argv == '-') {
17 		err("no options available", 0);
18 		_exit(1);
19 	}
20 	if (argc != 3) {
21 		err("usage: mv file1 file2", 0);
22 		_exit(1);
23 	}
24 	if (rename(argv[0], argv[1])) {
25 		err(argv[1], 1);
26 		_exit(1);
27 	}
28 	_exit(0);
29 }
30 
31 #define	PROGNAME	"mv: "
32 #include "errfunction"
33