stason.org logo lotus


previous page: 7.3. What can I do when I get lots of FDERRs when writing/formatting a floppy?page up: Unix-PC/3b1 Computers FAQnext page: 7.5. Can I connect my Starlan board to an Ethernet?

7.4. Why does rn fail with "Can't open /dev/tty" from the built-in modem?

 Books
 TULARC
















Description

This article is from the 3b1 computers FAQ, by John B. Bunch with numerous contributions by others.

7.4. Why does rn fail with "Can't open /dev/tty" from the built-in modem?

The problem is a line in the term.c file. The lines that have to be changed for rn to work are:

Before change:

	[...]
    		devtty = open("/dev/tty",O_RDONLY);
    		if (devtty < 0) {
		printf(cantopen,"/dev/tty") FLUSH;
		finalize(1);
    		}
    		fcntl(devtty,F_SETFL,O_NDELAY);
	[...]

After change:

	[...]
    		devtty = open("/dev/tty",O_RDWR);    /* changed for UNIX PC */
    		if (devtty < 0) {
		printf(cantopen,"/dev/tty") FLUSH;
		finalize(1);
    		}
    		/* fcntl(devtty,F_SETFL,O_NDELAY);   /* changed for UNIX PC */
	[...]

This change is required because the /dev/ph* devices require DATA connections to be opened with O_RDWR, so changing the O_RDONLY (or, in some versions of rn, the constant 0) to O_RDWR will solve your problems. Note that these changes are also required for rn-derived programs like trn.

 

Continue to:


Share and Enjoy

Bookmark this story so others can enjoy it:
  • digg
  • Reddit
  • del.icio.us
  • Furl
  • Wists

Tags

pc, hardware, video, AT&T UNIX PC, PC7300, and 3B1, faq, frequently asked questions, repair, computer, card







TOP
previous page: 7.3. What can I do when I get lots of FDERRs when writing/formatting a floppy?page up: Unix-PC/3b1 Computers FAQnext page: 7.5. Can I connect my Starlan board to an Ethernet?