forked from osmocom/wireshark
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:
parent
fd3f0f3196
commit
3bdc71b56b
|
@ -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 ] */
|
||||
|
|
34
gtk/u3.c
34
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;
|
||||
|
|
Loading…
Reference in New Issue