aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/u3.c
diff options
context:
space:
mode:
authorgal <gal@f5534014-38df-0310-8fa8-9805f1628bb7>2007-02-04 12:39:07 +0000
committergal <gal@f5534014-38df-0310-8fa8-9805f1628bb7>2007-02-04 12:39:07 +0000
commit2ef2efcf7d92b6acb84e7aa189e6080c967df6a2 (patch)
tree00082bc8bf864d0ca3264f8f40aa629335d48885 /gtk/u3.c
parent8bad67631daef1c1bec327af8b7c3e8e35ea6832 (diff)
Augment get_gui_runtime_info() with additional information about the U3 device Wireshark is being run from.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20711 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'gtk/u3.c')
-rw-r--r--gtk/u3.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/gtk/u3.c b/gtk/u3.c
index e10a320480..16633a0b12 100644
--- a/gtk/u3.c
+++ b/gtk/u3.c
@@ -72,6 +72,40 @@ gboolean u3_active()
}
+void u3_runtime_info(GString *str)
+{
+
+ char *u3devicepath = NULL;
+ char *u3deviceproduct = NULL;
+
+ if((u3deviceproduct =
+#ifdef _WIN32
+ getenv_utf8
+#else
+ getenv
+#endif
+ ("U3_DEVICE_PRODUCT")) != NULL) {
+ g_string_append(str, " from the ");
+ g_string_append(str, u3deviceproduct);
+ } else {
+ g_string_append(str, " from a ");
+ }
+
+ g_string_append(str, " U3 device");
+
+ if((u3devicepath =
+#ifdef _WIN32
+ getenv_utf8
+#else
+ getenv
+#endif
+ ("U3_DEVICE_PATH")) != NULL) {
+ g_string_append(str, " in drive ");
+ g_string_append(str, u3devicepath);
+ }
+
+}
+
void u3_register_pid()
{
int pid;