mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-26 16:18:31 +00:00
WARNS=4, de-__P()
This commit is contained in:
parent
e97f67f532
commit
d8c965959f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=99822
@ -6,4 +6,6 @@ LINKS= ${BINDIR}/quotaon ${BINDIR}/quotaoff
|
||||
MAN= quotaon.8
|
||||
MLINKS= quotaon.8 quotaoff.8
|
||||
|
||||
WARNS?= 4
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -62,24 +62,22 @@ static const char rcsid[] =
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
char *qfname = QUOTAFILENAME;
|
||||
char *qfextension[] = INITQFNAMES;
|
||||
const char *qfname = QUOTAFILENAME;
|
||||
const char *qfextension[] = INITQFNAMES;
|
||||
|
||||
int aflag; /* all filesystems */
|
||||
int gflag; /* operate on group quotas */
|
||||
int uflag; /* operate on user quotas */
|
||||
int vflag; /* verbose */
|
||||
|
||||
int hasquota __P((struct fstab *, int, char **));
|
||||
int oneof __P((char *, char *[], int));
|
||||
int quotaonoff __P((struct fstab *fs, int, int, char *));
|
||||
int readonly __P((struct fstab *));
|
||||
static void usage __P((void));
|
||||
int hasquota(struct fstab *, int, char **);
|
||||
int oneof(char *, char *[], int);
|
||||
int quotaonoff(struct fstab *fs, int, int, char *);
|
||||
int readonly(struct fstab *);
|
||||
static void usage(void);
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
register struct fstab *fs;
|
||||
char ch, *qfnp, *whoami;
|
||||
|
@ -2,7 +2,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PROG= repquota
|
||||
WARNS?= 2
|
||||
WARNS?= 4
|
||||
MAN= repquota.8
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -97,16 +97,14 @@ u_long highid[MAXQUOTAS]; /* highest addid()'ed identifier per type */
|
||||
int vflag; /* verbose */
|
||||
int aflag; /* all filesystems */
|
||||
|
||||
int hasquota __P((struct fstab *, int, char **));
|
||||
int oneof __P((char *, char *[], int));
|
||||
int repquota __P((struct fstab *, int, char *));
|
||||
char *timeprt __P((time_t));
|
||||
static void usage __P((void));
|
||||
int hasquota(struct fstab *, int, char **);
|
||||
int oneof(char *, char *[], int);
|
||||
int repquota(struct fstab *, int, char *);
|
||||
char *timeprt(time_t);
|
||||
static void usage(void);
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
register struct fstab *fs;
|
||||
register struct passwd *pw;
|
||||
|
@ -2,6 +2,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PROG= rmt
|
||||
WARNS?= 4
|
||||
MAN= rmt.8
|
||||
|
||||
# called from /usr/src/etc/Makefile
|
||||
|
@ -75,14 +75,12 @@ FILE *debug;
|
||||
#define DEBUG1(f,a) if (debug) fprintf(debug, f, a)
|
||||
#define DEBUG2(f,a1,a2) if (debug) fprintf(debug, f, a1, a2)
|
||||
|
||||
char *checkbuf __P((char *, int));
|
||||
void error __P((int));
|
||||
void getstring __P((char *));
|
||||
char *checkbuf(char *, int);
|
||||
void error(int);
|
||||
void getstring(char *);
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int rval;
|
||||
char c;
|
||||
@ -229,17 +227,17 @@ getstring(bp)
|
||||
}
|
||||
|
||||
char *
|
||||
checkbuf(record, size)
|
||||
char *record;
|
||||
checkbuf(rec, size)
|
||||
char *rec;
|
||||
int size;
|
||||
{
|
||||
|
||||
if (size <= maxrecsize)
|
||||
return (record);
|
||||
if (record != 0)
|
||||
free(record);
|
||||
record = malloc(size);
|
||||
if (record == 0) {
|
||||
return (rec);
|
||||
if (rec != 0)
|
||||
free(rec);
|
||||
rec = malloc(size);
|
||||
if (rec == 0) {
|
||||
DEBUG("rmtd: cannot allocate buffer space\n");
|
||||
exit(4);
|
||||
}
|
||||
@ -247,7 +245,7 @@ checkbuf(record, size)
|
||||
while (size > 1024 &&
|
||||
setsockopt(0, SOL_SOCKET, SO_RCVBUF, &size, sizeof (size)) < 0)
|
||||
size -= 1024;
|
||||
return (record);
|
||||
return (rec);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user