Augment get_gui_runtime_info() with additional information about the U3 device Wireshark is being run from.

svn path=/trunk/; revision=20711
This commit is contained in:
Graeme Lunt 2007-02-04 12:39:07 +00:00
parent fd3f0f3196
commit 3bdc71b56b
3 changed files with 42 additions and 0 deletions

View File

@ -2062,6 +2062,12 @@ get_gui_runtime_info(GString *str
g_string_append(str, ", ");
get_runtime_airpcap_version(str);
#endif
if(u3_active()) {
g_string_append(str, ", ");
u3_runtime_info(str);
}
}
/* And now our feature presentation... [ fade to music ] */

View File

@ -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;

View File

@ -24,6 +24,8 @@
gboolean u3_active();
void u3_runtime_info(GString *str);
void u3_register_pid(void);
void u3_deregister_pid(void);