int tty_open(int input, int output, int primary, void *d, char **dev_out)
{
struct tty_chan *data = d;
int tty_open(int input, int output, int primary, void *d, char **dev_out)
{
struct tty_chan *data = d;
fd = os_open_file(data->dev, of_set_rw(OPENFLAGS(), input, output), 0);
if(fd < 0) return(fd);
if(data->raw){
fd = os_open_file(data->dev, of_set_rw(OPENFLAGS(), input, output), 0);
if(fd < 0) return(fd);
if(data->raw){