pc64: syscallfmt for nsec syscall

This commit is contained in:
cinap_lenrek 2014-09-20 01:37:11 +02:00
parent acd15f13c4
commit 19a8f66eec

View file

@ -298,6 +298,8 @@ syscallfmt(ulong syscallno, uintptr pc, va_list list)
}
break;
case _NSEC:
if(sizeof(uintptr) == sizeof(vlong))
break;
v = va_arg(list, vlong*);
fmtprint(&fmt, "%#p", v);
break;
@ -324,14 +326,6 @@ sysretfmt(ulong syscallno, va_list list, uintptr ret, uvlong start, uvlong stop)
errstr = "\"\"";
switch(syscallno){
default:
case ALARM:
case _WRITE:
case PWRITE:
if((long)ret == -1)
errstr = up->syserrstr;
fmtprint(&fmt, " = %ld", (long)ret);
break;
case EXEC:
case SEGBRK:
case SEGATTACH:
@ -403,6 +397,20 @@ sysretfmt(ulong syscallno, va_list list, uintptr ret, uvlong start, uvlong stop)
}
fmtprint(&fmt, " = %ld", (long)ret);
break;
case _NSEC:
if(sizeof(uintptr) == sizeof(vlong)){
fmtprint(&fmt, " = %lld", (vlong)ret);
break;
}
/* wet floor */
case ALARM:
case _WRITE:
case PWRITE:
default:
if((long)ret == -1)
errstr = up->syserrstr;
fmtprint(&fmt, " = %ld", (long)ret);
break;
}
fmtprint(&fmt, " %s %#llud %#llud\n", errstr, start, stop);