Let newuname return "Linux" as the OS name and not "FreeBSD". Also, return a

more sensible (for Linux applications) release number. Hardcoding a release
number has its drawbacks, but it will do for now.
This commit is contained in:
marcel 1999-07-05 19:18:03 +00:00
parent a8be8b77f4
commit 1042b65a2f
2 changed files with 6 additions and 6 deletions

View File

@ -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.57 1999/04/28 01:04:19 luoqi Exp $
* $Id: linux_misc.c,v 1.58 1999/05/06 18:44:25 peter Exp $
*/
#include <sys/param.h>
@ -868,11 +868,11 @@ linux_newuname(struct proc *p, struct linux_newuname_args *args)
printf("Linux-emul(%d): newuname(*)\n", p->p_pid);
#endif
bzero(&linux_newuname, sizeof(struct linux_newuname_t));
strncpy(linux_newuname.sysname, ostype,
strncpy(linux_newuname.sysname, "Linux",
sizeof(linux_newuname.sysname) - 1);
strncpy(linux_newuname.nodename, hostname,
sizeof(linux_newuname.nodename) - 1);
strncpy(linux_newuname.release, osrelease,
strncpy(linux_newuname.release, "2.0.36",
sizeof(linux_newuname.release) - 1);
strncpy(linux_newuname.version, version,
sizeof(linux_newuname.version) - 1);

View File

@ -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.57 1999/04/28 01:04:19 luoqi Exp $
* $Id: linux_misc.c,v 1.58 1999/05/06 18:44:25 peter Exp $
*/
#include <sys/param.h>
@ -868,11 +868,11 @@ linux_newuname(struct proc *p, struct linux_newuname_args *args)
printf("Linux-emul(%d): newuname(*)\n", p->p_pid);
#endif
bzero(&linux_newuname, sizeof(struct linux_newuname_t));
strncpy(linux_newuname.sysname, ostype,
strncpy(linux_newuname.sysname, "Linux",
sizeof(linux_newuname.sysname) - 1);
strncpy(linux_newuname.nodename, hostname,
sizeof(linux_newuname.nodename) - 1);
strncpy(linux_newuname.release, osrelease,
strncpy(linux_newuname.release, "2.0.36",
sizeof(linux_newuname.release) - 1);
strncpy(linux_newuname.version, version,
sizeof(linux_newuname.version) - 1);