Add linux_mknod so that it will do mkfifo if needed...

This commit is contained in:
Søren Schmidt 1996-01-14 10:59:58 +00:00
parent 581bb98709
commit 0de2e98fc2
4 changed files with 77 additions and 44 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.8 1995/12/15 03:06:54 peter Exp $
* $Id: linux_misc.c,v 1.9 1995/12/15 03:28:38 peter Exp $
*/
#include <sys/param.h>
@ -674,3 +674,18 @@ linux_wait4(struct proc *p, struct linux_wait4_args *args, int *retval)
(bsd_to_linux_signal[WSTOPSIG(tmpstat)]<<8);
return copyout(&tmpstat, args->status, sizeof(int));
}
struct linux_mknod_args {
char *path;
int mode;
int dev;
};
int
linux_mknod(struct proc *p, struct linux_mknod_args *args, int *retval)
{
if (args->mode & S_IFIFO)
return mkfifo(p, (struct mkfifo_args *)args, retval);
else
return mknod(p, (struct mknod_args *)args, retval);
}

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.8 1995/12/15 03:06:54 peter Exp $
* $Id: linux_misc.c,v 1.9 1995/12/15 03:28:38 peter Exp $
*/
#include <sys/param.h>
@ -674,3 +674,18 @@ linux_wait4(struct proc *p, struct linux_wait4_args *args, int *retval)
(bsd_to_linux_signal[WSTOPSIG(tmpstat)]<<8);
return copyout(&tmpstat, args->status, sizeof(int));
}
struct linux_mknod_args {
char *path;
int mode;
int dev;
};
int
linux_mknod(struct proc *p, struct linux_mknod_args *args, int *retval)
{
if (args->mode & S_IFIFO)
return mkfifo(p, (struct mkfifo_args *)args, retval);
else
return mknod(p, (struct mknod_args *)args, retval);
}

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_sysent.c,v 1.2 1995/11/06 12:52:25 davidg Exp $
* $Id: linux_sysent.c,v 1.3 1995/11/22 07:43:52 bde Exp $
*/
/* XXX we use functions that might not exist. */
@ -55,7 +55,7 @@ static struct sysent linux_sysent[] = {
3, (sy_call_t *)execve, /* 11 */
1, (sy_call_t *)chdir, /* 12 */
1, (sy_call_t *)linux_time, /* 13 */
3, (sy_call_t *)mknod, /* 14 */
3, (sy_call_t *)linux_mknod, /* 14 */
2, (sy_call_t *)chmod, /* 15 */
3, (sy_call_t *)chown, /* 16 */
1, (sy_call_t *)linux_break, /* 17 */

View File

@ -25,6 +25,7 @@ struct linux_kill_args;
struct linux_listen_args;
struct linux_lseek_args;
struct linux_mmap_args;
struct linux_mknod_args;
struct linux_newfstat_args;
struct linux_newstat_args;
struct linux_newuname_args;
@ -146,6 +147,8 @@ int linux_brk __P((struct proc *p, struct linux_brk_args *args,
int linux_fork __P((struct proc *p, void *args, int *retval));
int linux_getpgid __P((struct proc *p, struct linux_getpgid_args *args,
int *retval));
int linux_mknod __P((struct proc *p, struct linux_mknod_args *args,
int *retval));
int linux_mmap __P((struct proc *p, struct linux_mmap_args *args,
int *retval));
int linux_newuname __P((struct proc *p, struct linux_newuname_args *args,