Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Be consistent about whether idtype and objtype codes are sig...
details: https://anonhg.NetBSD.org/src/rev/860787635e48
branches: trunk
changeset: 773384:860787635e48
user: dholland <dholland%NetBSD.org@localhost>
date: Wed Feb 01 05:46:45 2012 +0000
description:
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.)
diffstat:
include/quota.h | 6 +++---
lib/libquota/libquota.3 | 6 +++---
lib/libquota/quota_cursor.c | 6 +++---
lib/libquota/quota_kernel.c | 10 +++++-----
lib/libquota/quota_oldfiles.c | 4 ++--
lib/libquota/quota_schema.c | 8 ++++----
lib/libquota/quotapvt.h | 12 ++++++------
sys/compat/netbsd32/netbsd32.h | 4 ++--
sys/kern/vfs_syscalls.c | 8 ++++----
sys/sys/quotactl.h | 8 ++++----
10 files changed, 36 insertions(+), 36 deletions(-)
diffs (truncated from 302 to 300 lines):
diff -r cf549d844084 -r 860787635e48 include/quota.h
--- a/include/quota.h Wed Feb 01 05:43:53 2012 +0000
+++ b/include/quota.h Wed Feb 01 05:46:45 2012 +0000
@@ -48,10 +48,10 @@
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 @@
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 *);
diff -r cf549d844084 -r 860787635e48 lib/libquota/libquota.3
--- a/lib/libquota/libquota.3 Wed Feb 01 05:43:53 2012 +0000
+++ b/lib/libquota/libquota.3 Wed Feb 01 05:46:45 2012 +0000
@@ -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"
diff -r cf549d844084 -r 860787635e48 lib/libquota/quota_cursor.c
--- a/lib/libquota/quota_cursor.c Wed Feb 01 05:43:53 2012 +0000
+++ b/lib/libquota/quota_cursor.c Wed Feb 01 05:46:45 2012 +0000
@@ -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 @@
}
int
-quotacursor_skipidtype(struct quotacursor *qc, unsigned idtype)
+quotacursor_skipidtype(struct quotacursor *qc, int idtype)
{
switch (qc->qc_type) {
case QC_OLDFILES:
diff -r cf549d844084 -r 860787635e48 lib/libquota/quota_kernel.c
--- a/lib/libquota/quota_kernel.c Wed Feb 01 05:43:53 2012 +0000
+++ b/lib/libquota/quota_kernel.c Wed Feb 01 05:46:45 2012 +0000
@@ -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 @@
return stat.qs_restrictions;
}
-unsigned
+int
__quota_kernel_getnumidtypes(struct quotahandle *qh)
{
struct quotastat stat;
@@ -105,7 +105,7 @@
return stat.qis_name;
}
-unsigned
+int
__quota_kernel_getnumobjtypes(struct quotahandle *qh)
{
struct quotastat stat;
@@ -266,7 +266,7 @@
int
__quota_kernel_cursor_skipidtype(struct quotahandle *qh,
struct kernel_quotacursor *cursor,
- unsigned idtype)
+ int idtype)
{
struct quotactl_args args;
diff -r cf549d844084 -r 860787635e48 lib/libquota/quota_oldfiles.c
--- a/lib/libquota/quota_oldfiles.c Wed Feb 01 05:43:53 2012 +0000
+++ b/lib/libquota/quota_oldfiles.c Wed Feb 01 05:46:45 2012 +0000
@@ -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 @@
int
__quota_oldfiles_cursor_skipidtype(struct oldfiles_quotacursor *oqc,
- unsigned idtype)
+ int idtype)
{
switch (idtype) {
case QUOTA_IDTYPE_USER:
diff -r cf549d844084 -r 860787635e48 lib/libquota/quota_schema.c
--- a/lib/libquota/quota_schema.c Wed Feb 01 05:43:53 2012 +0000
+++ b/lib/libquota/quota_schema.c Wed Feb 01 05:46:45 2012 +0000
@@ -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 @@
return 0;
}
-unsigned
+int
quota_getnumidtypes(struct quotahandle *qh)
{
switch (qh->qh_mode) {
@@ -132,7 +132,7 @@
return "???";
}
-unsigned
+int
quota_getnumobjtypes(struct quotahandle *qh)
{
switch (qh->qh_mode) {
diff -r cf549d844084 -r 860787635e48 lib/libquota/quotapvt.h
--- a/lib/libquota/quotapvt.h Wed Feb 01 05:43:53 2012 +0000
+++ b/lib/libquota/quotapvt.h Wed Feb 01 05:46:45 2012 +0000
@@ -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 @@
/* 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 @@
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 @@
__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 *);
diff -r cf549d844084 -r 860787635e48 sys/compat/netbsd32/netbsd32.h
--- a/sys/compat/netbsd32/netbsd32.h Wed Feb 01 05:43:53 2012 +0000
+++ b/sys/compat/netbsd32/netbsd32.h Wed Feb 01 05:46:45 2012 +0000
@@ -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 @@
} cursorclose;
struct {
netbsd32_pointer_t qc_cursor;
- unsigned qc_idtype;
+ int qc_idtype;
} cursorskipidtype;
struct {
netbsd32_pointer_t qc_cursor;
diff -r cf549d844084 -r 860787635e48 sys/kern/vfs_syscalls.c
--- a/sys/kern/vfs_syscalls.c Wed Feb 01 05:43:53 2012 +0000
+++ b/sys/kern/vfs_syscalls.c Wed Feb 01 05:46:45 2012 +0000
@@ -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 @@
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 @@
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) {
diff -r cf549d844084 -r 860787635e48 sys/sys/quotactl.h
--- a/sys/sys/quotactl.h Wed Feb 01 05:43:53 2012 +0000
+++ b/sys/sys/quotactl.h Wed Feb 01 05:46:45 2012 +0000
@@ -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 @@
} cursorclose;
struct {
struct quotakcursor *qc_cursor;
- unsigned qc_idtype;
+ int qc_idtype;
} cursorskipidtype;
Home |
Main Index |
Thread Index |
Old Index