]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r256932, r256938, r256953
authorandreast <andreast@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 12 Dec 2013 12:17:20 +0000 (12:17 +0000)
committerandreast <andreast@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 12 Dec 2013 12:17:20 +0000 (12:17 +0000)
commit456efc63f0cfa099b2ef86b55aa8da1d85326b36
treea5b1659dcbf4f44425eb3eb7c2589029ccfb2265
parent92f7bf73b05bc6806eb84dd95bcbffb4621025b1
MFC: r256932, r256938, r256953

r256932:
Add a new function (OF_getencprop()) that undoes the transformation applied
by encode-int. Specifically, it takes a set of 32-bit cell values and
changes them to host byte order. Most non-string instances of OF_getprop()
should be using this function, which is a no-op on big-endian platforms.

r256938:
A few other common cases for encode-int decoding: OF_getencprop_alloc()
and OF_searchencprop(). I thought about using the element size parameter
to OF_getprop_alloc() to do endian-switching automatically, but it breaks
use with structs and a *lot* of FDT code (which can hopefully be moved to
these new APIs).

r256953:
Fix build.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259255 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/ofw/openfirm.c
sys/dev/ofw/openfirm.h