Skip to content

Commit

Permalink
[MIPS] Remove support for sysmips(2) SETNAME and MIPS_RDNVRAM operati…
Browse files Browse the repository at this point in the history
…ons.

    
SETNAME only had a minor defect but probably never had a user and
MIPS_RDNVRAM was unimplemented anyway.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Ralf Baechle committed May 31, 2006
1 parent c620953 commit 235a9d3
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions arch/mips/kernel/syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,27 +280,6 @@ asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3)
char __user *name;

switch(cmd) {
case SETNAME: {
char nodename[__NEW_UTS_LEN + 1];

if (!capable(CAP_SYS_ADMIN))
return -EPERM;

name = (char __user *) arg1;

len = strncpy_from_user(nodename, name, __NEW_UTS_LEN);
if (len < 0)
return -EFAULT;

down_write(&uts_sem);
strncpy(system_utsname.nodename, nodename, len);
nodename[__NEW_UTS_LEN] = '\0';
strlcpy(system_utsname.nodename, nodename,
sizeof(system_utsname.nodename));
up_write(&uts_sem);
return 0;
}

case MIPS_ATOMIC_SET:
printk(KERN_CRIT "How did I get here?\n");
return -EINVAL;
Expand All @@ -313,9 +292,6 @@ asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3)
case FLUSH_CACHE:
__flush_cache_all();
return 0;

case MIPS_RDNVRAM:
return -EIO;
}

return -EINVAL;
Expand Down

0 comments on commit 235a9d3

Please sign in to comment.