aboutsummaryrefslogtreecommitdiffstats
path: root/disabled_protos.c
diff options
context:
space:
mode:
Diffstat (limited to 'disabled_protos.c')
-rw-r--r--disabled_protos.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/disabled_protos.c b/disabled_protos.c
index bd1679ff26..701ac21ad0 100644
--- a/disabled_protos.c
+++ b/disabled_protos.c
@@ -41,7 +41,7 @@
#include <epan/proto.h>
#include "disabled_protos.h"
-#include "file_util.h"
+#include <wsutil/file_util.h>
#define GLOBAL_PROTOCOLS_FILE_NAME "disabled_protos"
#define PROTOCOLS_FILE_NAME "disabled_protos"
@@ -104,7 +104,7 @@ read_disabled_protos_list(char **gpath_return, int *gopen_errno_return,
/* Read the global disabled protocols file, if it exists. */
*gpath_return = NULL;
- if ((ff = eth_fopen(gff_path, "r")) != NULL) {
+ if ((ff = ws_fopen(gff_path, "r")) != NULL) {
/* We succeeded in opening it; read it. */
err = read_disabled_protos_list_file(gff_path, ff,
&global_disabled_protos);
@@ -137,7 +137,7 @@ read_disabled_protos_list(char **gpath_return, int *gopen_errno_return,
/* Read the user's disabled protocols file, if it exists. */
*path_return = NULL;
- if ((ff = eth_fopen(ff_path, "r")) != NULL) {
+ if ((ff = ws_fopen(ff_path, "r")) != NULL) {
/* We succeeded in opening it; read it. */
err = read_disabled_protos_list_file(ff_path, ff, &disabled_protos);
if (err != 0) {
@@ -345,7 +345,7 @@ save_disabled_protos_list(char **pref_path_return, int *errno_return)
completely. */
ff_path_new = g_strdup_printf("%s.new", ff_path);
- if ((ff = eth_fopen(ff_path_new, "w")) == NULL) {
+ if ((ff = ws_fopen(ff_path_new, "w")) == NULL) {
*pref_path_return = ff_path;
*errno_return = errno;
g_free(ff_path_new);
@@ -373,7 +373,7 @@ save_disabled_protos_list(char **pref_path_return, int *errno_return)
if (fclose(ff) == EOF) {
*pref_path_return = ff_path;
*errno_return = errno;
- eth_unlink(ff_path_new);
+ ws_unlink(ff_path_new);
g_free(ff_path_new);
return;
}
@@ -383,22 +383,22 @@ save_disabled_protos_list(char **pref_path_return, int *errno_return)
exists; the Win32 call to rename files doesn't do so, which I
infer is the reason why the MSVC++ "rename()" doesn't do so.
We must therefore remove the target file first, on Windows. */
- if (eth_remove(ff_path) < 0 && errno != ENOENT) {
+ if (ws_remove(ff_path) < 0 && errno != ENOENT) {
/* It failed for some reason other than "it's not there"; if
it's not there, we don't need to remove it, so we just
drive on. */
*pref_path_return = ff_path;
*errno_return = errno;
- eth_unlink(ff_path_new);
+ ws_unlink(ff_path_new);
g_free(ff_path_new);
return;
}
#endif
- if (eth_rename(ff_path_new, ff_path) < 0) {
+ if (ws_rename(ff_path_new, ff_path) < 0) {
*pref_path_return = ff_path;
*errno_return = errno;
- eth_unlink(ff_path_new);
+ ws_unlink(ff_path_new);
g_free(ff_path_new);
return;
}