Be consistent about whether idtype and objtype codes are signed or
unsigned. They are signed. (While unsigned might have been a better choice, it doesn't really matter and the majority of preexisting uses were signed. And consistency is good.)
This commit is contained in:
parent
d2d6fa0ae1
commit
832d4ca72b
@ -48,10 +48,10 @@ const char *quota_getmountdevice(struct quotahandle *);
|
||||
const char *quota_getimplname(struct quotahandle *);
|
||||
unsigned quota_getrestrictions(struct quotahandle *);
|
||||
|
||||
unsigned quota_getnumidtypes(struct quotahandle *);
|
||||
int quota_getnumidtypes(struct quotahandle *);
|
||||
const char *quota_idtype_getname(struct quotahandle *, int /*idtype*/);
|
||||
|
||||
unsigned quota_getnumobjtypes(struct quotahandle *);
|
||||
int quota_getnumobjtypes(struct quotahandle *);
|
||||
const char *quota_objtype_getname(struct quotahandle *, int /*objtype*/);
|
||||
int quota_objtype_isbytes(struct quotahandle *, int /*objtype*/);
|
||||
|
||||
@ -69,7 +69,7 @@ int quota_delete(struct quotahandle *, const struct quotakey *);
|
||||
struct quotacursor *quota_opencursor(struct quotahandle *);
|
||||
void quotacursor_close(struct quotacursor *);
|
||||
|
||||
int quotacursor_skipidtype(struct quotacursor *, unsigned /*idtype*/);
|
||||
int quotacursor_skipidtype(struct quotacursor *, int /*idtype*/);
|
||||
|
||||
int quotacursor_get(struct quotacursor *, struct quotakey *,
|
||||
struct quotaval *);
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: libquota.3,v 1.2 2012/01/25 21:58:43 wiz Exp $
|
||||
.\" $NetBSD: libquota.3,v 1.3 2012/02/01 05:46:46 dholland Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -67,9 +67,9 @@
|
||||
.Fn quota_getmountpoint "struct quotahandle *qh"
|
||||
.Ft const char *
|
||||
.Fn quota_getimplname "struct quotahandle *qh"
|
||||
.Ft unsigned
|
||||
.Ft int
|
||||
.Fn quota_getnumidtypes "struct quotahandle *qh"
|
||||
.Ft unsigned
|
||||
.Ft int
|
||||
.Fn quota_getnumobjtypes "struct quotahandle *qh"
|
||||
.Ft const char *
|
||||
.Fn quota_idtype_getname "struct quotahandle *qh" "int idtype"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: quota_cursor.c,v 1.5 2012/02/01 05:34:40 dholland Exp $ */
|
||||
/* $NetBSD: quota_cursor.c,v 1.6 2012/02/01 05:46:46 dholland Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: quota_cursor.c,v 1.5 2012/02/01 05:34:40 dholland Exp $");
|
||||
__RCSID("$NetBSD: quota_cursor.c,v 1.6 2012/02/01 05:46:46 dholland Exp $");
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
@ -117,7 +117,7 @@ quotacursor_close(struct quotacursor *qc)
|
||||
}
|
||||
|
||||
int
|
||||
quotacursor_skipidtype(struct quotacursor *qc, unsigned idtype)
|
||||
quotacursor_skipidtype(struct quotacursor *qc, int idtype)
|
||||
{
|
||||
switch (qc->qc_type) {
|
||||
case QC_OLDFILES:
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: quota_kernel.c,v 1.2 2012/02/01 05:43:53 dholland Exp $ */
|
||||
/* $NetBSD: quota_kernel.c,v 1.3 2012/02/01 05:46:46 dholland Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: quota_kernel.c,v 1.2 2012/02/01 05:43:53 dholland Exp $");
|
||||
__RCSID("$NetBSD: quota_kernel.c,v 1.3 2012/02/01 05:46:46 dholland Exp $");
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <err.h>
|
||||
@ -79,7 +79,7 @@ __quota_kernel_getrestrictions(struct quotahandle *qh)
|
||||
return stat.qs_restrictions;
|
||||
}
|
||||
|
||||
unsigned
|
||||
int
|
||||
__quota_kernel_getnumidtypes(struct quotahandle *qh)
|
||||
{
|
||||
struct quotastat stat;
|
||||
@ -105,7 +105,7 @@ __quota_kernel_idtype_getname(struct quotahandle *qh, int idtype)
|
||||
return stat.qis_name;
|
||||
}
|
||||
|
||||
unsigned
|
||||
int
|
||||
__quota_kernel_getnumobjtypes(struct quotahandle *qh)
|
||||
{
|
||||
struct quotastat stat;
|
||||
@ -266,7 +266,7 @@ __quota_kernel_cursor_destroy(struct quotahandle *qh,
|
||||
int
|
||||
__quota_kernel_cursor_skipidtype(struct quotahandle *qh,
|
||||
struct kernel_quotacursor *cursor,
|
||||
unsigned idtype)
|
||||
int idtype)
|
||||
{
|
||||
struct quotactl_args args;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: quota_oldfiles.c,v 1.6 2012/02/01 05:34:40 dholland Exp $ */
|
||||
/* $NetBSD: quota_oldfiles.c,v 1.7 2012/02/01 05:46:46 dholland Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1990, 1993
|
||||
@ -748,7 +748,7 @@ __quota_oldfiles_cursor_destroy(struct oldfiles_quotacursor *oqc)
|
||||
|
||||
int
|
||||
__quota_oldfiles_cursor_skipidtype(struct oldfiles_quotacursor *oqc,
|
||||
unsigned idtype)
|
||||
int idtype)
|
||||
{
|
||||
switch (idtype) {
|
||||
case QUOTA_IDTYPE_USER:
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: quota_schema.c,v 1.6 2012/02/01 05:34:40 dholland Exp $ */
|
||||
/* $NetBSD: quota_schema.c,v 1.7 2012/02/01 05:46:46 dholland Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: quota_schema.c,v 1.6 2012/02/01 05:34:40 dholland Exp $");
|
||||
__RCSID("$NetBSD: quota_schema.c,v 1.7 2012/02/01 05:46:46 dholland Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/statvfs.h>
|
||||
@ -88,7 +88,7 @@ quota_getrestrictions(struct quotahandle *qh)
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned
|
||||
int
|
||||
quota_getnumidtypes(struct quotahandle *qh)
|
||||
{
|
||||
switch (qh->qh_mode) {
|
||||
@ -132,7 +132,7 @@ quota_idtype_getname(struct quotahandle *qh, int idtype)
|
||||
return "???";
|
||||
}
|
||||
|
||||
unsigned
|
||||
int
|
||||
quota_getnumobjtypes(struct quotahandle *qh)
|
||||
{
|
||||
switch (qh->qh_mode) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: quotapvt.h,v 1.13 2012/02/01 05:34:41 dholland Exp $ */
|
||||
/* $NetBSD: quotapvt.h,v 1.14 2012/02/01 05:46:46 dholland Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
@ -56,9 +56,9 @@ struct quotacursor {
|
||||
/* new non-proplib kernel interface */
|
||||
const char *__quota_kernel_getimplname(struct quotahandle *);
|
||||
unsigned __quota_kernel_getrestrictions(struct quotahandle *);
|
||||
unsigned __quota_kernel_getnumidtypes(struct quotahandle *);
|
||||
int __quota_kernel_getnumidtypes(struct quotahandle *);
|
||||
const char *__quota_kernel_idtype_getname(struct quotahandle *, int idtype);
|
||||
unsigned __quota_kernel_getnumobjtypes(struct quotahandle *);
|
||||
int __quota_kernel_getnumobjtypes(struct quotahandle *);
|
||||
const char *__quota_kernel_objtype_getname(struct quotahandle *, int objtype);
|
||||
int __quota_kernel_objtype_isbytes(struct quotahandle *, int objtype);
|
||||
int __quota_kernel_quotaon(struct quotahandle *, int idtype);
|
||||
@ -73,14 +73,14 @@ void __quota_kernel_cursor_destroy(struct quotahandle *,
|
||||
struct kernel_quotacursor *);
|
||||
int __quota_kernel_cursor_skipidtype(struct quotahandle *,
|
||||
struct kernel_quotacursor *,
|
||||
unsigned idtype);
|
||||
int idtype);
|
||||
int __quota_kernel_cursor_get(struct quotahandle *,
|
||||
struct kernel_quotacursor *,
|
||||
struct quotakey *, struct quotaval *);
|
||||
int __quota_kernel_cursor_getn(struct quotahandle *,
|
||||
struct kernel_quotacursor *,
|
||||
struct quotakey *, struct quotaval *,
|
||||
unsigned);
|
||||
unsigned maxnum);
|
||||
int __quota_kernel_cursor_atend(struct quotahandle *,
|
||||
struct kernel_quotacursor *);
|
||||
int __quota_kernel_cursor_rewind(struct quotahandle *,
|
||||
@ -108,7 +108,7 @@ struct oldfiles_quotacursor *
|
||||
__quota_oldfiles_cursor_create(struct quotahandle *);
|
||||
void __quota_oldfiles_cursor_destroy(struct oldfiles_quotacursor *);
|
||||
int __quota_oldfiles_cursor_skipidtype(struct oldfiles_quotacursor *,
|
||||
unsigned idtype);
|
||||
int idtype);
|
||||
int __quota_oldfiles_cursor_get(struct quotahandle *,
|
||||
struct oldfiles_quotacursor *,
|
||||
struct quotakey *, struct quotaval *);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: netbsd32.h,v 1.91 2012/02/01 05:43:54 dholland Exp $ */
|
||||
/* $NetBSD: netbsd32.h,v 1.92 2012/02/01 05:46:46 dholland Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001, 2008 Matthew R. Green
|
||||
@ -303,7 +303,7 @@ struct netbsd32_quotactlargs {
|
||||
} cursorclose;
|
||||
struct {
|
||||
netbsd32_pointer_t qc_cursor;
|
||||
unsigned qc_idtype;
|
||||
int qc_idtype;
|
||||
} cursorskipidtype;
|
||||
struct {
|
||||
netbsd32_pointer_t qc_cursor;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vfs_syscalls.c,v 1.446 2012/02/01 05:43:54 dholland Exp $ */
|
||||
/* $NetBSD: vfs_syscalls.c,v 1.447 2012/02/01 05:46:45 dholland Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
|
||||
@ -70,7 +70,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.446 2012/02/01 05:43:54 dholland Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.447 2012/02/01 05:46:45 dholland Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_fileassoc.h"
|
||||
@ -771,7 +771,7 @@ do_sys_quotactl_cursorskipidtype(struct mount *mp,
|
||||
static int
|
||||
do_sys_quotactl_cursorget(struct mount *mp, struct quotakcursor *cursor_u,
|
||||
struct quotakey *keys_u, struct quotaval *vals_u, unsigned maxnum,
|
||||
int *ret_u)
|
||||
unsigned *ret_u)
|
||||
{
|
||||
#define CGET_STACK_MAX 8
|
||||
struct quotakcursor cursor_k;
|
||||
@ -779,7 +779,7 @@ do_sys_quotactl_cursorget(struct mount *mp, struct quotakcursor *cursor_u,
|
||||
struct quotaval stackvals[CGET_STACK_MAX];
|
||||
struct quotakey *keys_k;
|
||||
struct quotaval *vals_k;
|
||||
int ret_k;
|
||||
unsigned ret_k;
|
||||
int error;
|
||||
|
||||
if (maxnum > 128) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: quotactl.h,v 1.34 2012/02/01 05:43:54 dholland Exp $ */
|
||||
/* $NetBSD: quotactl.h,v 1.35 2012/02/01 05:46:45 dholland Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
@ -47,8 +47,8 @@
|
||||
*/
|
||||
struct quotastat {
|
||||
char qs_implname[QUOTA_NAMELEN];
|
||||
unsigned qs_numidtypes;
|
||||
unsigned qs_numobjtypes;
|
||||
int qs_numidtypes;
|
||||
int qs_numobjtypes;
|
||||
unsigned qs_restrictions; /* semantic restriction codes */
|
||||
};
|
||||
|
||||
@ -127,7 +127,7 @@ struct quotactl_args {
|
||||
} cursorclose;
|
||||
struct {
|
||||
struct quotakcursor *qc_cursor;
|
||||
unsigned qc_idtype;
|
||||
int qc_idtype;
|
||||
} cursorskipidtype;
|
||||
struct {
|
||||
struct quotakcursor *qc_cursor;
|
||||
|
Loading…
Reference in New Issue
Block a user