Browse Source

Change ENODATA to ENOENT. BSD portability

git-svn-id: https://klish.googlecode.com/svn/trunk@439 0eaa4687-2ee9-07dd-09d9-bcdd2d2dd5fb
Serj Kalichev 13 years ago
parent
commit
99bc7b0532
2 changed files with 3 additions and 3 deletions
  1. 1 1
      clish/shell/shell_tinyrl.c
  2. 2 2
      tinyrl/tinyrl.c

+ 1 - 1
clish/shell/shell_tinyrl.c

@@ -421,7 +421,7 @@ bool_t clish_shell_execline(clish_shell_t *this, const char *line, char **out)
 	lub_string_free(prompt);
 	if (!str) {
 		switch (lerror) {
-		case ENODATA:
+		case ENOENT:
 			this->state = SHELL_STATE_EOF;
 			break;
 		case EBADMSG:

+ 2 - 2
tinyrl/tinyrl.c

@@ -726,7 +726,7 @@ static char *internal_readline(tinyrl_t * this,
 				/* time to finish the session */
 				this->done = BOOL_TRUE;
 				this->line = NULL;
-				lerrno = ENODATA;
+				lerrno = ENOENT;
 			}
 		}
 		/* restores the terminal mode */
@@ -754,7 +754,7 @@ static char *internal_readline(tinyrl_t * this,
 				/* time to finish the session */
 				crlf = 0;
 				this->line = NULL;
-				lerrno = ENODATA;
+				lerrno = ENOENT;
 			}
 		}