]> granicus.if.org Git - procps-ng/commitdiff
alignment
authoralbert <>
Mon, 23 Feb 2004 19:31:00 +0000 (19:31 +0000)
committeralbert <>
Mon, 23 Feb 2004 19:31:00 +0000 (19:31 +0000)
proc/sysinfo.h
top.c
top.h

index 62f4272a81c46a7769ae93ff96672a936edbddb1..5bce543c7feed0de25d4785f2e26c4f2c706ab9d 100644 (file)
@@ -111,9 +111,9 @@ typedef struct partition_stat{
        unsigned int disk_type;
        unsigned int partition_num;
        char partition_name [16];
+       unsigned long long reads_sectors;
        struct disk_stat* parent_disk;
        unsigned           reads;
-       unsigned long long reads_sectors;
        unsigned           writes;
        unsigned           requested_writes;
 }partition_stat;
diff --git a/top.c b/top.c
index e63038f0e53f00b24ea5155f496f2eb84052a363..5c2be5ad660b81ab3510005121bb39d6186ad9cc 100644 (file)
--- a/top.c
+++ b/top.c
@@ -2751,12 +2751,12 @@ static void do_key (unsigned c)
       case 'P':         // be weaned, we would just whack this part...
       case 'T':
       {  static struct {
-            const unsigned  xkey;
             const char     *xmsg;
+            const unsigned  xkey;
             const FLG_t     sort;
          } xtab[] = {
-            { 'M', "Memory", P_MEM, }, { 'N', "Numerical", P_PID, },
-            { 'P', "CPU",    P_CPU, }, { 'T', "Time",      P_TM2  }, };
+            { "Memory", 'M', P_MEM, }, { "Numerical", 'N', P_PID, },
+            { "CPU",    'P', P_CPU, }, { "Time",      'T', P_TM2  }, };
          int i;
          for (i = 0; i < MAXTBL(xtab); ++i)
             if (c == xtab[i].xkey) {
diff --git a/top.h b/top.h
index 3857528ca988a113e8731c9e366bf6e9ddef3dcc..81097516dd143826e0e35d23e651dde75e00b116 100644 (file)
--- a/top.h
+++ b/top.h
@@ -173,6 +173,7 @@ typedef int (*QFP_t)(const void *, const void *);
            in a variety of display roles. */
 typedef struct FLD_t {
    const char    keys [4];      // order: New-on New-off Old-on Old-off
+   // misaligned on 64-bit, but part of a table -- oh well
    const char   *head;          // name for col heads + toggle/reorder fields
    const char   *fmts;          // sprintf format string for field display
    const int     width;         // field width, if applicable