"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "main.c" between
usbview-2.1.tar.gz and usbview-2.2.tar.gz

About: USBView displays information and topography of the devices that are plugged into the USB bus (requires GTK).

main.c  (usbview-2.1):main.c  (usbview-2.2)
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/* /*
* main.c for USBView - a USB device viewer * main.c for USBView - a USB device viewer
* Copyright (c) 1999, 2000 by Greg Kroah-Hartman, <greg@kroah.com> * Copyright (c) 1999, 2000 by Greg Kroah-Hartman, <greg@kroah.com>
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
#endif #endif
#include <stdlib.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "usbtree.h" #include "usbtree.h"
int main (int argc, char *argv[]) int main (int argc, char *argv[])
{ {
GtkWidget *window1; GtkWidget *window1;
gboolean is_pkexec = getenv("PKEXEC_UID") != NULL;
gtk_init (&argc, &argv); // only evalute command line parameters if not running in pkexec
// privilege escalation context to avoid potential attack vectors
gtk_init (is_pkexec ? NULL : &argc, is_pkexec ? NULL : &argv);
initialize_stuff(); initialize_stuff();
/* /*
* The following code was added by Glade to create one of each component * The following code was added by Glade to create one of each component
* (except popup menus), just so that you see something after building * (except popup menus), just so that you see something after building
* the project. Delete any components that you don't want shown initially . * the project. Delete any components that you don't want shown initially .
*/ */
window1 = create_windowMain (); window1 = create_windowMain ();
gtk_widget_show (window1); gtk_widget_show (window1);
 End of changes. 3 change blocks. 
1 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)