| 601 | } |
| 602 | |
| 603 | int |
| 604 | linux_gettimeofday(struct thread *td, struct linux_gettimeofday_args *uap) |
| 605 | { |
| 606 | struct timeval atv; |
| 607 | l_timeval atv32; |
| 608 | struct timezone rtz; |
| 609 | int error = 0; |
| 610 | |
| 611 | if (uap->tp) { |
| 612 | microtime(&atv); |
| 613 | atv32.tv_sec = atv.tv_sec; |
| 614 | atv32.tv_usec = atv.tv_usec; |
| 615 | error = copyout(&atv32, uap->tp, sizeof(atv32)); |
| 616 | } |
| 617 | if (error == 0 && uap->tzp != NULL) { |
| 618 | rtz.tz_minuteswest = 0; |
| 619 | rtz.tz_dsttime = 0; |
| 620 | error = copyout(&rtz, uap->tzp, sizeof(rtz)); |
| 621 | } |
| 622 | return (error); |
| 623 | } |
| 624 | |
| 625 | int |
| 626 | linux_settimeofday(struct thread *td, struct linux_settimeofday_args *uap) |