PERFORCE change 122613 for review

Peter Wemm peter at FreeBSD.org
Sun Jul 1 05:42:59 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=122613

Change 122613 by peter at 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) {


More information about the p4-projects mailing list