RFC: C version of devd daemon.
cpghost at cordula.ws
Fri Jun 12 17:13:44 UTC 2009
On Fri, Jun 12, 2009 at 03:23:47PM +0000, Antonio Gonz?lez Castro wrote:
> Hi, I'm not sure this is interesting or useful, but I translated devd daemon
> from C++ to C.
Why would you want to do that? IMHO, the code in
/usr/src/sbin/devd/devd.cc is beautiful, concise
and very readable.
> Is it useful for something, or have I been wasting my time for nothing?
What's the size of your C version of /sbin/devd? The statically
linked C++ version is 402080 bytes on my amd64 system:
% ls -l `which devd`
-r-xr-xr-x 1 root wheel 402080 May 4 10:24 /sbin/devd
and it will probably be less if written in C. That's the only
advantage I see in translating C++ code to C code. For everything
that's dynamically linked, I don't really see the point (with
the exception of very few special cases).
Cordula's Web. http://www.cordula.ws/
More information about the freebsd-current