xref: /onnv-gate/usr/src/lib/gss_mechs/mech_krb5/et/pty_err.c (revision 0:68f95e015346)
1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * Copyright 1998-2002 Sun Microsystems, Inc.  All rights reserved.
3*0Sstevel@tonic-gate  * Use is subject to license terms.
4*0Sstevel@tonic-gate  */
5*0Sstevel@tonic-gate 
6*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
7*0Sstevel@tonic-gate 
8*0Sstevel@tonic-gate #include <locale.h>
9*0Sstevel@tonic-gate const char *
pty_error_table(long errorno)10*0Sstevel@tonic-gate pty_error_table(long errorno) {
11*0Sstevel@tonic-gate 
12*0Sstevel@tonic-gate switch (errorno) {
13*0Sstevel@tonic-gate 	case 0:
14*0Sstevel@tonic-gate 		return(dgettext(TEXT_DOMAIN,
15*0Sstevel@tonic-gate 			"Failed to unlock or grant streams pty."));
16*0Sstevel@tonic-gate 	case 1:
17*0Sstevel@tonic-gate 		return(dgettext(TEXT_DOMAIN,
18*0Sstevel@tonic-gate 			"fstat of master pty failed"));
19*0Sstevel@tonic-gate 	case 2:
20*0Sstevel@tonic-gate 		return(dgettext(TEXT_DOMAIN,
21*0Sstevel@tonic-gate 			"All terminal ports in use"));
22*0Sstevel@tonic-gate 	case 3:
23*0Sstevel@tonic-gate 		return(dgettext(TEXT_DOMAIN,
24*0Sstevel@tonic-gate 			"buffer to hold slave pty name is too short"));
25*0Sstevel@tonic-gate 	case 4:
26*0Sstevel@tonic-gate 		return(dgettext(TEXT_DOMAIN,
27*0Sstevel@tonic-gate 			"Failed to open slave side of pty"));
28*0Sstevel@tonic-gate 	case 5:
29*0Sstevel@tonic-gate 		return(dgettext(TEXT_DOMAIN,
30*0Sstevel@tonic-gate 			"Failed to chmod slave side of pty"));
31*0Sstevel@tonic-gate 	case 6:
32*0Sstevel@tonic-gate 		return(dgettext(TEXT_DOMAIN,
33*0Sstevel@tonic-gate 			"Unable to set controlling terminal"));
34*0Sstevel@tonic-gate 	case 7:
35*0Sstevel@tonic-gate 		return(dgettext(TEXT_DOMAIN,
36*0Sstevel@tonic-gate 			"Failed to chown slave side of pty"));
37*0Sstevel@tonic-gate 	case 8:
38*0Sstevel@tonic-gate 		return(dgettext(TEXT_DOMAIN,
39*0Sstevel@tonic-gate 			"Call to line_push failed to push streams on slave pty"));
40*0Sstevel@tonic-gate 	case 9:
41*0Sstevel@tonic-gate 		return(dgettext(TEXT_DOMAIN,
42*0Sstevel@tonic-gate 			"Failed to push stream on slave side of pty"));
43*0Sstevel@tonic-gate 	case 10:
44*0Sstevel@tonic-gate 		return(dgettext(TEXT_DOMAIN,
45*0Sstevel@tonic-gate 			"Failed to revoke slave side of pty"));
46*0Sstevel@tonic-gate 	case 11:
47*0Sstevel@tonic-gate 		return(dgettext(TEXT_DOMAIN,
48*0Sstevel@tonic-gate 			"bad process type passed to pty_update_utmp"));
49*0Sstevel@tonic-gate 	case 12:
50*0Sstevel@tonic-gate 		return(dgettext(TEXT_DOMAIN,
51*0Sstevel@tonic-gate 			"Slave pty name is zero-length"));
52*0Sstevel@tonic-gate 	default:
53*0Sstevel@tonic-gate 		return("unknown error");
54*0Sstevel@tonic-gate 	}
55*0Sstevel@tonic-gate }
56