Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Nov 2021 20:22:04 GMT
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: b64f3dc26cbc - main - syscalls: [gs]etitimer takes an int which
Message-ID:  <202111172022.1AHKM4po059233@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/src/commit/?id=b64f3dc26cbc7a55c4c839cfde4f876684563507

commit b64f3dc26cbc7a55c4c839cfde4f876684563507
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2021-11-17 20:12:21 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2021-11-17 20:12:21 +0000

    syscalls: [gs]etitimer takes an int which
    
    Match the function decleration which takes an int not a signed int.
    No functional change as the range of valid values is 0-2.
    
    Obtained from: CheriBSD
    
    Reviewed by:    kevans
---
 sys/kern/syscalls.master | 4 ++--
 sys/kern/systrace_args.c | 8 ++++----
 sys/sys/sysproto.h       | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index 39992e9c7430..a69b99cb0693 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -545,7 +545,7 @@
 	}
 83	AUE_SETITIMER	STD|CAPENABLED {
 		int setitimer(
-		    u_int which,
+		    int which,
 		    _In_ const struct itimerval *itv,
 		    _Out_opt_ struct itimerval *oitv
 		);
@@ -560,7 +560,7 @@
 	}
 86	AUE_GETITIMER	STD|CAPENABLED {
 		int getitimer(
-		    u_int which,
+		    int which,
 		    _Out_ struct itimerval *itv
 		);
 	}
diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c
index de96b132824b..55788649de4f 100644
--- a/sys/kern/systrace_args.c
+++ b/sys/kern/systrace_args.c
@@ -499,7 +499,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
 	/* setitimer */
 	case 83: {
 		struct setitimer_args *p = params;
-		uarg[0] = p->which; /* u_int */
+		iarg[0] = p->which; /* int */
 		uarg[1] = (intptr_t)p->itv; /* const struct itimerval * */
 		uarg[2] = (intptr_t)p->oitv; /* struct itimerval * */
 		*n_args = 3;
@@ -515,7 +515,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
 	/* getitimer */
 	case 86: {
 		struct getitimer_args *p = params;
-		uarg[0] = p->which; /* u_int */
+		iarg[0] = p->which; /* int */
 		uarg[1] = (intptr_t)p->itv; /* struct itimerval * */
 		*n_args = 2;
 		break;
@@ -4180,7 +4180,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 	case 83:
 		switch (ndx) {
 		case 0:
-			p = "u_int";
+			p = "int";
 			break;
 		case 1:
 			p = "userland const struct itimerval *";
@@ -4206,7 +4206,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 	case 86:
 		switch (ndx) {
 		case 0:
-			p = "u_int";
+			p = "int";
 			break;
 		case 1:
 			p = "userland struct itimerval *";
diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h
index d29620ac2d7f..b6b33df7b9cc 100644
--- a/sys/sys/sysproto.h
+++ b/sys/sys/sysproto.h
@@ -299,7 +299,7 @@ struct setpgid_args {
 	char pgid_l_[PADL_(int)]; int pgid; char pgid_r_[PADR_(int)];
 };
 struct setitimer_args {
-	char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)];
+	char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)];
 	char itv_l_[PADL_(const struct itimerval *)]; const struct itimerval * itv; char itv_r_[PADR_(const struct itimerval *)];
 	char oitv_l_[PADL_(struct itimerval *)]; struct itimerval * oitv; char oitv_r_[PADR_(struct itimerval *)];
 };
@@ -310,7 +310,7 @@ struct swapon_args {
 	char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)];
 };
 struct getitimer_args {
-	char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)];
+	char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)];
 	char itv_l_[PADL_(struct itimerval *)]; struct itimerval * itv; char itv_r_[PADR_(struct itimerval *)];
 };
 struct getdtablesize_args {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111172022.1AHKM4po059233>