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