mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Const poison the propname. It's never set and we often pass it const
char *. Sponsored by: Netflix
This commit is contained in:
parent
8433795d66
commit
6df214c520
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326484
|
@ -242,7 +242,7 @@ OF_instance_to_package(ihandle_t instance)
|
|||
|
||||
/* Get the length of a property of a package. */
|
||||
int
|
||||
OF_getproplen(phandle_t package, char *propname)
|
||||
OF_getproplen(phandle_t package, const char *propname)
|
||||
{
|
||||
static struct {
|
||||
cell_t name;
|
||||
|
@ -266,7 +266,7 @@ OF_getproplen(phandle_t package, char *propname)
|
|||
|
||||
/* Get the value of a property of a package. */
|
||||
int
|
||||
OF_getprop(phandle_t package, char *propname, void *buf, int buflen)
|
||||
OF_getprop(phandle_t package, const char *propname, void *buf, int buflen)
|
||||
{
|
||||
static struct {
|
||||
cell_t name;
|
||||
|
@ -294,7 +294,7 @@ OF_getprop(phandle_t package, char *propname, void *buf, int buflen)
|
|||
|
||||
/* Get the next property of a package. */
|
||||
int
|
||||
OF_nextprop(phandle_t package, char *previous, char *buf)
|
||||
OF_nextprop(phandle_t package, const char *previous, char *buf)
|
||||
{
|
||||
static struct {
|
||||
cell_t name;
|
||||
|
@ -321,7 +321,7 @@ OF_nextprop(phandle_t package, char *previous, char *buf)
|
|||
/* Set the value of a property of a package. */
|
||||
/* XXX Has a bug on FirePower */
|
||||
int
|
||||
OF_setprop(phandle_t package, char *propname, void *buf, int len)
|
||||
OF_setprop(phandle_t package, const char *propname, void *buf, int len)
|
||||
{
|
||||
static struct {
|
||||
cell_t name;
|
||||
|
|
|
@ -89,10 +89,10 @@ phandle_t OF_peer(phandle_t);
|
|||
phandle_t OF_child(phandle_t);
|
||||
phandle_t OF_parent(phandle_t);
|
||||
phandle_t OF_instance_to_package(ihandle_t);
|
||||
int OF_getproplen(phandle_t, char *);
|
||||
int OF_getprop(phandle_t, char *, void *, int);
|
||||
int OF_nextprop(phandle_t, char *, char *);
|
||||
int OF_setprop(phandle_t, char *, void *, int);
|
||||
int OF_getproplen(phandle_t, const char *);
|
||||
int OF_getprop(phandle_t, const char *, void *, int);
|
||||
int OF_nextprop(phandle_t, const char *, char *);
|
||||
int OF_setprop(phandle_t, const char *, void *, int);
|
||||
int OF_canon(const char *, char *, int);
|
||||
phandle_t OF_finddevice(const char *);
|
||||
int OF_instance_to_path(ihandle_t, char *, int);
|
||||
|
|
Loading…
Reference in a new issue