[haiku-commits] RFC: TRACE output cleanup in FreeBSD compatibility libs

  • From: Alexander von Gluck <kallisti5@xxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx, haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 8 Mar 2011 12:48:39 -0600

Good afternoon!

I have been annoyed by the spam that gets dumped into the syslog for
the FreeBSD network compatibility layer... as such I finally decided to
*try* and do something about it.

If you are not aware of the spam I am speaking of, see below:

KERN: printf(`Adding entry for ',...)
KERN: printf(`IEEE 802.11 Wireless Ethernet',...)
KERN: printf(` mode %s',...)
KERN: printf(` %s',...)
KERN: printf(` <',...)
KERN: printf(`%s%s',...)
KERN: printf(`%s
KERN: ',...)
KERN: printf(`Adding entry for ',...)
KERN: printf(`IEEE 802.11 Wireless Ethernet',...)
KERN: printf(` mode %s',...)
KERN: printf(` %s',...)
KERN: printf(` <',...)
KERN: printf(`%s%s',...)
KERN: printf(`%s
KERN: ',...)
KERN: printf(`ifmedia_ioctl: switching %s to ',...)
KERN: printf(`Ethernet',...)
KERN: printf(` %s',...)
KERN: printf(`%s
KERN: ',...)

Using printf in kernel-anything generally results in these useless
print statements. I get pages and pages of useless wireless AP
notifications and a few ifmedia notifications for the ethernet device.

I've made some modifications to the major offender of most of these and
am performing a test build now, in the mean time I wanted to share
these changes with the community and see if there are any objections to
these changes or any problems seen. (these FreeBSD compatibility libs
are complex)

My changes can be seen here:
http://dl.dropbox.com/u/5560191/freebsd_network_TRACE.diff


Please note I made little-to-no style cleanup as I was unsure on how
much these libraries should be touched. (I also didn't want to bury the
changes)


Thanks!

 -- Alex

Other related posts: