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

Diff for /src/usr.bin/kdump/kdump.c between version 1.160 and 1.161

version 1.160, 2023/12/12 15:30:55 version 1.161, 2023/12/15 15:12:08
Line 133 
Line 133 
 static void ktruser(struct ktr_user *, size_t);  static void ktruser(struct ktr_user *, size_t);
 static void ktrexec(const char*, size_t);  static void ktrexec(const char*, size_t);
 static void ktrpledge(struct ktr_pledge *, size_t);  static void ktrpledge(struct ktr_pledge *, size_t);
   static void ktrpinsyscall(struct ktr_pinsyscall *, size_t);
 static void usage(void);  static void usage(void);
 static void ioctldecode(int);  static void ioctldecode(int);
 static void ptracedecode(int);  static void ptracedecode(int);
Line 309 
Line 310 
                 case KTR_PLEDGE:                  case KTR_PLEDGE:
                         ktrpledge(m, ktrlen);                          ktrpledge(m, ktrlen);
                         break;                          break;
                   case KTR_PINSYSCALL:
                           ktrpinsyscall(m, ktrlen);
                           break;
                 default:                  default:
                         printf("\n");                          printf("\n");
                         break;                          break;
Line 369 
Line 373 
         case KTR_PLEDGE:          case KTR_PLEDGE:
                 type = "PLDG";                  type = "PLDG";
                 break;                  break;
           case KTR_PINSYSCALL:
                   type = "PINS";
                   break;
         default:          default:
                 /* htobe32() not guaranteed to work as case label */                  /* htobe32() not guaranteed to work as case label */
                 if (kth->ktr_type == htobe32(KTR_START)) {                  if (kth->ktr_type == htobe32(KTR_START)) {
Line 1486 
Line 1493 
         (void)printf(", errno %d", pledge->error);          (void)printf(", errno %d", pledge->error);
         if (fancy)          if (fancy)
                 (void)printf(" %s", strerror(pledge->error));                  (void)printf(" %s", strerror(pledge->error));
           printf("\n");
   }
   
   static void
   ktrpinsyscall(struct ktr_pinsyscall *pinsyscall, size_t len)
   {
           const char *name = "";
           int i;
   
           if (len < sizeof(struct ktr_pinsyscall))
                   errx(1, "invalid ktr pinsyscall length %zu", len);
   
           if (pinsyscall->syscall >= SYS_MAXSYSCALL || pinsyscall->syscall < 0)
                   (void)printf("[%d]", pinsyscall->syscall);
           else
                   (void)printf("%s", syscallnames[pinsyscall->syscall]);
           (void)printf(", addr %lx, errno %d", pinsyscall->addr,
               pinsyscall->error);
           (void)printf(", errno %d", pinsyscall->error);
           if (fancy)
                   (void)printf(" %s", strerror(pinsyscall->error));
         printf("\n");          printf("\n");
 }  }
   

Legend:
Removed from v.1.160  
changed lines
  Added in v.1.161