Re: Tainted lsmod output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 12, 2005 at 05:27:03PM -0400, Horst von Brand wrote:
> [email protected] 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux