aboutsummaryrefslogtreecommitdiffstats
path: root/fileset.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2008-05-22 15:46:27 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2008-05-22 15:46:27 +0000
commita5cee04fad8ca23a2f3a3ac5b5233ca6b01fe71e (patch)
tree65a7d5c702bf3392494b33ddd7ed43c94e491670 /fileset.c
parentda2f447a9bda3a05dd8e61b1c1f5dea4b5912f6b (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_*. svn path=/trunk/; revision=25354
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 */