git: 5d0d686940e4 - main - freebsd32: struct kld32_file_stat -> struct kld_file_stat32
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 17 Nov 2021 20:22:23 UTC
The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=5d0d686940e48fbfbbbbe7db548cf227a13973bc commit 5d0d686940e48fbfbbbbe7db548cf227a13973bc Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2021-11-17 20:12:23 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2021-11-17 20:12:23 +0000 freebsd32: struct kld32_file_stat -> struct kld_file_stat32 Follow common convention and put the `32` on the end of the struct name. This is a step toward generating freebsd32 syscall files from sys/kern/syscalls.master. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32.h | 4 ++-- sys/compat/freebsd32/freebsd32_misc.c | 6 +++--- sys/compat/freebsd32/freebsd32_proto.h | 2 +- sys/compat/freebsd32/freebsd32_systrace_args.c | 4 ++-- sys/compat/freebsd32/syscalls.master | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h index 1a5475595d76..b2f99949f920 100644 --- a/sys/compat/freebsd32/freebsd32.h +++ b/sys/compat/freebsd32/freebsd32.h @@ -384,7 +384,7 @@ struct kinfo_sigtramp32 { uint32_t ksigtramp_spare[4]; }; -struct kld32_file_stat_1 { +struct kld_file_stat_1_32 { int version; /* set to sizeof(struct kld_file_stat_1) */ char name[MAXPATHLEN]; int refs; @@ -393,7 +393,7 @@ struct kld32_file_stat_1 { uint32_t size; /* size in bytes */ }; -struct kld32_file_stat { +struct kld_file_stat32 { int version; /* set to sizeof(struct kld_file_stat) */ char name[MAXPATHLEN]; int refs; diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 867c957f010a..da7fd1939324 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -3534,14 +3534,14 @@ int freebsd32_kldstat(struct thread *td, struct freebsd32_kldstat_args *uap) { struct kld_file_stat *stat; - struct kld32_file_stat *stat32; + struct kld_file_stat32 *stat32; int error, version; if ((error = copyin(&uap->stat->version, &version, sizeof(version))) != 0) return (error); - if (version != sizeof(struct kld32_file_stat_1) && - version != sizeof(struct kld32_file_stat)) + if (version != sizeof(struct kld_file_stat_1_32) && + version != sizeof(struct kld_file_stat32)) return (EINVAL); stat = malloc(sizeof(*stat), M_TEMP, M_WAITOK | M_ZERO); diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index c3a7dd241c47..a2682289407b 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -275,7 +275,7 @@ struct freebsd32_modstat_args { }; struct freebsd32_kldstat_args { char fileid_l_[PADL_(int)]; int fileid; char fileid_r_[PADR_(int)]; - char stat_l_[PADL_(struct kld32_file_stat *)]; struct kld32_file_stat * stat; char stat_r_[PADR_(struct kld32_file_stat *)]; + char stat_l_[PADL_(struct kld_file_stat32 *)]; struct kld_file_stat32 * stat; char stat_r_[PADR_(struct kld_file_stat32 *)]; }; struct freebsd32_aio_return_args { char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index ffeae23fc3a3..fdac5c495468 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -1391,7 +1391,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 308: { struct freebsd32_kldstat_args *p = params; iarg[0] = p->fileid; /* int */ - uarg[1] = (intptr_t)p->stat; /* struct kld32_file_stat * */ + uarg[1] = (intptr_t)p->stat; /* struct kld_file_stat32 * */ *n_args = 2; break; } @@ -5630,7 +5630,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland struct kld32_file_stat *"; + p = "userland struct kld_file_stat32 *"; break; default: break; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index d9feba7aef0e..1a4bf7b30e7b 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -561,7 +561,7 @@ 306 AUE_NULL NOPROTO { int kldfind(const char *file); } 307 AUE_NULL NOPROTO { int kldnext(int fileid); } 308 AUE_NULL STD { int freebsd32_kldstat(int fileid, \ - struct kld32_file_stat *stat); } + struct kld_file_stat32 *stat); } 309 AUE_NULL NOPROTO { int kldfirstmod(int fileid); } 310 AUE_GETSID NOPROTO { int getsid(pid_t pid); } 311 AUE_SETRESUID NOPROTO { int setresuid(uid_t ruid, uid_t euid, \