Date: Sun, 1 Jul 2007 10:50:42 GMT From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 122636 for review Message-ID: <200707011050.l61AoghD001227@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=122636 Change 122636 by peter@peter_melody on 2007/07/01 10:49:51 Strip out most hackery. Use the old lseek/mmap hooks for the freebsd6 stuff. Affected files ... .. //depot/projects/hammer/usr.bin/kdump/kdump.c#18 edit Differences ... ==== //depot/projects/hammer/usr.bin/kdump/kdump.c#18 (text+ko) ==== @@ -308,14 +308,10 @@ 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 { - 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]); - } + else + (void)printf("%s", syscallnames[ktr->ktr_code]); ip = &ktr->ktr_args[0]; if (narg) { char c = '('; @@ -457,7 +453,7 @@ msyncflagsname((int)*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_mmap) { + } else if (ktr->ktr_code == SYS_freebsd6_mmap) { print_number(ip,narg,c); print_number(ip,narg,c); (void)putchar(','); @@ -468,7 +464,7 @@ mmapflagsname ((int)*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS__new_mmap) { + } else if (ktr->ktr_code == SYS_mmap) { print_number(ip,narg,c); print_number(ip,narg,c); (void)putchar(','); @@ -540,7 +536,7 @@ sockoptname((int)*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_lseek) { + } else if (ktr->ktr_code == SYS_freebsd6_lseek) { print_number(ip,narg,c); /* Hidden 'pad' argument, not in lseek(2) */ print_number(ip,narg,c); @@ -549,7 +545,7 @@ whencename ((int)*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS__new_lseek) { + } else if (ktr->ktr_code == SYS_lseek) { print_number(ip,narg,c); /* Hidden 'pad' argument, not in lseek(2) */ print_number(ip,narg,c); @@ -771,14 +767,10 @@ 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 { - if (strncmp(syscallnames[code], "_new_", 5) == 0) - (void)printf("%s ", syscallnames[code] + 5); - else - (void)printf("%s ", syscallnames[code]); - } + 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?200707011050.l61AoghD001227>