diff options
author | Warner Losh <imp@FreeBSD.org> | 2017-11-30 05:01:56 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2017-11-30 05:01:56 +0000 |
commit | f02a303122e991b58fc96b936663849f9ac22617 (patch) | |
tree | a5a7c514d820636814ee5c82e9795a9e67682a86 /stand/powerpc | |
parent | e374a321feb03a899e991632bd8d5a4543ec1699 (diff) | |
download | src-f02a303122e991b58fc96b936663849f9ac22617.tar.gz src-f02a303122e991b58fc96b936663849f9ac22617.zip |
Use const pointers to avoid casting away constness.
The host_open interface was a legitimate mismatch to the userboot
function, while the other pointers didn't need to be non-const.
This makes the powerpc warning free again.
Sponsored by: Netflix
Notes
Notes:
svn path=/head/; revision=326384
Diffstat (limited to 'stand/powerpc')
-rw-r--r-- | stand/powerpc/kboot/host_syscall.h | 2 | ||||
-rw-r--r-- | stand/powerpc/kboot/kbootfdt.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/stand/powerpc/kboot/host_syscall.h b/stand/powerpc/kboot/host_syscall.h index 0d47bd58a44a..349c54e586a6 100644 --- a/stand/powerpc/kboot/host_syscall.h +++ b/stand/powerpc/kboot/host_syscall.h @@ -33,7 +33,7 @@ ssize_t host_read(int fd, void *buf, size_t nbyte); ssize_t host_write(int fd, const void *buf, size_t nbyte); ssize_t host_seek(int fd, int64_t offset, int whence); -int host_open(char *path, int flags, int mode); +int host_open(const char *path, int flags, int mode); int host_close(int fd); void *host_mmap(void *addr, size_t len, int prot, int flags, int fd, int); #define host_getmem(size) host_mmap(0, size, 3 /* RW */, 0x22 /* ANON */, -1, 0); diff --git a/stand/powerpc/kboot/kbootfdt.c b/stand/powerpc/kboot/kbootfdt.c index 5ab3c3da43c9..67a2082eddd9 100644 --- a/stand/powerpc/kboot/kbootfdt.c +++ b/stand/powerpc/kboot/kbootfdt.c @@ -119,7 +119,7 @@ fdt_linux_fixups(void *fdtp) offset = fdt_path_offset(fdtp, "/ibm,opal"); if (offset > 0) { - uint64_t *base, *size; + const uint64_t *base, *size; base = fdt_getprop(fdtp, offset, "opal-base-address", &len); size = fdt_getprop(fdtp, offset, "opal-runtime-size", @@ -130,7 +130,7 @@ fdt_linux_fixups(void *fdtp) } offset = fdt_path_offset(fdtp, "/rtas"); if (offset > 0) { - uint32_t *base, *size; + const uint32_t *base, *size; base = fdt_getprop(fdtp, offset, "linux,rtas-base", &len); size = fdt_getprop(fdtp, offset, "rtas-size", &len); if (base != NULL && size != NULL) |