~ubuntu-branches/ubuntu/karmic/openafs/karmic-updates

« back to all changes in this revision

Viewing changes to src/venus/fstrace.c

  • Committer: Bazaar Package Importer
  • Author(s): Russ Allbery
  • Date: 2008-09-22 19:07:02 UTC
  • mfrom: (12.1.14 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080922190702-59m13d7kn6gkw32d
Tags: 1.4.7.dfsg1-6
* Apply upstream patch to free /proc entries in the correct order.
  Thanks, Marc Dionne.  (Closes: #493914)
* Apply upstream deltas to support 2.6.27 kernels and to stop using
  COMMON_KERN_CFLAGS for all 2.6 kernels uniformly, which fixes
  problems on amd64 with newer kernels.  Thanks, Björn Torkelsson.
  (LP: #267504)
* Translation updates:
  - Swedish, thanks Martin Bagge.  (Closes: #493120)

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
#include <afs/param.h>
15
15
 
16
16
RCSID
17
 
    ("$Header: /cvs/openafs/src/venus/fstrace.c,v 1.16.2.5 2005/10/05 05:58:48 shadow Exp $");
 
17
    ("$Header: /cvs/openafs/src/venus/fstrace.c,v 1.16.2.8 2007/11/26 21:21:56 shadow Exp $");
18
18
 
19
19
#include <stdio.h>
20
20
#include <sys/types.h>
27
27
#undef abs
28
28
#include <stdlib.h>
29
29
 
30
 
#ifdef HAVE_STRING_H
31
30
#include <string.h>
32
 
#else
33
 
#ifdef HAVE_STRINGS_H
34
 
#include <strings.h>
35
 
#endif
36
 
#endif
37
31
 
38
32
#include <afs/stds.h>
39
33
#include <afs/cmd.h>
87
81
} *allInfo = 0;
88
82
 
89
83
char dumpFileName[256] = "";
 
84
void
90
85
RegisterIclDumpFileName(name)
91
86
     char *name;
92
87
{
258
253
#if defined(AFS_SGI61_ENV) && !defined(AFS_SGI62_ENV)
259
254
#define uint64_t long long
260
255
#endif
261
 
static
 
256
static void
262
257
DisplayRecord(outFilep, alp, rsize)
263
258
     FILE *outFilep;
264
259
     register afs_int32 *alp;
2710
2705
}
2711
2706
 
2712
2707
 
2713
 
static
2714
 
DoDump(as, arock)
2715
 
     register struct cmd_syndesc *as;
2716
 
     char *arock;
 
2708
static int
 
2709
DoDump(struct cmd_syndesc *as, void *arock)
2717
2710
{
2718
2711
    afs_int32 code = 0;
2719
2712
    afs_int32 tcode;
2789
2782
    struct cmd_syndesc *dumpSyntax;
2790
2783
 
2791
2784
    dumpSyntax =
2792
 
        cmd_CreateSyntax("dump", DoDump, (char *)NULL, "dump AFS trace logs");
 
2785
        cmd_CreateSyntax("dump", DoDump, NULL, "dump AFS trace logs");
2793
2786
    (void)cmd_AddParm(dumpSyntax, "-set", CMD_LIST, CMD_OPTIONAL, "set_name");
2794
2787
    (void)cmd_AddParm(dumpSyntax, "-follow", CMD_SINGLE, CMD_OPTIONAL,
2795
2788
                      "log_name");
2799
2792
                      "seconds_between_reads");
2800
2793
}
2801
2794
 
2802
 
static
2803
 
DoShowLog(as, arock)
2804
 
     register struct cmd_syndesc *as;
2805
 
     char *arock;
 
2795
static int
 
2796
DoShowLog(register struct cmd_syndesc *as, void *arock)
2806
2797
{
2807
2798
    afs_int32 retVal = 0;
2808
2799
    afs_int32 code = 0;
2865
2856
    struct cmd_syndesc *showSyntax;
2866
2857
 
2867
2858
    showSyntax =
2868
 
        cmd_CreateSyntax("lslog", DoShowLog, (char *)NULL,
 
2859
        cmd_CreateSyntax("lslog", DoShowLog, NULL,
2869
2860
                         "list available logs");
2870
2861
    (void)cmd_AddParm(showSyntax, "-set", CMD_LIST, CMD_OPTIONAL, "set_name");
2871
2862
    (void)cmd_AddParm(showSyntax, "-log", CMD_LIST, CMD_OPTIONAL, "log_name");
2872
2863
    (void)cmd_AddParm(showSyntax, "-long", CMD_FLAG, CMD_OPTIONAL, "");
2873
2864
}
2874
2865
 
2875
 
static
2876
 
DoShowSet(as, arock)
2877
 
     register struct cmd_syndesc *as;
2878
 
     char *arock;
 
2866
static int
 
2867
DoShowSet(register struct cmd_syndesc *as, void *arock)
2879
2868
{
2880
2869
    afs_int32 retVal = 0;
2881
2870
    afs_int32 code = 0;
2923
2912
    struct cmd_syndesc *showSyntax;
2924
2913
 
2925
2914
    showSyntax =
2926
 
        cmd_CreateSyntax("lsset", DoShowSet, (char *)NULL,
 
2915
        cmd_CreateSyntax("lsset", DoShowSet, NULL,
2927
2916
                         "list available event sets");
2928
2917
    (void)cmd_AddParm(showSyntax, "-set", CMD_LIST, CMD_OPTIONAL, "set_name");
2929
2918
}
2930
2919
 
2931
 
static
2932
 
DoClear(as, arock)
2933
 
     register struct cmd_syndesc *as;
2934
 
     char *arock;
 
2920
static int
 
2921
DoClear(register struct cmd_syndesc *as, void *arock)
2935
2922
{
2936
2923
    afs_int32 retVal = 0;
2937
2924
    afs_int32 code = 0;
2982
2969
    struct cmd_syndesc *clearSyntax;
2983
2970
 
2984
2971
    clearSyntax =
2985
 
        cmd_CreateSyntax("clear", DoClear, (char *)NULL,
 
2972
        cmd_CreateSyntax("clear", DoClear, NULL,
2986
2973
                         "clear logs by logname or by event set");
2987
2974
    (void)cmd_AddParm(clearSyntax, "-set", CMD_LIST, CMD_OPTIONAL,
2988
2975
                      "set_name");
2990
2977
                      "log_name");
2991
2978
}
2992
2979
 
2993
 
static
2994
 
DoSet(as, arock)
2995
 
     register struct cmd_syndesc *as;
2996
 
     char *arock;
 
2980
static int
 
2981
DoSet(register struct cmd_syndesc *as, void *arock)
2997
2982
{
2998
2983
    afs_int32 retVal = 0;
2999
2984
    afs_int32 code = 0;
3071
3056
    struct cmd_syndesc *setSyntax;
3072
3057
 
3073
3058
    setSyntax =
3074
 
        cmd_CreateSyntax("setset", DoSet, (char *)NULL,
 
3059
        cmd_CreateSyntax("setset", DoSet, NULL,
3075
3060
                         "set state of event sets");
3076
3061
    (void)cmd_AddParm(setSyntax, "-set", CMD_LIST, CMD_OPTIONAL, "set_name");
3077
3062
    (void)cmd_AddParm(setSyntax, "-active", CMD_FLAG, CMD_OPTIONAL, "");
3079
3064
    (void)cmd_AddParm(setSyntax, "-dormant", CMD_FLAG, CMD_OPTIONAL, "");
3080
3065
}
3081
3066
 
3082
 
static
3083
 
DoResize(as, arock)
3084
 
     register struct cmd_syndesc *as;
3085
 
     char *arock;
 
3067
static int
 
3068
DoResize(register struct cmd_syndesc *as, void *arock)
3086
3069
{
3087
3070
    afs_int32 retVal = 0;
3088
3071
    afs_int32 code = 0;
3130
3113
    struct cmd_syndesc *setsizeSyntax;
3131
3114
 
3132
3115
    setsizeSyntax =
3133
 
        cmd_CreateSyntax("setlog", DoResize, (char *)NULL,
 
3116
        cmd_CreateSyntax("setlog", DoResize, NULL,
3134
3117
                         "set the size of a log");
3135
3118
    (void)cmd_AddParm(setsizeSyntax, "-log", CMD_LIST, CMD_OPTIONAL,
3136
3119
                      "log_name");