linux_misc.c (86852) | linux_misc.c (87275) |
---|---|
1/*- 2 * Copyright (c) 1994-1995 S�ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 1994-1995 S�ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/sys/compat/linux/linux_misc.c 86852 2001-11-24 14:09:50Z des $ | 28 * $FreeBSD: head/sys/compat/linux/linux_misc.c 87275 2001-12-03 16:12:27Z rwatson $ |
29 */ 30 31#include "opt_compat.h" 32 33#include <sys/param.h> 34#include <sys/systm.h> 35#include <sys/fcntl.h> 36#include <sys/imgact_aout.h> --- 646 unchanged lines hidden (view full) --- 683 td->td_retval[0] = (int)CONVTCK(tv); 684 return 0; 685} 686 687int 688linux_newuname(struct thread *td, struct linux_newuname_args *args) 689{ 690 struct l_new_utsname utsname; | 29 */ 30 31#include "opt_compat.h" 32 33#include <sys/param.h> 34#include <sys/systm.h> 35#include <sys/fcntl.h> 36#include <sys/imgact_aout.h> --- 646 unchanged lines hidden (view full) --- 683 td->td_retval[0] = (int)CONVTCK(tv); 684 return 0; 685} 686 687int 688linux_newuname(struct thread *td, struct linux_newuname_args *args) 689{ 690 struct l_new_utsname utsname; |
691 char *osrelease, *osname; | 691 char osname[LINUX_MAX_UTSNAME]; 692 char osrelease[LINUX_MAX_UTSNAME]; |
692 693#ifdef DEBUG 694 if (ldebug(newuname)) 695 printf(ARGS(newuname, "*")); 696#endif 697 | 693 694#ifdef DEBUG 695 if (ldebug(newuname)) 696 printf(ARGS(newuname, "*")); 697#endif 698 |
698 osname = linux_get_osname(td->td_proc); 699 osrelease = linux_get_osrelease(td->td_proc); | 699 linux_get_osname(td->td_proc, osname); 700 linux_get_osrelease(td->td_proc, osrelease); |
700 701 bzero(&utsname, sizeof(utsname)); 702 strncpy(utsname.sysname, osname, LINUX_MAX_UTSNAME-1); 703 strncpy(utsname.nodename, hostname, LINUX_MAX_UTSNAME-1); 704 strncpy(utsname.release, osrelease, LINUX_MAX_UTSNAME-1); 705 strncpy(utsname.version, version, LINUX_MAX_UTSNAME-1); 706 strncpy(utsname.machine, machine, LINUX_MAX_UTSNAME-1); 707 strncpy(utsname.domainname, domainname, LINUX_MAX_UTSNAME-1); --- 621 unchanged lines hidden --- | 701 702 bzero(&utsname, sizeof(utsname)); 703 strncpy(utsname.sysname, osname, LINUX_MAX_UTSNAME-1); 704 strncpy(utsname.nodename, hostname, LINUX_MAX_UTSNAME-1); 705 strncpy(utsname.release, osrelease, LINUX_MAX_UTSNAME-1); 706 strncpy(utsname.version, version, LINUX_MAX_UTSNAME-1); 707 strncpy(utsname.machine, machine, LINUX_MAX_UTSNAME-1); 708 strncpy(utsname.domainname, domainname, LINUX_MAX_UTSNAME-1); --- 621 unchanged lines hidden --- |