Print this page
3910 t_look(3NSL) should never return T_ERROR
@@ -17,10 +17,11 @@
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
+ * Copyright 2014 Gary Mills
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
@@ -34,12 +35,10 @@
* University Acknowledgment- Portions of this document are derived from
* software developed by the University of California, Berkeley, and its
* contributors.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Kernel TLI-like function to read a datagram off of a
* transport endpoints stream head.
*
* Returns:
@@ -47,11 +46,10 @@
* On sucess, type is set to:
* T_DATA If normal data has been received
* T_UDERR If an error indication has been received,
* in which case uderr contains the unitdata
* error number.
- * T_ERROR
*/
#include <sys/param.h>
#include <sys/types.h>
#include <sys/user.h>
@@ -292,18 +290,18 @@
break;
case M_FLUSH:
KTLILOG(1, "t_krcvudata: tli_recv returned M_FLUSH\n", 0);
freemsg(bp);
- *type = T_ERROR;
+ error = EBADMSG;
break;
default:
KTLILOG(1, "t_krcvudata: unknown message type %x\n",
bp->b_datap->db_type);
freemsg(bp);
- *type = T_ERROR;
+ error = EBADMSG;
break;
}
return (error);
}