- 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 */
- bb_perror_msg_and_die("module %s: QM_INFO", mn);
- }
- if (my_query_module(mn, QM_REFS, (void **)&deps, &depsize, &count)) {
- if (errno == ENOENT) {
- /* The module was removed out from underneath us. */
- continue;
- }
- bb_perror_msg_and_die("module %s: QM_REFS", mn);
- }
- printf("%-20s%8lu%4ld", mn, info.size, info.usecount);
- 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)");
+ if (ENABLE_FEATURE_2_4_MODULES
+ && get_linux_version_code() < KERNEL_VERSION(2,6,0)
+ ) {
+ while (config_read(parser, token, 4, 3, "# \t", PARSE_NORMAL)) {
+ if (token[3] != NULL && token[3][0] == '[') {
+ token[3]++;
+ token[3][strlen(token[3])-1] = '\0';
+ } else
+ token[3] = (char *) "";
+ printf("%-19s %8s %2s %s\n", token[0], token[1], token[2], token[3]);