Beispiel #1
0
void
usage ()
{
   char *msgs[]={
   "Usage : irodsFs [-hd] [-o opt,[opt...]]",
"Single user iRODS/Fuse server",
"Options are:",
" -h  this help",
" -d  FUSE debug mode",
" -o  opt,[opt...]  FUSE mount options",

#ifdef ENABLE_PRELOAD
" ",
"Extended Options for Preload",
" --preload                use preload",
" --preload-clear-cache    clear preload caches",
" --preload-cache-dir      specify preload cache directory",
" --preload-cache-max      specify preload cache max limit (in bytes)", 
" --preload-file-min       specify minimum file size that will be preloaded (in bytes)",
#endif
#ifdef ENABLE_LAZY_UPLOAD
" ",
"Extended Options for LazyUpload",
" --lazyupload             use lazy-upload",
" --lazyupload-buffer-dir  specify lazy-upload buffer directory",
#endif
#ifdef ENABLE_TRACE
" ",
"Extended Options for Tracing",
" --trace [on|off]         Enable/disable access tracing",
" --trace-path-salt SALT   Salt to add to the paths when hashing them in the trace log",
" --trace-host HOSTNAME    Send traces to HOSTNAME",
" --trace-port PORTNUM     Connect to the trace host on port PORTNUM",
" --trace-timeout SECONDS  Number of seconds to wait before giving up connecting to the trace host",
" --trace-sync-delay SECONDS   Number of seconds between sending trace snapshots",
#endif
""};
    int i;
    for (i=0;;i++) {
        if (strlen(msgs[i])==0) 
            break;
        printf("%s\n",msgs[i]);
    }
    
#ifdef ENABLE_TRACE
    trace_usage();
#endif // ENABLE_TRACE
}
Beispiel #2
0
int main( int argc, char** argv ) {
   
   struct log_context* logctx = NULL;
   int rc = 0;
   
   if( strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0 ) {
      fprintf(stderr, "Log test program\n");
      trace_usage();
      exit(0);
   }
   
   rc = trace_begin( &logctx );
   if( rc != 0 ) {
      fprintf(stderr, "trace_begin rc = %d\n", rc );
      exit(1);
   }
   
   log_argv( logctx, argc, argv );
   
   // compress 
   rc = log_rollover( logctx );
   if( rc != 0 ) {
      
      fprintf(stderr, "log_rollover rc = %d\n", rc );
      exit(1);
   }
   
   log_argv( logctx, argc, argv );
   
   // compress, again 
   rc = log_rollover( logctx );
   if( rc != 0 ) {
      
      fprintf(stderr, "log_rollover rc = %d\n", rc );
      exit(1);
   }
   
   // where are the compressed logs?
   print_compressed_log_paths( logctx );
   
   // clean up 
   trace_end( &logctx );
   
   return 0;
}
psim_usage(int verbose)
{
    printf_filtered("Usage:\n");
    printf_filtered("\n");
    printf_filtered("\tpsim [ <psim-option> ... ] <image> [ <image-arg> ... ]\n");
    printf_filtered("\n");
    printf_filtered("Where\n");
    printf_filtered("\n");
    printf_filtered("\t<image>         Name of the PowerPC program to run.\n");
    if (verbose) {
        printf_filtered("\t                This can either be a PowerPC binary or\n");
        printf_filtered("\t                a text file containing a device tree\n");
        printf_filtered("\t                specification.\n");
        printf_filtered("\t                PSIM will attempt to determine from the\n");
        printf_filtered("\t                specified <image> the intended emulation\n");
        printf_filtered("\t                environment.\n");
        printf_filtered("\t                If PSIM gets it wrong, the emulation\n");
        printf_filtered("\t                environment can be specified using the\n");
        printf_filtered("\t                `-e' option (described below).\n");
        printf_filtered("\n");
    }
    printf_filtered("\t<image-arg>     Argument to be passed to <image>\n");
    if (verbose) {
        printf_filtered("\t                These arguments will be passed to\n");
        printf_filtered("\t                <image> (as standard C argv, argc)\n");
        printf_filtered("\t                when <image> is started.\n");
        printf_filtered("\n");
    }
    printf_filtered("\t<psim-option>   See below\n");
    printf_filtered("\n");
    printf_filtered("The following are valid <psim-option>s:\n");
    printf_filtered("\n");

    printf_filtered("\t-c <count>      Limit the simulation to <count> iterations\n");
    if (verbose) {
        printf_filtered("\n");
    }

    printf_filtered("\t-i or -i2       Print instruction counting statistics\n");
    if (verbose) {
        printf_filtered("\t                Specify -i2 for a more detailed display\n");
        printf_filtered("\n");
    }

    printf_filtered("\t-I              Print execution unit statistics\n");
    if (verbose) {
        printf_filtered("\n");
    }

    printf_filtered("\t-e <os-emul>    specify an OS or platform to model\n");
    if (verbose) {
        printf_filtered("\t                Can be any of the following:\n");
        printf_filtered("\t                bug - OEA + MOTO BUG ROM calls\n");
        printf_filtered("\t                netbsd - UEA + NetBSD system calls\n");
        printf_filtered("\t                solaris - UEA + Solaris system calls\n");
        printf_filtered("\t                linux - UEA + Linux system calls\n");
        printf_filtered("\t                chirp - OEA + a few OpenBoot calls\n");
        printf_filtered("\n");
    }

    printf_filtered("\t-E <endian>     Specify the endianness of the target\n");
    if (verbose) {
        printf_filtered("\t                Can be any of the following:\n");
        printf_filtered("\t                big - big endian target\n");
        printf_filtered("\t                little - little endian target\n");
        printf_filtered("\n");
    }

    printf_filtered("\t-f <file>       Merge <file> into the device tree\n");
    if (verbose) {
        printf_filtered("\n");
    }

    printf_filtered("\t-h -? -H        give more detailed usage\n");
    if (verbose) {
        printf_filtered("\n");
    }

    printf_filtered("\t-m <model>      Specify the processor to model (604)\n");
    if (verbose) {
        printf_filtered("\t                Selects the processor to use when\n");
        printf_filtered("\t                modeling execution units.  Includes:\n");
        printf_filtered("\t                604, 603 and 603e\n");
        printf_filtered("\n");
    }

    printf_filtered("\t-n <nr-smp>     Specify the number of processors in SMP simulations\n");
    if (verbose) {
        printf_filtered("\t                Specifies the number of processors that are\n");
        printf_filtered("\t                to be modeled in a symetric multi-processor (SMP)\n");
        printf_filtered("\t                simulation\n");
        printf_filtered("\n");
    }

    printf_filtered("\t-o <dev-spec>   Add device <dev-spec> to the device tree\n");
    if (verbose) {
        printf_filtered("\n");
    }

    printf_filtered("\t-r <ram-size>   Set RAM size in bytes (OEA environments)\n");
    if (verbose) {
        printf_filtered("\n");
    }

    printf_filtered("\t-t [!]<trace>   Enable (disable) <trace> option\n");
    if (verbose) {
        printf_filtered("\n");
    }

    printf_filtered("\n");
    trace_usage(verbose);
    device_usage(verbose);
    if (verbose > 1) {
        printf_filtered("\n");
        print_options();
    }
    error("");
}