Dmitry V. Levin | 03c06ea | 2014-12-11 19:25:02 +0000 | [diff] [blame] | 1 | #include "defs.h" |
| 2 | |
Dmitry V. Levin | a0bd374 | 2015-04-07 01:36:50 +0000 | [diff] [blame] | 3 | SYS_FUNC(sethostname) |
Dmitry V. Levin | 03c06ea | 2014-12-11 19:25:02 +0000 | [diff] [blame] | 4 | { |
Dmitry V. Levin | 3aced79 | 2015-07-20 11:30:38 +0000 | [diff] [blame] | 5 | printstr(tcp, tcp->u_arg[0], tcp->u_arg[1]); |
| 6 | tprintf(", %lu", tcp->u_arg[1]); |
| 7 | |
| 8 | return RVAL_DECODED; |
Dmitry V. Levin | 03c06ea | 2014-12-11 19:25:02 +0000 | [diff] [blame] | 9 | } |
| 10 | |
| 11 | #if defined(ALPHA) |
Dmitry V. Levin | a0bd374 | 2015-04-07 01:36:50 +0000 | [diff] [blame] | 12 | SYS_FUNC(gethostname) |
Dmitry V. Levin | 03c06ea | 2014-12-11 19:25:02 +0000 | [diff] [blame] | 13 | { |
| 14 | if (exiting(tcp)) { |
| 15 | if (syserror(tcp)) |
Dmitry V. Levin | 3f08e2d | 2015-07-20 11:29:20 +0000 | [diff] [blame] | 16 | printaddr(tcp->u_arg[0]); |
Dmitry V. Levin | 03c06ea | 2014-12-11 19:25:02 +0000 | [diff] [blame] | 17 | else |
| 18 | printstr(tcp, tcp->u_arg[0], -1); |
| 19 | tprintf(", %lu", tcp->u_arg[1]); |
| 20 | } |
| 21 | return 0; |
| 22 | } |
| 23 | #endif /* ALPHA */ |