diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2017-06-22 09:58:14 -0400 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2017-06-22 15:43:57 +0000 |
commit | 8ddc581336b64f783cf4e5e7ca8ffa37605c8576 (patch) | |
tree | f28c78575cd9f4771fae8140aca049434b83277a | |
parent | a4694da19f8e58ee6f5a51e2b59645b38fbdce1a (diff) | |
download | wireshark-8ddc581336b64f783cf4e5e7ca8ffa37605c8576.tar.gz |
wsutil: Back out profile_write_info_file
Change-Id: I9253a4295aecb23ec5e87d0453249955ca1ea18a
Reviewed-on: https://code.wireshark.org/review/22347
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
-rw-r--r-- | wireshark-qt.cpp | 1 | ||||
-rw-r--r-- | wsutil/filesystem.c | 34 | ||||
-rw-r--r-- | wsutil/filesystem.h | 5 |
3 files changed, 0 insertions, 40 deletions
diff --git a/wireshark-qt.cpp b/wireshark-qt.cpp index 45cf6a80fb..7e4d597c7a 100644 --- a/wireshark-qt.cpp +++ b/wireshark-qt.cpp @@ -915,7 +915,6 @@ int main(int argc, char *qt_argv[]) g_free(get_persconffile_path("io_graphs", TRUE)); profile_store_persconffiles(FALSE); - profile_write_info_file(); ret_val = wsApp->exec(); diff --git a/wsutil/filesystem.c b/wsutil/filesystem.c index 28f68eac33..4d28db0dc7 100644 --- a/wsutil/filesystem.c +++ b/wsutil/filesystem.c @@ -1238,40 +1238,6 @@ profile_store_persconffiles(gboolean store) do_store_persconffiles = store; } -static gint -compare_filename(gconstpointer dissector_a, gconstpointer dissector_b) -{ - return strcmp((const char*)dissector_a, (const char*)dissector_b); -} - -void -profile_write_info_file(void) -{ - gchar *profile_dir, *info_file, *filename; - GList *files, *file; - ssize_t nwritten = 0; - int fd; - - profile_dir = get_profiles_dir(); - info_file = g_strdup_printf("%s%s%s", profile_dir, G_DIR_SEPARATOR_S, PROFILES_INFO_NAME); - fd = ws_open(info_file, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644); - - files = g_hash_table_get_keys(profile_files); - files = g_list_sort(files, compare_filename); - file = g_list_first(files); - while (file) { - filename = (gchar *)file->data; - nwritten += ws_write(fd, filename, (unsigned int)strlen(filename)); - nwritten += ws_write(fd, "\n", 1); - file = g_list_next(file); - } - g_list_free(files); - - ws_close(fd); - g_free(info_file); - g_free(profile_dir); -} - /* * Get the directory in which personal configuration files reside. * diff --git a/wsutil/filesystem.h b/wsutil/filesystem.h index 8b2d9faf54..f09e5ccaea 100644 --- a/wsutil/filesystem.h +++ b/wsutil/filesystem.h @@ -143,11 +143,6 @@ WS_DLL_PUBLIC char *get_global_profiles_dir(void); WS_DLL_PUBLIC void profile_store_persconffiles(gboolean store); /* - * Store a list of all personal config files which belongs in a profile. - */ -WS_DLL_PUBLIC void profile_write_info_file(void); - -/* * Check if given configuration profile exists. */ WS_DLL_PUBLIC gboolean profile_exists(const gchar *profilename, gboolean global); |