diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-18 00:24:27 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-18 00:24:27 +0000 |
commit | b9558d5f86c471a125abf1fb3a3882fb053b1f8c (patch) | |
tree | 707b53ec64e740a7da87d5f36485e3cd9b1c794e /arch/sparc64/solaris/misc.c | |
parent | b3ac367c7a3e6047abe74817db27e34e759f279f (diff) |
Merge with Linux 2.3.41.
Diffstat (limited to 'arch/sparc64/solaris/misc.c')
-rw-r--r-- | arch/sparc64/solaris/misc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c index 04e676907..450d2fc9e 100644 --- a/arch/sparc64/solaris/misc.c +++ b/arch/sparc64/solaris/misc.c @@ -242,8 +242,10 @@ asmlinkage int solaris_utssys(u32 buf, u32 flags, int which, u32 buf2) /* Let's cheat */ set_utsfield(((struct sol_uname *)A(buf))->sysname, "SunOS", 1, 0); + down_read(&uts_sem); set_utsfield(((struct sol_uname *)A(buf))->nodename, system_utsname.nodename, 1, 1); + up_read(&uts_sem); set_utsfield(((struct sol_uname *)A(buf))->release, "2.6", 0, 0); set_utsfield(((struct sol_uname *)A(buf))->version, @@ -263,7 +265,7 @@ asmlinkage int solaris_utssys(u32 buf, u32 flags, int which, u32 buf2) asmlinkage int solaris_utsname(u32 buf) { /* Why should we not lie a bit? */ - down(&uts_sem); + down_read(&uts_sem); set_utsfield(((struct sol_utsname *)A(buf))->sysname, "SunOS", 0, 0); set_utsfield(((struct sol_utsname *)A(buf))->nodename, @@ -274,7 +276,7 @@ asmlinkage int solaris_utsname(u32 buf) "Generic", 0, 0); set_utsfield(((struct sol_utsname *)A(buf))->machine, machine(), 0, 0); - up(&uts_sem); + up_read(&uts_sem); return 0; } @@ -300,8 +302,10 @@ asmlinkage int solaris_sysinfo(int cmd, u32 buf, s32 count) case SI_SYSNAME: r = "SunOS"; break; case SI_HOSTNAME: r = buffer + 256; + down_read(&uts_sem); for (p = system_utsname.nodename, q = buffer; q < r && *p && *p != '.'; *q++ = *p++); + up_read(&uts_sem); *q = 0; r = buffer; break; |