top: fix build failure
authorDenis Vlasenko <vda.linux@googlemail.com>
Thu, 17 Apr 2008 18:04:38 +0000 (18:04 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Thu, 17 Apr 2008 18:04:38 +0000 (18:04 -0000)
include/usage.h
procps/top.c

index 09695ef76cf5904b2d58cddf655743bf26b99143..01acda16d7c8bc6d82f5adfe000411a6ab9219cd 100644 (file)
      "\n       -s sender       Sender IP address" \
      "\n       target          Target IP address" \
 
-//#define ash_trivial_usage \
-//       "[FILE]...\n" \
-//       "or: ash -c command [args]..."
-//#define ash_full_usage "\n\n" \
-//       "The ash shell"
 #define sh_trivial_usage NOUSAGE_STR
 #define sh_full_usage ""
 #define ash_trivial_usage NOUSAGE_STR
index e3f91c8f9c8893c69915a9089806c25e6b637ede..206f9e8be03845c881953302e7ab9c07384c0b27 100644 (file)
@@ -861,17 +861,22 @@ int top_main(int argc ATTRIBUTE_UNUSED, char **argv)
 #else
                        qsort(top, ntop, sizeof(top_status_t), (void*)(sort_function[0]));
 #endif /* FEATURE_TOP_CPU_USAGE_PERCENTAGE */
-               } else { /* TOPMEM */
+               }
+#if ENABLE_FEATURE_TOPMEM
+               else { /* TOPMEM */
                        qsort(topmem, ntop, sizeof(topmem_status_t), (void*)topmem_sort);
                }
+#endif
                count = lines;
                if (OPT_BATCH_MODE || count > ntop) {
                        count = ntop;
                }
                if (scan_mask == TOP_MASK)
                        display_process_list(count, col);
+#if ENABLE_FEATURE_TOPMEM
                else
                        display_topmem_process_list(count, col);
+#endif
                clearmems();
                if (iterations >= 0 && !--iterations)
                        break;