On 23/07/10 07:14 PM, 邓宁 wrote:
Dear solaris gurus, I have a stupid question when writing a program under solaris. In the program, I want to use the system function ddi_fls() and ddi_ffs(). From its description at http://docs.sun.com/app/docs/doc/819-2256/ddi-ffs-9f?q=StarOffice&s=t&a=view <http://docs.sun.com/app/docs/doc/819-2256/ddi-ffs-9f?q=StarOffice&s=t&a=view>, I think it can meet my requirement.
...
and got some error at linking stage: Undefined symbol first referenced in file ddi_ffs /var/tmp//ccu... ddi_fls /var/tmp//... ld: fatal: symbol referencing errors. Can you show me how to use the ddi_XXXX() function in my userland code?
I did a quick check using cscope on the ON gate, and I cannot find any example of these functions being used in userland. All the usage I find of them is in the kernel ($SRC/uts). When I read through $SRC/uts/common/sys/sunddi.h, I see that those functions are contained within an #ifdef _KERNEL block, so it seems to me that the manpage (and WDD) is incorrect because you cannot use these two functions outside of the kernel. James C. McPherson -- Oracle http://www.jmcp.homeunix.com/blog _______________________________________________ driver-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/driver-discuss
