aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhenlei Huang <zlei@FreeBSD.org>2024-10-01 15:28:37 +0000
committerZhenlei Huang <zlei@FreeBSD.org>2024-10-01 15:28:37 +0000
commit89937323bddd41fd8b92430c3ece48d3e32c2c23 (patch)
treef4e8e5cd36217f9651048bd69d2e296e0eb2af0a
parent941f8aceac1b6c16ca4d96b52e60ab437c4f9207 (diff)
downloadsrc-89937323bddd41fd8b92430c3ece48d3e32c2c23.tar.gz
src-89937323bddd41fd8b92430c3ece48d3e32c2c23.zip
khelp: Sprinkle const qualifiers where appropriate
No functional change intended. MFC after: 1 week
-rw-r--r--share/man/man9/khelp.96
-rw-r--r--sys/kern/kern_khelp.c4
-rw-r--r--sys/sys/khelp.h4
3 files changed, 7 insertions, 7 deletions
diff --git a/share/man/man9/khelp.9 b/share/man/man9/khelp.9
index 39515eef237c..d619f385d513 100644
--- a/share/man/man9/khelp.9
+++ b/share/man/man9/khelp.9
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd February 15, 2011
+.Dd October 1, 2024
.Dt KHELP 9
.Os
.Sh NAME
@@ -48,8 +48,8 @@
.Fn "int khelp_destroy_osd" "struct osd *hosd"
.Fn "int32_t khelp_get_id" "char *hname"
.Fn "void * khelp_get_osd" "struct osd *hosd" "int32_t id"
-.Fn "int khelp_add_hhook" "struct hookinfo *hki" "uint32_t flags"
-.Fn "int khelp_remove_hhook" "struct hookinfo *hki"
+.Fn "int khelp_add_hhook" "const struct hookinfo *hki" "uint32_t flags"
+.Fn "int khelp_remove_hhook" "const struct hookinfo *hki"
.Fn KHELP_DECLARE_MOD "hname" "hdata" "hhooks" "version"
.Fn KHELP_DECLARE_MOD_UMA "hname" "hdata" "hhooks" "version" "ctor" "dtor"
.Sh DESCRIPTION
diff --git a/sys/kern/kern_khelp.c b/sys/kern/kern_khelp.c
index 1ab56780f394..4a7e93ff69fa 100644
--- a/sys/kern/kern_khelp.c
+++ b/sys/kern/kern_khelp.c
@@ -253,7 +253,7 @@ khelp_get_id(char *hname)
}
int
-khelp_add_hhook(struct hookinfo *hki, uint32_t flags)
+khelp_add_hhook(const struct hookinfo *hki, uint32_t flags)
{
int error;
@@ -267,7 +267,7 @@ khelp_add_hhook(struct hookinfo *hki, uint32_t flags)
}
int
-khelp_remove_hhook(struct hookinfo *hki)
+khelp_remove_hhook(const struct hookinfo *hki)
{
int error;
diff --git a/sys/sys/khelp.h b/sys/sys/khelp.h
index 2ef45806c35a..7aadb6a58faa 100644
--- a/sys/sys/khelp.h
+++ b/sys/sys/khelp.h
@@ -70,8 +70,8 @@ void * khelp_get_osd(struct osd *hosd, int32_t id);
int32_t khelp_get_id(char *hname);
-int khelp_add_hhook(struct hookinfo *hki, uint32_t flags);
+int khelp_add_hhook(const struct hookinfo *hki, uint32_t flags);
-int khelp_remove_hhook(struct hookinfo *hki);
+int khelp_remove_hhook(const struct hookinfo *hki);
#endif /* _SYS_KHELP_H_ */