tprintmap.c - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       tprintmap.c (542B)
       ---
            1 #include "stdinc.h"
            2 #include "dat.h"
            3 #include "fns.h"
            4 
            5 void
            6 usage(void)
            7 {
            8         fprint(2, "usage: printmap [-B blockcachesize] config\n");
            9         threadexitsall("usage");
           10 }
           11 
           12 Config conf;
           13 
           14 void
           15 threadmain(int argc, char *argv[])
           16 {
           17         u32int bcmem;
           18         int fix;
           19 
           20         fix = 0;
           21         bcmem = 0;
           22         ARGBEGIN{
           23         case 'B':
           24                 bcmem = unittoull(ARGF());
           25                 break;
           26         default:
           27                 usage();
           28                 break;
           29         }ARGEND
           30 
           31         if(!fix)
           32                 readonly = 1;
           33 
           34         if(argc != 1)
           35                 usage();
           36 
           37         if(initventi(argv[0], &conf) < 0)
           38                 sysfatal("can't init venti: %r");
           39 
           40         printindex(1, mainindex);
           41         threadexitsall(0);
           42 }