- printf("Module Size Used by\n");
- for (i = 0, mn = module_names; i < nmod; mn += strlen(mn) + 1, i++) {
- if (query_module(mn, QM_INFO, &info, sizeof(info), &count)) {
- if (errno == ENOENT) {
- /* The module was removed out from underneath us. */
- continue;
- }
- /* else choke */
- perror_msg_and_die("module %s: QM_INFO", mn);
- }
- while (query_module(mn, QM_REFS, deps, bufsize, &count)) {
- if (errno == ENOENT) {
- /* The module was removed out from underneath us. */
- continue;
- }
- if (errno != ENOSPC) {
- error_msg_and_die("module %s: QM_REFS", mn);
- }
- deps = xrealloc(deps, bufsize = count);
- }
- printf("%-20s%8lu%4ld ", mn, info.size, info.usecount);
- if (count) printf("[");
- for (j = 0, dn = deps; j < count; dn += strlen(dn) + 1, j++) {
- printf("%s%s", dn, (j==count-1)? "":" ");
- }
- if (count) printf("] ");
-
- if (info.flags & NEW_MOD_DELETED)
- printf("(deleted)");
- else if (info.flags & NEW_MOD_INITIALIZING)
- printf("(initializing)");
- else if (!(info.flags & NEW_MOD_RUNNING))
- printf("(uninitialized)");
- else {
- if (info.flags & NEW_MOD_AUTOCLEAN)
- printf("(autoclean) ");
- if (!(info.flags & NEW_MOD_USED_ONCE))
- printf("(unused)");
- }
- printf("\n");
+ if (tainted) {
+ printf(" Tainted: %c%c%c\n",
+ tainted & TAINT_PROPRIETORY_MODULE ? 'P' : 'G',
+ tainted & TAINT_FORCED_MODULE ? 'F' : ' ',
+ tainted & TAINT_UNSAFE_SMP ? 'S' : ' ');
+ } else {
+ puts(" Not tainted");