Commit 6ffa96a3 authored by David S. Miller's avatar David S. Miller

[SPARC]: Fix sys_ipc to return ENOSYS instead of EINVAL as appropriate.

parent 684b80f9
...@@ -140,7 +140,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr, ...@@ -140,7 +140,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr,
goto out; goto out;
} }
default: default:
err = -EINVAL; err = -ENOSYS;
goto out; goto out;
} }
if (call <= MSGCTL) if (call <= MSGCTL)
...@@ -173,7 +173,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr, ...@@ -173,7 +173,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr,
err = sys_msgctl (first, second, (struct msqid_ds *) ptr); err = sys_msgctl (first, second, (struct msqid_ds *) ptr);
goto out; goto out;
default: default:
err = -EINVAL; err = -ENOSYS;
goto out; goto out;
} }
if (call <= SHMCTL) if (call <= SHMCTL)
...@@ -205,11 +205,11 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr, ...@@ -205,11 +205,11 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr,
err = sys_shmctl (first, second, (struct shmid_ds *) ptr); err = sys_shmctl (first, second, (struct shmid_ds *) ptr);
goto out; goto out;
default: default:
err = -EINVAL; err = -ENOSYS;
goto out; goto out;
} }
else else
err = -EINVAL; err = -ENOSYS;
out: out:
return err; return err;
} }
......
...@@ -199,7 +199,7 @@ asmlinkage int sys_ipc (unsigned call, int first, int second, unsigned long thir ...@@ -199,7 +199,7 @@ asmlinkage int sys_ipc (unsigned call, int first, int second, unsigned long thir
goto out; goto out;
} }
default: default:
err = -EINVAL; err = -ENOSYS;
goto out; goto out;
} }
if (call <= MSGCTL) if (call <= MSGCTL)
...@@ -218,7 +218,7 @@ asmlinkage int sys_ipc (unsigned call, int first, int second, unsigned long thir ...@@ -218,7 +218,7 @@ asmlinkage int sys_ipc (unsigned call, int first, int second, unsigned long thir
err = sys_msgctl (first, second | IPC_64, (struct msqid_ds *) ptr); err = sys_msgctl (first, second | IPC_64, (struct msqid_ds *) ptr);
goto out; goto out;
default: default:
err = -EINVAL; err = -ENOSYS;
goto out; goto out;
} }
if (call <= SHMCTL) if (call <= SHMCTL)
...@@ -236,11 +236,11 @@ asmlinkage int sys_ipc (unsigned call, int first, int second, unsigned long thir ...@@ -236,11 +236,11 @@ asmlinkage int sys_ipc (unsigned call, int first, int second, unsigned long thir
err = sys_shmctl (first, second | IPC_64, (struct shmid_ds *) ptr); err = sys_shmctl (first, second | IPC_64, (struct shmid_ds *) ptr);
goto out; goto out;
default: default:
err = -EINVAL; err = -ENOSYS;
goto out; goto out;
} }
else else
err = -EINVAL; err = -ENOSYS;
out: out:
return err; return err;
} }
......
...@@ -756,7 +756,7 @@ asmlinkage int sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u ...@@ -756,7 +756,7 @@ asmlinkage int sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u
err = do_sys32_semctl (first, second, third, (void *)AA(ptr)); err = do_sys32_semctl (first, second, third, (void *)AA(ptr));
goto out; goto out;
default: default:
err = -EINVAL; err = -ENOSYS;
goto out; goto out;
}; };
if (call <= MSGCTL) if (call <= MSGCTL)
...@@ -775,7 +775,7 @@ asmlinkage int sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u ...@@ -775,7 +775,7 @@ asmlinkage int sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u
err = do_sys32_msgctl (first, second, (void *)AA(ptr)); err = do_sys32_msgctl (first, second, (void *)AA(ptr));
goto out; goto out;
default: default:
err = -EINVAL; err = -ENOSYS;
goto out; goto out;
} }
if (call <= SHMCTL) if (call <= SHMCTL)
...@@ -794,11 +794,11 @@ asmlinkage int sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u ...@@ -794,11 +794,11 @@ asmlinkage int sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u
err = do_sys32_shmctl (first, second, (void *)AA(ptr)); err = do_sys32_shmctl (first, second, (void *)AA(ptr));
goto out; goto out;
default: default:
err = -EINVAL; err = -ENOSYS;
goto out; goto out;
} }
err = -EINVAL; err = -ENOSYS;
out: out:
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment