aboutsummaryrefslogtreecommitdiffstats
path: root/fileset.c
diff options
context:
space:
mode:
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2008-05-22 15:46:27 +0000
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2008-05-22 15:46:27 +0000
commit440ebe03d7ad360327a5752cd79879956f6aea8d (patch)
tree65a7d5c702bf3392494b33ddd7ed43c94e491670 /fileset.c
parent04d3d6b976e89f301cb6b79c3fd81d823d6a32c7 (diff)
Move the file utility functions from wiretap to libwsutil so that
libwireshark (and the plugins using those functions) do not depend on wiretap on Windows. While doing that, rename the eth_* functions to ws_*. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25354 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'fileset.c')
-rw-r--r--fileset.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/fileset.c b/fileset.c
index 5405bd6c00..f673b640a4 100644
--- a/fileset.c
+++ b/fileset.c
@@ -51,7 +51,7 @@
#include <glib.h>
-#include <wiretap/file_util.h>
+#include <wsutil/file_util.h>
#include "globals.h"
#include <epan/filesystem.h>
@@ -77,7 +77,7 @@ fileset_filename_match_pattern(const char *fname)
int baselen;
int minlen = strlen("_00001_20050418010750");
char *filename;
-
+
/* d:\dir1\test_00001_20050418010750.cap */
filename = g_strdup(get_basename(fname));
@@ -183,7 +183,7 @@ fileset_add_file(const char *dirname, const char *fname, gboolean current)
path = g_strdup_printf("%s%s", dirname, fname);
- fh = eth_open( path, O_RDONLY, 0000 /* no creation so don't matter */);
+ fh = ws_open( path, O_RDONLY, 0000 /* no creation so don't matter */);
if(fh != -1) {
/* Get statistics */
@@ -203,7 +203,7 @@ fileset_add_file(const char *dirname, const char *fname, gboolean current)
set.entries = g_list_append(set.entries, entry);
}
- eth_close(fh);
+ ws_close(fh);
}
g_free(path);
@@ -255,22 +255,22 @@ fileset_add_dir(const char *fname)
dirname = g_string_new(fname_dup);
g_free(fname_dup);
- set.dirname = g_strdup(dirname->str);
-
+ set.dirname = g_strdup(dirname->str);
+
dirname = g_string_append_c(dirname, G_DIR_SEPARATOR);
/* is the current file probably a part of any fileset? */
if(fileset_filename_match_pattern(fname)) {
/* yes, go through the files in the directory and check if the file in question is part of the current file set */
- if ((dir = eth_dir_open(dirname->str, 0, NULL)) != NULL) {
- while ((file = eth_dir_read_name(dir)) != NULL) {
- name = eth_dir_get_name(file);
+ if ((dir = ws_dir_open(dirname->str, 0, NULL)) != NULL) {
+ while ((file = ws_dir_read_name(dir)) != NULL) {
+ name = ws_dir_get_name(file);
if(fileset_filename_match_pattern(name) && fileset_is_file_in_set(name, get_basename(fname))) {
fileset_add_file(dirname->str, name, strcmp(name, get_basename(fname))== 0 /* current */);
}
} /* while */
- eth_dir_close(dir);
+ ws_dir_close(dir);
} /* if */
} else {
/* no, this is a "standalone file", just add this one */