Hello community, here is the log from the commit of package sysconfig checked in at Fri Sep 1 01:42:12 CEST 2006. -------- --- sysconfig/sysconfig.changes 2006-08-17 17:22:07.000000000 +0200 +++ sysconfig/sysconfig.changes 2006-08-31 18:14:29.000000000 +0200 @@ -1,0 +2,5 @@ +Tue Aug 31 12:00:00 CEST 2006 - kay.sievers@suse.de + +- use libsysfs2 interface + +------------------------------------------------------------------- New: ---- sysconfig-libsysfs2.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sysconfig.spec ++++++ --- /var/tmp/diff_new_pack.TrDCL4/_old 2006-09-01 01:42:05.000000000 +0200 +++ /var/tmp/diff_new_pack.TrDCL4/_new 2006-09-01 01:42:05.000000000 +0200 @@ -13,7 +13,7 @@ Name: sysconfig BuildRequires: sysfsutils Version: 0.50.9 -Release: 17 +Release: 19 Summary: The sysconfig scheme Group: System/Base License: GPL @@ -23,6 +23,7 @@ PreReq: %fillup_prereq %insserv_prereq textutils fileutils gawk /usr/bin/sed /usr/bin/grep Source: %name-%version.tar.bz2 Patch1: sysconfig-soundbus.diff +Patch2: sysconfig-libsysfs2.patch %description This package provides the SuSE system configuration scheme. @@ -43,6 +44,7 @@ %prep %setup -n sysconfig-%{version} %patch1 +%patch2 -p1 %build autoreconf --force --install @@ -210,6 +212,8 @@ %{insserv_cleanup} %changelog -n sysconfig +* Thu Aug 31 2006 - kay.sievers@suse.de +- use libsysfs2 interface * Thu Aug 17 2006 - kukuk@suse.de - Remove undocumented ifservices.template directory to break down build dependencies. ++++++ sysconfig-libsysfs2.patch ++++++ --- a/tools/get_config_lib.c +++ b/tools/get_config_lib.c @@ -49,21 +49,6 @@ } } -/* - * Logging interface for libsysfs - * - * If libsysfs is compiled with -DLOG, it expects a function - * log_message() from the caller. - */ -void log_message(int level, const char *format, ...) -{ - va_list args; - - va_start(args, format); - error_log(level, format, args); - va_end(args); -} - void print_hwdesc(hwdesc_t *hwdesc, char *prefix, int export) { int i; char varlist[MAX_INTERFACE_NUM*80] = {'\0'}; @@ -835,15 +820,7 @@ } else if (!strncmp(hwdesc->interface[ifnum],"tr",2)) { hwdesc->interfaceclass[ifnum] = iface_class_tr; } - /* Some drivers do not create /sys/class/net/iface/wireless, therefore we - * look now in /proc/net/wireless for the interface. I leave the old code - * here; maybe we have to reactivate it for some strange reason. - zoz */ - /* snprintf(subdir, SYSFS_PATH_MAX, "%s/wireless", - hwdesc->interfacepath[ifnum]); - if ( ! sysfs_path_is_dir(subdir)) { - hwdesc->interfaceclass[ifnum] = iface_class_wlan; - return; - } */ + procfile = fopen("/proc/net/wireless", "r"); if (!procfile) return; @@ -1342,7 +1319,6 @@ char *devname = NULL; struct dlist *devlist = NULL; struct dlist *ifacelist = NULL; - struct sysfs_directory *sfd_dir = NULL; struct sysfs_attribute *sfa_id = NULL; struct sysfs_class *sfc_class; struct sysfs_class_device *sfcd_iface; @@ -1510,14 +1486,12 @@ hwdesc->interface[ifnum]); error_log(LOG_DEBUG,"Checking interface path %s\n", subdir); - sfd_dir = sysfs_open_directory(subdir); - if (sfd_dir) { + if (sysfs_path_is_dir(subdir)) { error_log(LOG_DEBUG,"Found interface path '%s'\n", - sfd_dir->path); + subdir); strcpy(hwdesc->interfacepath[ifnum], - sfd_dir->path); + subdir); hwdesc->interfaceclass[ifnum] = iface_class_partition; - sysfs_close_directory(sfd_dir); break; } } @@ -1663,30 +1637,27 @@ * bridges. */ if ( ! strcmp(hwdesc->busname[hwdesc->bus_num - 1], "pcmcia") && strcmp(hwdesc->devtype, "pcmcia")) { - sfd_dir = sysfs_open_directory(hwdesc->devicepath); - if (sfd_dir != NULL) { - devlist = sysfs_get_dir_subdirs(sfd_dir); - if (devlist != NULL) { - dlist_for_each_data(devlist, devname, char) { -// printf("devname: %s\n", devname); - snprintf(subdir, SYSFS_PATH_MAX, "%s/%s", - sfd_dir->path, devname); -// printf("subdir: %s\n", subdir); - sfdv_device = sysfs_open_device_path(subdir); - if (sfdv_device != NULL) { - strncpy(hwdesc->devicepath, sfdv_device->path, - MAX_DEVPATH_LEN); - sysfs_close_device(sfdv_device); - break; - } + devlist = sysfs_open_directory_list(hwdesc->devicepath); + if (devlist != NULL) { + dlist_for_each_data(devlist, devname, char) { +// printf("devname: %s\n", devname); + snprintf(subdir, SYSFS_PATH_MAX, "%s/%s", + hwdesc->devicepath, devname); +// printf("subdir: %s\n", subdir); + sfdv_device = sysfs_open_device_path(subdir); + if (sfdv_device != NULL) { + strncpy(hwdesc->devicepath, sfdv_device->path, + MAX_DEVPATH_LEN); + sysfs_close_device(sfdv_device); + break; } } - sysfs_close_directory(sfd_dir); + sysfs_close_list(devlist); } } - error_log(LOG_DEBUG,"-> devicepath (pcmcia) %s\n", hwdesc->devicepath); + error_log(LOG_DEBUG,"-> devicepath (pcmcia) %s\n", hwdesc->devicepath); } - + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 6) get devicepath from id * ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1782,27 +1753,24 @@ /* Check for network devices */ error_log(LOG_DEBUG,"checking network device: path %s\n", devicelink); - sfd_dir = sysfs_open_directory(devicelink); - if (sfd_dir != NULL) { - devlist = sysfs_get_dir_links(sfd_dir); - if (devlist != NULL) { - dlist_for_each_data(devlist, devname, char) { - error_log(LOG_DEBUG, "devname: %s\n", devname); - if (!strncmp(devname,"net:",4)) { - /* network interface found */ - snprintf(subdir, SYSFS_PATH_MAX, "%s/%s", - sfd_dir->path, devname); - error_log(LOG_DEBUG, "devlink: %s\n", devicelink); - if (sysfs_get_link(subdir, devicelink,SYSFS_PATH_MAX) == 0) { - check_or_add_interface(hwdesc, devicelink, - iface_class_net); - } + devlist = sysfs_open_directory_list(devicelink); + if (devlist != NULL) { + dlist_for_each_data(devlist, devname, char) { + error_log(LOG_DEBUG, "devname: %s\n", devname); + if (!strncmp(devname,"net:",4)) { + /* network interface found */ + snprintf(subdir, SYSFS_PATH_MAX, "%s/%s", + devicelink, devname); + error_log(LOG_DEBUG, "devlink: %s\n", devicelink); + if (sysfs_get_link(subdir, devicelink,SYSFS_PATH_MAX) == 0) { + check_or_add_interface(hwdesc, devicelink, + iface_class_net); } } } - sysfs_close_directory(sfd_dir); + sysfs_close_list(devlist); } - + /* Check for pcmcia devices */ error_log(LOG_DEBUG,"checking pcmcia device: path %s\n", hwdesc->devicepath); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org