diff options
author | jkh <jkh@FreeBSD.org> | 1998-09-23 14:50:26 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1998-09-23 14:50:26 +0000 |
commit | f225f8fe639e3ca015af49f6809a2de1ae80fb30 (patch) | |
tree | f7279dde4bb473b10df18ffea9ac969f537b36ab | |
parent | 7db7922f9e0765024764038733565a789354e950 (diff) | |
download | FreeBSD-src-f225f8fe639e3ca015af49f6809a2de1ae80fb30.zip FreeBSD-src-f225f8fe639e3ca015af49f6809a2de1ae80fb30.tar.gz |
return time in proper format for linux.
-rw-r--r-- | sys/compat/linux/linux_misc.c | 3 | ||||
-rw-r--r-- | sys/i386/linux/linux_misc.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 3647f84..4b68f0d 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_misc.c,v 1.41 1998/08/05 16:44:30 bde Exp $ + * $Id: linux_misc.c,v 1.42 1998/08/16 01:21:50 bde Exp $ */ #include <sys/param.h> @@ -682,6 +682,7 @@ linux_time(struct proc *p, struct linux_time_args *args) printf("Linux-emul(%d): time(*)\n", p->p_pid); #endif microtime(&tv); + timevalsub(&tv, &boottime); tm = tv.tv_sec; if (args->tm && (error = copyout(&tm, args->tm, sizeof(linux_time_t)))) return error; diff --git a/sys/i386/linux/linux_misc.c b/sys/i386/linux/linux_misc.c index 3647f84..4b68f0d 100644 --- a/sys/i386/linux/linux_misc.c +++ b/sys/i386/linux/linux_misc.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_misc.c,v 1.41 1998/08/05 16:44:30 bde Exp $ + * $Id: linux_misc.c,v 1.42 1998/08/16 01:21:50 bde Exp $ */ #include <sys/param.h> @@ -682,6 +682,7 @@ linux_time(struct proc *p, struct linux_time_args *args) printf("Linux-emul(%d): time(*)\n", p->p_pid); #endif microtime(&tv); + timevalsub(&tv, &boottime); tm = tv.tv_sec; if (args->tm && (error = copyout(&tm, args->tm, sizeof(linux_time_t)))) return error; |