Date: Sun, 1 Jul 2007 05:42:57 GMT From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 122613 for review Message-ID: <200707010542.l615gviH062622@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=122613 Change 122613 by peter@peter_melody on 2007/07/01 05:42:26 Make the _new_ prefixes disappear. Affected files ... .. //depot/projects/hammer/usr.bin/kdump/kdump.c#17 edit Differences ... ==== //depot/projects/hammer/usr.bin/kdump/kdump.c#17 (text+ko) ==== @@ -308,10 +308,14 @@ int narg = ktr->ktr_narg; register_t *ip; - if (ktr->ktr_code >= nsyscalls || ktr->ktr_code < 0) + if (ktr->ktr_code >= nsyscalls || ktr->ktr_code < 0) { (void)printf("[%d]", ktr->ktr_code); - else - (void)printf("%s", syscallnames[ktr->ktr_code]); + } else { + if (strncmp(syscallnames[ktr->ktr_code], "_new_", 5) == 0) + (void)printf("%s", syscallnames[ktr->ktr_code] + 5); + else + (void)printf("%s", syscallnames[ktr->ktr_code]); + } ip = &ktr->ktr_args[0]; if (narg) { char c = '('; @@ -464,6 +468,17 @@ mmapflagsname ((int)*ip); ip++; narg--; + } else if (ktr->ktr_code == SYS__new_mmap) { + print_number(ip,narg,c); + print_number(ip,narg,c); + (void)putchar(','); + mmapprotname ((int)*ip); + (void)putchar(','); + ip++; + narg--; + mmapflagsname ((int)*ip); + ip++; + narg--; } else if (ktr->ktr_code == SYS_mprotect) { print_number(ip,narg,c); print_number(ip,narg,c); @@ -534,6 +549,15 @@ whencename ((int)*ip); ip++; narg--; + } else if (ktr->ktr_code == SYS__new_lseek) { + print_number(ip,narg,c); + /* Hidden 'pad' argument, not in lseek(2) */ + print_number(ip,narg,c); + (void)putchar(','); + whencename ((int)*ip); + ip++; + narg--; + } else if (ktr->ktr_code == SYS_flock) { print_number(ip,narg,c); (void)putchar(','); @@ -747,10 +771,14 @@ int error = ktr->ktr_error; int code = ktr->ktr_code; - if (code >= nsyscalls || code < 0) + if (code >= nsyscalls || code < 0) { (void)printf("[%d] ", code); - else - (void)printf("%s ", syscallnames[code]); + } else { + if (strncmp(syscallnames[code], "_new_", 5) == 0) + (void)printf("%s ", syscallnames[code] + 5); + else + (void)printf("%s ", syscallnames[code]); + } if (error == 0) { if (fancy) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707010542.l615gviH062622>