Messages in this thread | | | Date | Mon, 12 Sep 2005 17:36:04 -0400 | Subject | Re: Tainted lsmod output | From | "J. Bruce Fields" <> |
| |
On Mon, Sep 12, 2005 at 05:27:03PM -0400, Horst von Brand wrote: > Valdis.Kletnieks@vt.edu wrote: > > Somebody had an automated log-parsing tool, and wanted to make sure there > > were guaranteed at least 2 non-whitespace tokens on the line so they wouldn't > > have to deal with parsing 'Tainted: \n'? > > That's a lame excuse for messing up the kernel and mistifying the heck out > of users. Either "Tainted: <some gunk>" or "Not tainted" (or just nothing)?
That's precisely what is does. It's just that when there's taint other than proprietary-module taint, it puts a "G" in that column instead of a blank. Which is oddly inconsistent, but whatever.
--b.
const char *print_tainted(void) { static char buf[20]; if (tainted) { snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c%c%c", tainted & TAINT_PROPRIETARY_MODULE ? 'P' : 'G', tainted & TAINT_FORCED_MODULE ? 'F' : ' ', tainted & TAINT_UNSAFE_SMP ? 'S' : ' ', tainted & TAINT_FORCED_RMMOD ? 'R' : ' ', tainted & TAINT_MACHINE_CHECK ? 'M' : ' ', tainted & TAINT_BAD_PAGE ? 'B' : ' '); } else snprintf(buf, sizeof(buf), "Not tainted"); return(buf); } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |