From 82d5b01f84ce8a53e7efc668b50a516fefe10e29 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 30 Dec 2014 18:56:09 -0800 Subject: [PATCH] BESM6: besm6_punch migrate to use sim_fio API to set a fifo to non-blocking --- BESM6/besm6_punch.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/BESM6/besm6_punch.c b/BESM6/besm6_punch.c index 42906b15..c160bf3b 100644 --- a/BESM6/besm6_punch.c +++ b/BESM6/besm6_punch.c @@ -28,7 +28,6 @@ */ #include "besm6_defs.h" #include -#include t_stat fs_event (UNIT *u); t_stat uvvk_event (UNIT *u); @@ -125,13 +124,7 @@ t_stat fs_attach (UNIT *u, char *cptr) s = attach_unit (u, cptr); if (s != SCPE_OK) return s; - struct stat stbuf; - fstat (fileno(u->fileref), &stbuf); - isfifo[num] = (stbuf.st_mode & S_IFIFO) != 0; - if (isfifo[num]) { - int flags = fcntl(fileno(u->fileref), F_GETFL, 0); - fcntl(fileno(u->fileref), F_SETFL, flags | O_NONBLOCK); - } + isfifo[num] = (0 == sim_set_fifo_nonblock (u->fileref)); ENB_RDY(FS1_READY >> num); return SCPE_OK; }