kdump(1): Add pathconf(2) variable name printing.
authorSascha Wildner <saw@online.de>
Sat, 5 Aug 2017 00:51:05 +0000 (02:51 +0200)
committerSascha Wildner <saw@online.de>
Sat, 5 Aug 2017 00:51:05 +0000 (02:51 +0200)
usr.bin/kdump/kdump.c
usr.bin/kdump/kdump_subr.h
usr.bin/kdump/mksubr

index 4d58076..b9d6790 100644 (file)
@@ -682,6 +682,14 @@ ktrsyscall(struct ktr_syscall *ktr)
                                ip++;
                                narg--;
                                c = ',';
+                       } else if (ktr->ktr_code == SYS_fpathconf ||
+                                  ktr->ktr_code == SYS_lpathconf ||
+                                  ktr->ktr_code == SYS_pathconf) {
+                               print_number(ip,narg,c);
+                               putchar(',');
+                               pathconfname((int)*ip);
+                               ip++;
+                               narg--;
                        }
                }
                while (narg > 0) {
index 7fe4f76..d3b0d90 100644 (file)
@@ -47,3 +47,4 @@ void minheritname (int);
 void quotactlname (int);
 void ptraceopname (int);
 void clockidname (int);
+void pathconfname (int);
index 15d60c5..a87c0d2 100644 (file)
@@ -349,6 +349,7 @@ auto_switch_type "sockoptname" "SO_[A-Z]+[[:space:]]+0x[0-9]+" "sys/socket.h"
 auto_switch_type "socktypename" "SOCK_[A-Z]+[[:space:]]+[1-9]+[0-9]*" "sys/socket.h"
 auto_switch_type "ptraceopname" "PT_[[:alnum:]]+[[:space:]]+[0-9]+" "sys/ptrace.h"
 auto_switch_type "clockidname" "CLOCK_[[:alnum:]]+" "time.h" "noinvdef"
+auto_switch_type "pathconfname" "_PC_[[:alnum:]]+" "sys/unistd.h"
 
 cat <<_EOF_
 /*