Hello community, here is the log from the commit of package hwinfo checked in at Fri May 4 00:23:56 CEST 2007. -------- --- hwinfo/hwinfo.changes 2007-04-12 11:54:23.000000000 +0200 +++ /mounts/work_src_done/STABLE/hwinfo/hwinfo.changes 2007-05-03 18:40:56.000000000 +0200 @@ -1,0 +2,11 @@ +Thu May 3 18:40:48 CEST 2007 - snwint@suse.de + +- braille detection can no longer block libhd (#266163) +- get network interface link state from sysfs + +------------------------------------------------------------------- +Thu May 3 18:05:52 CEST 2007 - prusnak@suse.cz + +- changed expat to libexpat-devel in Requires of devel subpackage + +------------------------------------------------------------------- Old: ---- hwinfo-13.32.tar.bz2 New: ---- hwinfo-13.33.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hwinfo.spec ++++++ --- /var/tmp/diff_new_pack.Q17084/_old 2007-05-04 00:23:30.000000000 +0200 +++ /var/tmp/diff_new_pack.Q17084/_new 2007-05-04 00:23:30.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package hwinfo (Version 13.32) +# spec file for package hwinfo (Version 13.33) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -20,9 +20,9 @@ PreReq: /sbin/ldconfig %insserv_prereq %fillup_prereq Autoreqprov: on Summary: Hardware Library -Version: 13.32 +Version: 13.33 Release: 1 -Source: hwinfo-13.32.tar.bz2 +Source: hwinfo-13.33.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -36,7 +36,7 @@ Group: Development/Libraries/C and C++ Provides: libhddev Obsoletes: libhddev -Requires: %name = %version expat perl-XML-Writer perl-XML-Parser udev wireless-tools +Requires: %name = %version libexpat-devel perl-XML-Writer perl-XML-Parser udev wireless-tools %description devel This library collects information about the hardware installed on a @@ -89,6 +89,11 @@ %doc doc/libhd/html %changelog +* Thu May 03 2007 - snwint@suse.de +- braille detection can no longer block libhd (#266163) +- get network interface link state from sysfs +* Thu May 03 2007 - prusnak@suse.cz +- changed expat to libexpat-devel in Requires of devel subpackage * Thu Apr 12 2007 - snwint@suse.de - resolving symlinks in sysfs did not work properly - updated X11 data ++++++ hwinfo-13.32.tar.bz2 -> hwinfo-13.33.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-13.32/Changelog new/hwinfo-13.33/Changelog --- old/hwinfo-13.32/Changelog 2007-04-12 11:52:51.000000000 +0200 +++ new/hwinfo-13.33/Changelog 2007-05-03 18:40:12.000000000 +0200 @@ -1,3 +1,7 @@ +3/5/2007: v13.33 + - braille detection can no longer block libhd (#266163) + - get network interface link state from sysfs + 12/4/2007: v13.32 - resolving symlinks in sysfs did not work properly - updated X11 data diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-13.32/src/hd/braille.c new/hwinfo-13.33/src/hd/braille.c --- old/hwinfo-13.32/src/hd/braille.c 2006-08-29 16:15:38.000000000 +0200 +++ new/hwinfo-13.33/src/hd/braille.c 2007-04-20 15:35:50.000000000 +0200 @@ -28,7 +28,7 @@ { hd_t *hd, *hd_tmp; int cnt = 0; - unsigned dev, vend; + unsigned *dev, *vend; if(!hd_probe_feature(hd_data, pr_braille)) return; @@ -37,6 +37,11 @@ /* some clean-up */ remove_hd_entries(hd_data); + dev = hd_shm_add(hd_data, NULL, sizeof *dev); + vend = hd_shm_add(hd_data, NULL, sizeof *vend); + + if(!dev || !vend) return; + for(hd = hd_data->hd; hd; hd = hd->next) { if( hd->base_class.id == bc_comm && @@ -46,47 +51,57 @@ !has_something_attached(hd_data, hd) ) { cnt++; - dev = vend = 0; + *dev = *vend = 0; - if(hd_probe_feature(hd_data, pr_braille_alva)) { - PROGRESS(1, cnt, "alva"); - vend = MAKE_ID(TAG_SPECIAL, 0x5001); - dev = do_alva(hd_data, hd->unix_dev_name, cnt); - } + hd_fork(hd_data, 10, 10); + + if(hd_data->flags.forked) { - if(!dev && hd_probe_feature(hd_data, pr_braille_fhp)) { - PROGRESS(1, cnt, "fhp_old"); - vend = MAKE_ID(TAG_SPECIAL, 0x5002); - dev = do_fhp(hd_data, hd->unix_dev_name, B19200, cnt); - if(!dev) { - PROGRESS(1, cnt, "fhp_el"); - dev = do_fhp(hd_data, hd->unix_dev_name, B38400, cnt); + if(hd_probe_feature(hd_data, pr_braille_alva)) { + PROGRESS(1, cnt, "alva"); + *vend = MAKE_ID(TAG_SPECIAL, 0x5001); + *dev = do_alva(hd_data, hd->unix_dev_name, cnt); } - } - if(!dev && hd_probe_feature(hd_data, pr_braille_ht)) { - PROGRESS(1, cnt, "ht"); - vend = MAKE_ID(TAG_SPECIAL, 0x5003); - dev = do_ht(hd_data, hd->unix_dev_name, cnt); - } + if(!*dev && hd_probe_feature(hd_data, pr_braille_fhp)) { + PROGRESS(1, cnt, "fhp_old"); + *vend = MAKE_ID(TAG_SPECIAL, 0x5002); + *dev = do_fhp(hd_data, hd->unix_dev_name, B19200, cnt); + if(!dev) { + PROGRESS(1, cnt, "fhp_el"); + *dev = do_fhp(hd_data, hd->unix_dev_name, B38400, cnt); + } + } + + if(!*dev && hd_probe_feature(hd_data, pr_braille_ht)) { + PROGRESS(1, cnt, "ht"); + *vend = MAKE_ID(TAG_SPECIAL, 0x5003); + *dev = do_ht(hd_data, hd->unix_dev_name, cnt); + } + + if(!*dev && hd_probe_feature(hd_data, pr_braille_baum)) { + PROGRESS(1, cnt, "baum"); + *vend = MAKE_ID(TAG_SPECIAL, 0x5004); + *dev = do_baum(hd_data, hd->unix_dev_name, cnt); + } - if(!dev && hd_probe_feature(hd_data, pr_braille_baum)) { - PROGRESS(1, cnt, "baum"); - vend = MAKE_ID(TAG_SPECIAL, 0x5004); - dev = do_baum(hd_data, hd->unix_dev_name, cnt); } - if(dev) { + hd_fork_done(hd_data); + + if(*dev && *vend) { hd_tmp = add_hd_entry(hd_data, __LINE__, 0); hd_tmp->base_class.id = bc_braille; hd_tmp->bus.id = bus_serial; hd_tmp->unix_dev_name = new_str(hd->unix_dev_name); hd_tmp->attached_to = hd->idx; - hd_tmp->vendor.id = vend; - hd_tmp->device.id = dev; + hd_tmp->vendor.id = *vend; + hd_tmp->device.id = *dev; } } } + + hd_shm_clean(hd_data); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-13.32/src/hd/hd.c new/hwinfo-13.33/src/hd/hd.c --- old/hwinfo-13.32/src/hd/hd.c 2007-04-12 11:50:50.000000000 +0200 +++ new/hwinfo-13.33/src/hd/hd.c 2007-04-20 15:35:53.000000000 +0200 @@ -175,7 +175,9 @@ static void short_vendor(char *vendor); static void create_model_name(hd_data_t *hd_data, hd_t *hd); +static void copy_log2shm(hd_data_t *hd_data); static void sigchld_handler(int); +static void sigusr1_handler(int); static pid_t child_id; static volatile pid_t child; static char *hd_shm_add_str(hd_data_t *hd_data, char *str); @@ -184,6 +186,7 @@ static hd_udevinfo_t *hd_free_udevinfo(hd_udevinfo_t *ui); static hd_sysfsdrv_t *hd_free_sysfsdrv(hd_sysfsdrv_t *sf); +static hd_data_t *hd_data_sig; /* * Names of the probing modules. @@ -5263,6 +5266,7 @@ time_t stop_time; int updated, rem_time; sigset_t new_set, old_set; + int kill_sig[] = { SIGUSR1, SIGKILL }; if(hd_data->flags.forked) return; @@ -5316,12 +5320,14 @@ } if(child_id != child) { - ADD2LOG("****** killed child process %d (%ds) ******\n", (int) child, rem_time); - kill(child, SIGKILL); - for(i = 10; i && !waitpid(child, NULL, WNOHANG); i--) { - wait_time.tv_sec = 0; - wait_time.tv_nsec = 10*1000000; - nanosleep(&wait_time, NULL); + ADD2LOG("****** killed child process %d (%ds) ******\n", (int) child, rem_time); + for(i = 0; i < sizeof kill_sig / sizeof *kill_sig; i++) { + kill(child, kill_sig[i]); + for(j = 10; j && !waitpid(child, NULL, WNOHANG); j--) { + wait_time.tv_sec = 0; + wait_time.tv_nsec = 10*1000000; + nanosleep(&wait_time, NULL); + } } } @@ -5344,6 +5350,10 @@ hd_data->log = free_mem(hd_data->log); hd_data->flags.forked = 1; + + hd_data_sig = hd_data; + + signal(SIGUSR1, sigusr1_handler); } } @@ -5356,12 +5366,23 @@ */ void hd_fork_done(hd_data_t *hd_data) { + if(!hd_data->flags.forked || hd_data->flags.nofork) return; + + copy_log2shm(hd_data); + + _exit(0); +} + + +/* + * Copy log to shm segment. + */ +void copy_log2shm(hd_data_t *hd_data) +{ int len; void *p; hd_data_t *hd_data_shm; - if(!hd_data->flags.forked || hd_data->flags.nofork) return; - hd_data_shm = hd_data->shm.data; if(hd_data->log) { @@ -5369,8 +5390,6 @@ p = hd_shm_add(hd_data, hd_data->log, len); hd_data_shm->log = p; } - - _exit(0); } @@ -5386,6 +5405,21 @@ /* + * SIGUSR1 handler - copy log to shm, then exit + */ +void sigusr1_handler(int num) +{ + hd_data_t *hd_data = hd_data_sig; + + ADD2LOG("* got signal USR1 *\n"); + + copy_log2shm(hd_data); + + _exit(0); +} + + +/* * Get a sufficiently large shm segment. */ void hd_shm_init(hd_data_t *hd_data) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-13.32/src/hd/net.c new/hwinfo-13.33/src/hd/net.c --- old/hwinfo-13.32/src/hd/net.c 2007-03-28 14:07:24.000000000 +0200 +++ new/hwinfo-13.33/src/hd/net.c 2007-05-02 16:32:45.000000000 +0200 @@ -49,10 +49,10 @@ void hd_scan_net(hd_data_t *hd_data) { unsigned u; - int if_type; + int if_type, if_carrier; hd_t *hd, *hd_card; char *s, *hw_addr; - hd_res_t *res, *res1; + hd_res_t *res, *res1, *res2; uint64_t ul0; str_list_t *sf_class, *sf_class_e; char *sf_cdev = NULL, *sf_dev = NULL; @@ -93,6 +93,12 @@ ADD2LOG(" type = %d\n", if_type); } + if_carrier = -1; + if(hd_attr_uint(get_sysfs_attr_by_path(sf_cdev, "carrier"), &ul0, 0)) { + if_carrier = ul0; + ADD2LOG(" carrier = %d\n", if_carrier); + } + hw_addr = NULL; if((s = get_sysfs_attr_by_path(sf_cdev, "address"))) { hw_addr = canon_str(s, strlen(s)); @@ -128,6 +134,14 @@ add_res_entry(&hd->res, res1); } + res2 = NULL; + if(if_carrier >= 0) { + res = new_mem(sizeof *res); + res->link.type = res_link; + res->link.state = if_carrier ? 1 : 0; + add_res_entry(&hd->res, res); + } + hd->unix_dev_name = new_str(sf_class_e->str); hd->sysfs_id = new_str(hd_sysfs_id(sf_cdev)); @@ -329,7 +343,11 @@ hd->module == hd_data->module && hd->base_class.id == bc_network_interface ) { - get_linkstate(hd_data, hd); + for(res = hd->res; res; res = res->next) { + if(res->any.type == res_link) break; + } + + if(!res) get_linkstate(hd_data, hd); if(!(hd_card = hd_get_device_by_idx(hd_data, hd->attached_to))) continue; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-13.32/src/hd/usb.c new/hwinfo-13.33/src/hd/usb.c --- old/hwinfo-13.32/src/hd/usb.c 2006-11-20 15:34:47.000000000 +0100 +++ new/hwinfo-13.33/src/hd/usb.c 2007-04-19 15:45:58.000000000 +0200 @@ -818,7 +818,7 @@ for(sf_class_e = sf_class; sf_class_e; sf_class_e = sf_class_e->next) { if(strncmp(sf_class_e->str, "ttyUSB", 6)) continue; - str_printf(&sf_cdev, 0, "/sys/class/usb/%s", sf_class_e->str); + str_printf(&sf_cdev, 0, "/sys/class/tty/%s", sf_class_e->str); ADD2LOG( " usb: name = %s, path = %s\n", diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-13.32/src/ids/src/network new/hwinfo-13.33/src/ids/src/network --- old/hwinfo-13.32/src/ids/src/network 2006-03-27 17:06:19.000000000 +0200 +++ new/hwinfo-13.33/src/ids/src/network 2007-04-16 14:35:38.000000000 +0200 @@ -66,11 +66,6 @@ &device.id pci 0x0112 +driver.module.modprobe hp100 -# net/pcnet32.c - vendor.id pci 0x1022 -&device.id pci 0x2000+0x0002 -+driver.module.modprobe pcnet32 - # net/amd8111e.c vendor.id pci 0x1022 &device.id pci 0x7462 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-13.32/VERSION new/hwinfo-13.33/VERSION --- old/hwinfo-13.32/VERSION 2007-04-12 11:52:13.000000000 +0200 +++ new/hwinfo-13.33/VERSION 2007-04-19 16:30:10.000000000 +0200 @@ -1 +1 @@ -13.32 +13.33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org