[BACK]Return to modstat.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / modstat

Diff for /src/usr.bin/modstat/Attic/modstat.c between version 1.1 and 1.2

version 1.1, 1995/10/18 08:45:48 version 1.2, 1996/06/21 11:40:09
Line 71 
Line 71 
         char *modname;          char *modname;
 {  {
         struct lmc_stat sbuf;          struct lmc_stat sbuf;
           char name[MAXLKMNAME] = "";
   
           sbuf.id = modnum;
           sbuf.name = name;
   
         if (modname != NULL)          if (modname != NULL)
                 strcpy(sbuf.name, modname);                  strcpy(sbuf.name, modname);
   
         sbuf.id = modnum;  
   
         if (ioctl(devfd, LMSTAT, &sbuf) == -1) {          if (ioctl(devfd, LMSTAT, &sbuf) == -1) {
                 switch (errno) {                  switch (errno) {
                 case EINVAL:            /* out of range */                  case EINVAL:            /* out of range */
Line 92 
Line 94 
         /*          /*
          * Decode this stat buffer...           * Decode this stat buffer...
          */           */
         printf("%-7s %3d %3d %08x %04x %8x %3d %s\n",          printf("%-7s %3d %3d %08x %04x %8x %3d s\n",
             type_names[sbuf.type],              type_names[sbuf.type],
             sbuf.id,            /* module id */              sbuf.id,            /* module id */
             sbuf.offset,        /* offset into modtype struct */              sbuf.offset,        /* offset into modtype struct */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2