Print this page
3910 t_look(3NSL) should never return T_ERROR

@@ -24,14 +24,13 @@
 /*        All Rights Reserved   */
 
 /*
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
+ * Copyright 2014 Gary Mills
  */
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
 #include "mt.h"
 #include <errno.h>
 #include <unistd.h>
 #include <sys/stream.h>
 #include <stropts.h>

@@ -131,37 +130,24 @@
         do {
                 retval = ioctl(fd, I_PEEK, &strpeek);
         } while (retval < 0 && errno == EINTR);
 
         if (retval < 0) {
-                if (_T_IS_TLI(api_semantics)) {
                         /*
-                         * This return of T_ERROR event is ancient
-                         * SVR3 TLI semantics and not documented for
-                         * current SVR4 TLI interface.
-                         * Fixing this will impact some apps
-                         * (e.g. nfsd,lockd) in ON consolidation
-                         * so they need to be fixed first before TLI
-                         * can be fixed.
-                         * XXX Should we never fix this because it might
-                         * break apps in field ?
+                 * XTI semantics (also identical to documented
+                 * TLI semantics).
                          */
-                        return (T_ERROR);
-                }
-                /*
-                 * XTI semantics (also identical to documented,
-                 * but not implemented TLI semantics).
-                 */
                 t_errno = TSYSERR;
                 return (-1);
         }
 
         /*
          * if something there and cntl part also there
          */
         if ((tiptr->ti_lookcnt > 0) ||
-        ((retval > 0) && (strpeek.ctlbuf.len >= (int)sizeof (t_scalar_t)))) {
+            ((retval > 0) && (strpeek.ctlbuf.len >=
+            (int)sizeof (t_scalar_t)))) {
                 /* LINTED pointer cast */
                 pptr = (union T_primitives *)strpeek.ctlbuf.buf;
                 if (tiptr->ti_lookcnt > 0) {
                         /* LINTED pointer cast */
                         type = *((t_scalar_t *)tiptr->ti_lookbufs.tl_lookcbuf);