packages: xsensors/xsensors-select-chip.patch (NEW)=?UTF-8?Q?=20?=- new from debian - Let...

blekot blekot at pld-linux.org
Sun May 27 22:32:29 CEST 2012


Author: blekot                       Date: Sun May 27 20:32:29 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- new from debian
- Let the user specify a specific chip to display.

---- Files affected:
packages/xsensors:
   xsensors-select-chip.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/xsensors/xsensors-select-chip.patch
diff -u /dev/null packages/xsensors/xsensors-select-chip.patch:1.1
--- /dev/null	Sun May 27 22:32:29 2012
+++ packages/xsensors/xsensors-select-chip.patch	Sun May 27 22:32:24 2012
@@ -0,0 +1,30 @@
+--- a/src/gui.c
++++ b/src/gui.c
+@@ -437,7 +437,8 @@
+     updates *head = NULL;
+ 
+     int chipnum = 0;
+-    const sensors_chip_name *name = NULL;
++    const sensors_chip_name *name = NULL, *pquery = NULL;
++    sensors_chip_name query;
+ 
+     gtk_init( &argc, &argv );
+ 
+@@ -502,7 +503,16 @@
+ 
+     gtk_container_add( GTK_CONTAINER (mainwindow), notebook );
+ 
+-    while ( ( name = sensors_get_detected_chips( NULL, &chipnum ) ) != NULL ) {
++    if ( argc >= 2 ) {
++        if ( sensors_parse_chip_name( argv[1], &query ) ) {
++            fprintf( stderr,
++                    "Couldn't parse chip name!  Exiting!\n" );
++            exit( 1 );
++        }
++        pquery = &query;
++    }
++
++    while ( ( name = sensors_get_detected_chips( pquery, &chipnum ) ) != NULL ) {
+         if ( 1 ) {
+ #ifdef DEBUG_XSENSORS
+             printf( "Adding tab for %s\n", name->prefix );
================================================================


More information about the pld-cvs-commit mailing list