]> git.pld-linux.org Git - packages/atop.git/blob - atop-acct-alpha.patch
- updated to 1.8. stbr
[packages/atop.git] / atop-acct-alpha.patch
1 diff -durN atop-1.6.orig/acctproc.c atop-1.6/acctproc.c
2 --- atop-1.6.orig/acctproc.c    Tue Sep  3 10:03:33 2002
3 +++ atop-1.6/acctproc.c Tue Sep 17 14:17:57 2002
4 @@ -55,6 +55,7 @@
5  
6  #include <sys/types.h>
7  #include <stdio.h>
8 +#include <string.h>
9  #include <fcntl.h>
10  #include <errno.h>
11  #include <unistd.h>
12 @@ -76,7 +77,11 @@
13  static uint    acctsize;       /* previous size of account file          */
14  int            acctfd   = -1;  /* fd of account file                     */
15  
16 +#ifdef __alpha__
17 +static long    acctexp(time_t ct);
18 +#else
19  static long    acctexp(comp_t ct);
20 +#endif
21  
22  /*
23  ** Semaphore-handling
24 @@ -419,8 +424,13 @@
25                 api->cpu.utime  = acctexp(acctrec.ac_utime);
26                 api->mem.minflt = acctexp(acctrec.ac_minflt);
27                 api->mem.majflt = acctexp(acctrec.ac_majflt);
28 +#ifdef __alpha
29 +               api->mem.iosw   = 0;
30 +               api->dsk.ior    = 0;
31 +#else
32                 api->mem.iosw   = acctexp(acctrec.ac_swaps);
33                 api->dsk.ior    = acctexp(acctrec.ac_rw);
34 +#endif
35  
36                 strcpy(api->gen.name, acctrec.ac_comm);
37         }
38 @@ -433,8 +443,13 @@
39  /*
40  ** expand the special compression-method
41  */
42 +#ifdef __alpha
43 +long
44 +acctexp(time_t ct)
45 +#else
46  long
47  acctexp(comp_t ct)
48 +#endif
49  {
50          register long  e;
51          register long  f;
This page took 0.030306 seconds and 3 git commands to generate.