conditional floppy version remove uid/gid/mode options shrinks by ~70k

This commit is contained in:
chopps 1994-07-30 19:04:01 +00:00
parent cb1f841e18
commit fa09856854
1 changed files with 16 additions and 1 deletions

View File

@ -29,7 +29,7 @@
*/ */
#ifndef lint #ifndef lint
static char rcsid[] = "$Id: mount_ados.c,v 1.1 1994/06/03 00:33:12 chopps Exp $"; static char rcsid[] = "$Id: mount_ados.c,v 1.2 1994/07/30 19:04:01 chopps Exp $";
#endif /* not lint */ #endif /* not lint */
#include <sys/cdefs.h> #include <sys/cdefs.h>
@ -45,9 +45,11 @@ static char rcsid[] = "$Id: mount_ados.c,v 1.1 1994/06/03 00:33:12 chopps Exp $"
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#ifndef LETS_GET_SMALL
gid_t a_gid __P((char *)); gid_t a_gid __P((char *));
uid_t a_uid __P((char *)); uid_t a_uid __P((char *));
mode_t a_mask __P((char *)); mode_t a_mask __P((char *));
#endif
void usage __P((void)); void usage __P((void));
int int
@ -68,6 +70,7 @@ main(argc, argv)
case 'F': case 'F':
opts |= atoi(optarg); opts |= atoi(optarg);
break; break;
#ifndef LETS_GET_SMALL
case 'u': case 'u':
args.uid = a_uid(optarg); args.uid = a_uid(optarg);
set_uid = 1; set_uid = 1;
@ -80,6 +83,7 @@ main(argc, argv)
args.mask = a_mask(optarg); args.mask = a_mask(optarg);
set_mask = 1; set_mask = 1;
break; break;
#endif
case '?': case '?':
default: default:
usage(); usage();
@ -121,6 +125,7 @@ main(argc, argv)
exit (0); exit (0);
} }
#ifndef LETS_GET_SMALL
gid_t gid_t
a_gid(s) a_gid(s)
char *s; char *s;
@ -184,3 +189,13 @@ usage()
fprintf(stderr, "usage: mount_ados [-F flags] [-u user] [-g group] [-m mask] bdev dir\n"); fprintf(stderr, "usage: mount_ados [-F flags] [-u user] [-g group] [-m mask] bdev dir\n");
exit(1); exit(1);
} }
#else
void
usage()
{
fprintf(stderr, "usage: mount_ados [-F flags] bdev dir\n");
exit(1);
}
#endif