From nobody Tue Dec 28 17:51:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5F559190F351; Tue, 28 Dec 2021 17:51:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JNhsl6Dp4z3Dy1; Tue, 28 Dec 2021 17:51:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9BF7D160BF; Tue, 28 Dec 2021 17:51:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BSHp7xe052645; Tue, 28 Dec 2021 17:51:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BSHp7Of052644; Tue, 28 Dec 2021 17:51:07 GMT (envelope-from git) Date: Tue, 28 Dec 2021 17:51:07 GMT Message-Id: <202112281751.1BSHp7Of052644@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: cc5aa0a496a5 - main - sys/compat: Use C99 fixed-width integer types. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc5aa0a496a59c4e2ae5da179765973526dba60b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640713867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FlY7NW8oTARQcBCHgrzEu8SR4t4T27REeJZ9qUFhpMU=; b=Uzmg5vA38a72v8QwD+sd782QwuUU9THwG7jAdi3yRamjyLRHEWtPKf2PrBB/kNn69cqQ/i i6xuNtP6lC54JiRTo/5Wb9rnKWoBf8O87lcfpXQ5gM/wsm2gsN9bEzT0TncIu75F46BL/O EC2u0+pzPBh666gqKONZyYSIsLLETiIVOwm2tDKJPucVC3Jdl/nDqjtNIhXzVFQR3YERwm FEZsemJOwi1rDdehM8F2bhEexinJbgKiLZ9JmjjMp22gjxKxnGfiqkq0MSwkC1AZAYKEWa k0NRnkE+t6GSRNKbSaEiNGK5Ry1cbkuuuu1m/B5H4KOC4oNsLANHTJBp7QJlWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640713868; a=rsa-sha256; cv=none; b=JFx1b02Au0Mo5CTGK5MceJq4W7axXUjzmB8VxBscz95wyV2kPEHS3+vUGKNlW+rpWoqWSB Ayrs27x7v5TXnFo+shojdJtCjL3wVbfAUCUJ1hzWxmMoUbsDkklepByugHZU0BE2rd1MHw aIARhLB/hq4NJGyJllKZM+gg2istqEXJ5rwDxN0GxaTnm0EjAlg8iF2efWTQVGrt2yWwbo IZ9MDgiSKnb4nwvVebYP0ID5dnWbL5mjE0Q+9meHeX9dY9UD12uKcGxR3j48VIbYcEwOF0 5I5E9VvCSazFzheXXfDd3oi6Vaq2olXDOrY6UhwgX9a5LZxKTFHiOfIfo1F9mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=cc5aa0a496a59c4e2ae5da179765973526dba60b commit cc5aa0a496a59c4e2ae5da179765973526dba60b Author: John Baldwin AuthorDate: 2021-12-28 17:41:33 +0000 Commit: John Baldwin CommitDate: 2021-12-28 17:41:33 +0000 sys/compat: Use C99 fixed-width integer types. No functional change. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D33632 --- sys/compat/freebsd32/freebsd32.h | 44 ++++---- sys/compat/freebsd32/freebsd32_misc.c | 16 +-- sys/compat/freebsd32/freebsd32_signal.h | 4 +- sys/compat/freebsd32/freebsd32_util.h | 6 +- sys/compat/ia32/ia32_signal.h | 184 ++++++++++++++++---------------- sys/compat/linux/linux_ioctl.c | 24 ++--- 6 files changed, 139 insertions(+), 139 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h index 4d5cea688a21..1f6270d684ee 100644 --- a/sys/compat/freebsd32/freebsd32.h +++ b/sys/compat/freebsd32/freebsd32.h @@ -193,16 +193,16 @@ struct nstat32 { }; struct iovec32 { - u_int32_t iov_base; + uint32_t iov_base; int iov_len; }; struct msghdr32 { - u_int32_t msg_name; + uint32_t msg_name; socklen_t msg_namelen; - u_int32_t msg_iov; + uint32_t msg_iov; int msg_iovlen; - u_int32_t msg_control; + uint32_t msg_control; socklen_t msg_controllen; int msg_flags; }; @@ -216,10 +216,10 @@ struct stat32 { ino_t st_ino; nlink_t st_nlink; mode_t st_mode; - u_int16_t st_padding0; + uint16_t st_padding0; uid_t st_uid; gid_t st_gid; - u_int32_t st_padding1; + uint32_t st_padding1; dev_t st_rdev; #ifdef __STAT32_TIME_T_EXT __int32_t st_atim_ext; @@ -239,27 +239,27 @@ struct stat32 { struct timespec32 st_birthtim; off_t st_size; int64_t st_blocks; - u_int32_t st_blksize; - u_int32_t st_flags; - u_int64_t st_gen; - u_int64_t st_spare[10]; + uint32_t st_blksize; + uint32_t st_flags; + uint64_t st_gen; + uint64_t st_spare[10]; }; struct freebsd11_stat32 { - u_int32_t st_dev; - u_int32_t st_ino; + uint32_t st_dev; + uint32_t st_ino; mode_t st_mode; - u_int16_t st_nlink; + uint16_t st_nlink; uid_t st_uid; gid_t st_gid; - u_int32_t st_rdev; + uint32_t st_rdev; struct timespec32 st_atim; struct timespec32 st_mtim; struct timespec32 st_ctim; off_t st_size; int64_t st_blocks; - u_int32_t st_blksize; - u_int32_t st_flags; - u_int32_t st_gen; + uint32_t st_blksize; + uint32_t st_flags; + uint32_t st_gen; int32_t st_lspare; struct timespec32 st_birthtim; unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec32)); @@ -280,15 +280,15 @@ struct ostat32 { struct timespec32 st_ctim; __int32_t st_blksize; __int32_t st_blocks; - u_int32_t st_flags; + uint32_t st_flags; __uint32_t st_gen; }; struct jail32_v0 { - u_int32_t version; + uint32_t version; uint32_t path; uint32_t hostname; - u_int32_t ip_number; + uint32_t ip_number; }; struct jail32 { @@ -303,7 +303,7 @@ struct jail32 { }; struct sigaction32 { - u_int32_t sa_u; + uint32_t sa_u; int sa_flags; sigset_t sa_mask; }; @@ -381,7 +381,7 @@ struct kinfo_proc32 { u_int ki_slptime; u_int ki_swtime; u_int ki_cow; - u_int64_t ki_runtime; + uint64_t ki_runtime; struct timeval32 ki_start; struct timeval32 ki_childtime; int ki_flag; diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 89322772a83c..cd9a6124734d 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -382,10 +382,10 @@ freebsd32_sigaltstack(struct thread *td, */ int freebsd32_exec_copyin_args(struct image_args *args, const char *fname, - enum uio_seg segflg, u_int32_t *argv, u_int32_t *envv) + enum uio_seg segflg, uint32_t *argv, uint32_t *envv) { char *argp, *envp; - u_int32_t *p32, arg; + uint32_t *p32, arg; int error; bzero(args, sizeof(*args)); @@ -2782,7 +2782,7 @@ freebsd4_freebsd32_sigaction(struct thread *td, #ifdef COMPAT_43 struct osigaction32 { - u_int32_t sa_u; + uint32_t sa_u; osigset_t sa_mask; int sa_flags; }; @@ -2821,7 +2821,7 @@ ofreebsd32_sigaction(struct thread *td, } struct sigvec32 { - u_int32_t sv_handler; + uint32_t sv_handler; int sv_mask; int sv_flags; }; @@ -2861,7 +2861,7 @@ ofreebsd32_sigvec(struct thread *td, } struct sigstack32 { - u_int32_t ss_sp; + uint32_t ss_sp; int ss_onstack; }; @@ -3392,7 +3392,7 @@ int freebsd32_copyout_strings(struct image_params *imgp, uintptr_t *stack_base) { int argc, envc, i; - u_int32_t *vectp; + uint32_t *vectp; char *stringp; uintptr_t destp, ustringp; struct freebsd32_ps_strings *arginfo; @@ -3511,7 +3511,7 @@ freebsd32_copyout_strings(struct image_params *imgp, uintptr_t *stack_base) * Fill in "ps_strings" struct for ps, w, etc. */ imgp->argv = vectp; - if (suword32(&arginfo->ps_argvstr, (u_int32_t)(intptr_t)vectp) != 0 || + if (suword32(&arginfo->ps_argvstr, (uint32_t)(intptr_t)vectp) != 0 || suword32(&arginfo->ps_nargvstr, argc) != 0) return (EFAULT); @@ -3531,7 +3531,7 @@ freebsd32_copyout_strings(struct image_params *imgp, uintptr_t *stack_base) return (EFAULT); imgp->envv = vectp; - if (suword32(&arginfo->ps_envstr, (u_int32_t)(intptr_t)vectp) != 0 || + if (suword32(&arginfo->ps_envstr, (uint32_t)(intptr_t)vectp) != 0 || suword32(&arginfo->ps_nenvstr, envc) != 0) return (EFAULT); diff --git a/sys/compat/freebsd32/freebsd32_signal.h b/sys/compat/freebsd32/freebsd32_signal.h index cc7aeb858fb1..9cfa4ab6fd75 100644 --- a/sys/compat/freebsd32/freebsd32_signal.h +++ b/sys/compat/freebsd32/freebsd32_signal.h @@ -32,8 +32,8 @@ #define _COMPAT_FREEBSD32_SIGNAL_H_ struct sigaltstack32 { - u_int32_t ss_sp; /* signal stack base */ - u_int32_t ss_size; /* signal stack length */ + uint32_t ss_sp; /* signal stack base */ + uint32_t ss_size; /* signal stack length */ int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */ }; diff --git a/sys/compat/freebsd32/freebsd32_util.h b/sys/compat/freebsd32/freebsd32_util.h index b126fbde0857..74fd48f0bd77 100644 --- a/sys/compat/freebsd32/freebsd32_util.h +++ b/sys/compat/freebsd32/freebsd32_util.h @@ -43,9 +43,9 @@ #include struct freebsd32_ps_strings { - u_int32_t ps_argvstr; /* first of 0 or more argument strings */ + uint32_t ps_argvstr; /* first of 0 or more argument strings */ int ps_nargvstr; /* the number of argument strings */ - u_int32_t ps_envstr; /* first of 0 or more environment strings */ + uint32_t ps_envstr; /* first of 0 or more environment strings */ int ps_nenvstr; /* the number of environment strings */ }; @@ -122,6 +122,6 @@ void freebsd32_rusage_out(const struct rusage *s, struct rusage32 *s32); struct image_args; int freebsd32_exec_copyin_args(struct image_args *args, const char *fname, - enum uio_seg segflg, u_int32_t *argv, u_int32_t *envv); + enum uio_seg segflg, uint32_t *argv, uint32_t *envv); #endif /* !_COMPAT_FREEBSD32_FREEBSD32_UTIL_H_ */ diff --git a/sys/compat/ia32/ia32_signal.h b/sys/compat/ia32/ia32_signal.h index fe310a8249a2..647ec4f690cf 100644 --- a/sys/compat/ia32/ia32_signal.h +++ b/sys/compat/ia32/ia32_signal.h @@ -43,109 +43,109 @@ (_MC_IA32_HASSEGS | _MC_IA32_HASBASES | _MC_IA32_HASFPXSTATE) struct ia32_mcontext { - u_int32_t mc_onstack; /* XXX - sigcontext compat. */ - u_int32_t mc_gs; /* machine state (struct trapframe) */ - u_int32_t mc_fs; - u_int32_t mc_es; - u_int32_t mc_ds; - u_int32_t mc_edi; - u_int32_t mc_esi; - u_int32_t mc_ebp; - u_int32_t mc_isp; - u_int32_t mc_ebx; - u_int32_t mc_edx; - u_int32_t mc_ecx; - u_int32_t mc_eax; - u_int32_t mc_trapno; - u_int32_t mc_err; - u_int32_t mc_eip; - u_int32_t mc_cs; - u_int32_t mc_eflags; - u_int32_t mc_esp; - u_int32_t mc_ss; - u_int32_t mc_len; /* sizeof(struct ia32_mcontext) */ + uint32_t mc_onstack; /* XXX - sigcontext compat. */ + uint32_t mc_gs; /* machine state (struct trapframe) */ + uint32_t mc_fs; + uint32_t mc_es; + uint32_t mc_ds; + uint32_t mc_edi; + uint32_t mc_esi; + uint32_t mc_ebp; + uint32_t mc_isp; + uint32_t mc_ebx; + uint32_t mc_edx; + uint32_t mc_ecx; + uint32_t mc_eax; + uint32_t mc_trapno; + uint32_t mc_err; + uint32_t mc_eip; + uint32_t mc_cs; + uint32_t mc_eflags; + uint32_t mc_esp; + uint32_t mc_ss; + uint32_t mc_len; /* sizeof(struct ia32_mcontext) */ /* We use the same values for fpformat and ownedfp */ - u_int32_t mc_fpformat; - u_int32_t mc_ownedfp; - u_int32_t mc_flags; + uint32_t mc_fpformat; + uint32_t mc_ownedfp; + uint32_t mc_flags; /* * See for the internals of mc_fpstate[]. */ - u_int32_t mc_fpstate[128] __aligned(16); - u_int32_t mc_fsbase; - u_int32_t mc_gsbase; - u_int32_t mc_xfpustate; - u_int32_t mc_xfpustate_len; - u_int32_t mc_spare2[4]; + uint32_t mc_fpstate[128] __aligned(16); + uint32_t mc_fsbase; + uint32_t mc_gsbase; + uint32_t mc_xfpustate; + uint32_t mc_xfpustate_len; + uint32_t mc_spare2[4]; }; struct ia32_ucontext { sigset_t uc_sigmask; struct ia32_mcontext uc_mcontext; - u_int32_t uc_link; + uint32_t uc_link; struct sigaltstack32 uc_stack; - u_int32_t uc_flags; - u_int32_t __spare__[4]; + uint32_t uc_flags; + uint32_t __spare__[4]; }; #if defined(COMPAT_FREEBSD4) struct ia32_mcontext4 { - u_int32_t mc_onstack; /* XXX - sigcontext compat. */ - u_int32_t mc_gs; /* machine state (struct trapframe) */ - u_int32_t mc_fs; - u_int32_t mc_es; - u_int32_t mc_ds; - u_int32_t mc_edi; - u_int32_t mc_esi; - u_int32_t mc_ebp; - u_int32_t mc_isp; - u_int32_t mc_ebx; - u_int32_t mc_edx; - u_int32_t mc_ecx; - u_int32_t mc_eax; - u_int32_t mc_trapno; - u_int32_t mc_err; - u_int32_t mc_eip; - u_int32_t mc_cs; - u_int32_t mc_eflags; - u_int32_t mc_esp; - u_int32_t mc_ss; - u_int32_t mc_fpregs[28]; - u_int32_t __spare__[17]; + uint32_t mc_onstack; /* XXX - sigcontext compat. */ + uint32_t mc_gs; /* machine state (struct trapframe) */ + uint32_t mc_fs; + uint32_t mc_es; + uint32_t mc_ds; + uint32_t mc_edi; + uint32_t mc_esi; + uint32_t mc_ebp; + uint32_t mc_isp; + uint32_t mc_ebx; + uint32_t mc_edx; + uint32_t mc_ecx; + uint32_t mc_eax; + uint32_t mc_trapno; + uint32_t mc_err; + uint32_t mc_eip; + uint32_t mc_cs; + uint32_t mc_eflags; + uint32_t mc_esp; + uint32_t mc_ss; + uint32_t mc_fpregs[28]; + uint32_t __spare__[17]; }; struct ia32_ucontext4 { sigset_t uc_sigmask; struct ia32_mcontext4 uc_mcontext; - u_int32_t uc_link; + uint32_t uc_link; struct sigaltstack32 uc_stack; - u_int32_t __spare__[8]; + uint32_t __spare__[8]; }; #endif #ifdef COMPAT_43 struct ia32_sigcontext3 { - u_int32_t sc_onstack; - u_int32_t sc_mask; - u_int32_t sc_esp; - u_int32_t sc_ebp; - u_int32_t sc_isp; - u_int32_t sc_eip; - u_int32_t sc_eflags; - u_int32_t sc_es; - u_int32_t sc_ds; - u_int32_t sc_cs; - u_int32_t sc_ss; - u_int32_t sc_edi; - u_int32_t sc_esi; - u_int32_t sc_ebx; - u_int32_t sc_edx; - u_int32_t sc_ecx; - u_int32_t sc_eax; - u_int32_t sc_gs; - u_int32_t sc_fs; - u_int32_t sc_trapno; - u_int32_t sc_err; + uint32_t sc_onstack; + uint32_t sc_mask; + uint32_t sc_esp; + uint32_t sc_ebp; + uint32_t sc_isp; + uint32_t sc_eip; + uint32_t sc_eflags; + uint32_t sc_es; + uint32_t sc_ds; + uint32_t sc_cs; + uint32_t sc_ss; + uint32_t sc_edi; + uint32_t sc_esi; + uint32_t sc_ebx; + uint32_t sc_edx; + uint32_t sc_ecx; + uint32_t sc_eax; + uint32_t sc_gs; + uint32_t sc_fs; + uint32_t sc_trapno; + uint32_t sc_err; }; #endif @@ -155,22 +155,22 @@ struct ia32_sigcontext3 { #ifdef COMPAT_FREEBSD4 struct ia32_sigframe4 { - u_int32_t sf_signum; - u_int32_t sf_siginfo; /* code or pointer to sf_si */ - u_int32_t sf_ucontext; /* points to sf_uc */ - u_int32_t sf_addr; /* undocumented 4th arg */ - u_int32_t sf_ah; /* action/handler pointer */ + uint32_t sf_signum; + uint32_t sf_siginfo; /* code or pointer to sf_si */ + uint32_t sf_ucontext; /* points to sf_uc */ + uint32_t sf_addr; /* undocumented 4th arg */ + uint32_t sf_ah; /* action/handler pointer */ struct ia32_ucontext4 sf_uc; /* = *sf_ucontext */ struct siginfo32 sf_si; /* = *sf_siginfo (SA_SIGINFO case) */ }; #endif struct ia32_sigframe { - u_int32_t sf_signum; - u_int32_t sf_siginfo; /* code or pointer to sf_si */ - u_int32_t sf_ucontext; /* points to sf_uc */ - u_int32_t sf_addr; /* undocumented 4th arg */ - u_int32_t sf_ah; /* action/handler pointer */ + uint32_t sf_signum; + uint32_t sf_siginfo; /* code or pointer to sf_si */ + uint32_t sf_ucontext; /* points to sf_uc */ + uint32_t sf_addr; /* undocumented 4th arg */ + uint32_t sf_ah; /* action/handler pointer */ /* Beware, hole due to ucontext being 16 byte aligned! */ struct ia32_ucontext sf_uc; /* = *sf_ucontext */ struct siginfo32 sf_si; /* = *sf_siginfo (SA_SIGINFO case) */ @@ -185,10 +185,10 @@ struct ia32_siginfo3 { }; struct ia32_sigframe3 { int sf_signum; - u_int32_t sf_arg2; /* int or siginfo_t */ - u_int32_t sf_scp; - u_int32_t sf_addr; - u_int32_t sf_ah; /* action/handler pointer */ + uint32_t sf_arg2; /* int or siginfo_t */ + uint32_t sf_scp; + uint32_t sf_addr; + uint32_t sf_ah; /* action/handler pointer */ struct ia32_siginfo3 sf_siginfo; }; #endif diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index e3ce41ed38f8..2b93349ce650 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -159,17 +159,17 @@ static TAILQ_HEAD(, linux_ioctl_handler_element) linux32_ioctl_handlers = */ struct linux_hd_geometry { - u_int8_t heads; - u_int8_t sectors; - u_int16_t cylinders; - u_int32_t start; + uint8_t heads; + uint8_t sectors; + uint16_t cylinders; + uint32_t start; }; struct linux_hd_big_geometry { - u_int8_t heads; - u_int8_t sectors; - u_int32_t cylinders; - u_int32_t start; + uint8_t heads; + uint8_t sectors; + uint32_t cylinders; + uint32_t start; }; static int @@ -1103,9 +1103,9 @@ struct l_dvd_layer { u_char track_density:4; u_char linear_density:4; u_char bca:1; - u_int32_t start_sector; - u_int32_t end_sector; - u_int32_t end_sector_l0; + uint32_t start_sector; + uint32_t end_sector; + uint32_t end_sector_l0; }; struct l_dvd_physical { @@ -1690,7 +1690,7 @@ struct linux_old_mixer_info { char name[32]; }; -static u_int32_t dirbits[4] = { IOC_VOID, IOC_IN, IOC_OUT, IOC_INOUT }; +static uint32_t dirbits[4] = { IOC_VOID, IOC_IN, IOC_OUT, IOC_INOUT }; #define SETDIR(c) (((c) & ~IOC_DIRMASK) | dirbits[args->cmd >> 30])