shithub: purgatorio

ref: 00c219c7d9c2b9f60c2db0e1ba7289b2301209a7
dir: /os/ip/plan9.c/

View raw version
#include	"u.h"
#include	"../port/lib.h"
#include	"mem.h"
#include	"dat.h"
#include	"fns.h"
#include	"../port/error.h"
#include	"ip.h"

/*
 *  some hacks for commonality twixt inferno and plan9
 */

char*
commonuser(void)
{
	return up->env->user;
}

Chan*
commonfdtochan(int fd, int mode, int a, int b)
{
	return fdtochan(up->env->fgrp, fd, mode, a, b);
}

char*
commonerror(void)
{
	return up->env->errstr;
}

int
postnote(Proc *p, int, char *, int)
{
	swiproc(p, 0);
	return 0;
}