Use printstr for sethostname, setdomainname, and gethostname decoding
The argument passed to sethostname and setdomainname syscalls, as well as the string returned by gethostname syscall, is not a pathname, so printpathn is not the right method for its decoding. * process.c (sys_sethostname, sys_setdomainname): Decode 1st argument using printstr instead of printpathn. [ALPHA] (sys_gethostname): Likewise.
This commit is contained in:
parent
3b09ebe724
commit
3a3b71c7d8
@ -390,7 +390,7 @@ int
|
||||
sys_sethostname(struct tcb *tcp)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
printpathn(tcp, tcp->u_arg[0], tcp->u_arg[1]);
|
||||
printstr(tcp, tcp->u_arg[0], tcp->u_arg[1]);
|
||||
tprintf(", %lu", tcp->u_arg[1]);
|
||||
}
|
||||
return 0;
|
||||
@ -404,7 +404,7 @@ sys_gethostname(struct tcb *tcp)
|
||||
if (syserror(tcp))
|
||||
tprintf("%#lx", tcp->u_arg[0]);
|
||||
else
|
||||
printpath(tcp, tcp->u_arg[0]);
|
||||
printstr(tcp, tcp->u_arg[0], -1);
|
||||
tprintf(", %lu", tcp->u_arg[1]);
|
||||
}
|
||||
return 0;
|
||||
@ -415,7 +415,7 @@ int
|
||||
sys_setdomainname(struct tcb *tcp)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
printpathn(tcp, tcp->u_arg[0], tcp->u_arg[1]);
|
||||
printstr(tcp, tcp->u_arg[0], tcp->u_arg[1]);
|
||||
tprintf(", %lu", tcp->u_arg[1]);
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user