diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-07-20 09:39:43 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-07-20 09:39:43 +0000 |
commit | e068b7dbe719dba81ffd938134e494d02a64f2f6 (patch) | |
tree | 0a455b264bf02f9e295ae892f3f1df390f06990e /file.c | |
parent | 024c2d72fe53c1f41bd0257b835e08f9eeffe7b6 (diff) |
In Tethereal:
When capturing, report errors trying to create the output file
with "file_open_error_message()".
Make the "for_writing" argument to "file_open_error_message()" a
"gboolean", as it's either TRUE (if the file is being opened for
writing) or FALSE (if it's being opened for reading).
Report EISDIR as "XXX is a directory (folder), not a file.".
When checking whether an "open()" of a capture file succeeded, check
whether "open()" returns a negative number, not whether it returns 0.
In "wtap_open_offline()", if the file to be opened is a directory,
return EISDIR, not WTAP_ERR_NOT_REGULAR_FILE, so that the error message
can say "that's a directory, not a file".
If "wtap_open_offline()" returns WTAP_ERR_NOT_REGULAR_FILE, don't just
say the file is "invalid", say it's a "special file" or socket or some
other weird type of file.
svn path=/trunk/; revision=2144
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,7 +1,7 @@ /* file.c * File I/O routines * - * $Id: file.c,v 1.199 2000/07/20 05:09:45 guy Exp $ + * $Id: file.c,v 1.200 2000/07/20 09:39:19 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -1819,7 +1819,7 @@ file_open_error_message(int err, gboolean for_writing) switch (err) { case WTAP_ERR_NOT_REGULAR_FILE: - errmsg = "The file \"%s\" is invalid."; + errmsg = "The file \"%s\" is a \"special file\" or socket or other non-regular file."; break; case WTAP_ERR_FILE_UNKNOWN_FORMAT: |