-/* $OpenBSD: codepatch.c,v 1.5 2020/09/11 09:27:10 mpi Exp $ */
+/* $OpenBSD: codepatch.c,v 1.6 2023/07/31 17:10:31 bluhm Exp $ */
/*
* Copyright (c) 2014-2015 Stefan Fritsch <sf@sfritsch.de>
*
/* Patch with alternative code */
void
-codepatch_replace(uint16_t tag, void *code, size_t len)
+codepatch_replace(uint16_t tag, const void *code, size_t len)
{
struct codepatch *patch;
unsigned char *rwaddr;
-/* $OpenBSD: codepatch.h,v 1.2 2017/07/01 19:42:59 sf Exp $ */
+/* $OpenBSD: codepatch.h,v 1.3 2023/07/31 17:10:31 bluhm Exp $ */
/*
* Copyright (c) 2014-2015 Stefan Fritsch <sf@sfritsch.de>
*
void codepatch_unmaprw(vaddr_t nva);
void codepatch_fill_nop(void *caddr, uint16_t len);
void codepatch_nop(uint16_t tag);
-void codepatch_replace(uint16_t tag, void *code, size_t len);
+void codepatch_replace(uint16_t tag, const void *code, size_t len);
void codepatch_call(uint16_t tag, void *func);
#endif /* !_LOCORE */