diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-04-17 18:58:55 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-04-18 01:59:32 +0000 |
commit | e34d76942c15f9d9e83d078aca950a29452d0b60 (patch) | |
tree | 06e994ab1593a5d28f3e7d14c5eff4859d4fba31 /ui/alert_box.h | |
parent | 4ce54674b3c8d3782a744718646ddd0104b45e68 (diff) | |
download | wireshark-e34d76942c15f9d9e83d078aca950a29452d0b60.tar.gz wireshark-e34d76942c15f9d9e83d078aca950a29452d0b60.tar.bz2 wireshark-e34d76942c15f9d9e83d078aca950a29452d0b60.zip |
Have a commont "capture file open alert box" routine.
Take cf_open_failure_alert_box() and put it into libui, with the name
cfile_open_failure_alert_box(). Use it not only in file.c but also in
ui/export_pdu_ui_utils.c, where the error we get back isn't necessarily
an errno.
Change-Id: Ia053f3e403ba464d446bd9530778d5ed302796d2
Reviewed-on: https://code.wireshark.org/review/21174
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/alert_box.h')
-rw-r--r-- | ui/alert_box.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ui/alert_box.h b/ui/alert_box.h index 9e8c6a64f6..9e19234e20 100644 --- a/ui/alert_box.h +++ b/ui/alert_box.h @@ -40,6 +40,19 @@ extern void vfailure_alert_box(const char *msg_format, va_list ap); extern void vwarning_alert_box(const char *msg_format, va_list ap); /* + * Alert box for a failed attempt to open or create a capture file. + * "err" is assumed to be a UNIX-style errno or a WTAP_ERR_ value; + * "err_info" is assumed to be a string giving further information for + * some WTAP_ERR_ values; "for_writing" is TRUE if the file is being + * opened for writing and FALSE if it's being opened for reading; + * "file_type" is a WTAP_FILE_TYPE_SUBTYPE_ value for the type of + * file being written (it's ignored for opening-for-reading errors). + */ +extern void cfile_open_failure_alert_box(const char *filename, int err, + gchar *err_info, gboolean for_writing, + int file_type); + +/* * Alert box for a failed attempt to open or create a file. * "err" is assumed to be a UNIX-style errno; "for_writing" is TRUE if * the file is being opened for writing and FALSE if it's being opened |