From 0cc361bab02e886c3bbc8a0ee3f5a7d594707cb3 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sat, 16 Feb 2013 18:13:40 -0500 Subject: [PATCH] minor cleanups --- mpw/mpw_ioctl.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/mpw/mpw_ioctl.cpp b/mpw/mpw_ioctl.cpp index f1c313a..f3ac698 100644 --- a/mpw/mpw_ioctl.cpp +++ b/mpw/mpw_ioctl.cpp @@ -112,10 +112,11 @@ namespace MPW fprintf(stderr, " interactive(%02x)\n", fd); - d0 = kEINVAL; + //d0 = kEINVAL; - -#if 0 + // linkgs reads from stdin and + // doesn't work quite right when + // this returns 0. So, don't. if (fd < 0 || fd >= FDTable.size() || !FDTable[fd]) { @@ -126,9 +127,6 @@ namespace MPW int tty = ::isatty(fd); d0 = tty ? 0 : kEINVAL; } -#endif - - memoryWriteWord(f.error, parm + 2); return d0; @@ -148,15 +146,11 @@ namespace MPW f.count = memoryReadLong(parm + 12); f.buffer = memoryReadLong(parm + 16); - // linkgs reads from stdin and - // doesn't work quite right when - // this returns 0. So, don't. - f.error = 0; int fd = f.cookie; - fprintf(stderr, " interactive(%02x)\n", fd); + fprintf(stderr, " fname(%02x)\n", fd); memoryWriteWord(f.error, parm + 2); return kEINVAL; @@ -204,7 +198,7 @@ namespace MPW uint32_t d0; uint32_t whence = memoryReadLong(arg); - int32_t offset =memoryReadLong(arg + 4); // signed value. + int32_t offset = memoryReadLong(arg + 4); // signed value. int nativeWhence = 0; f.flags = memoryReadWord(parm);