Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package hwinfo for openSUSE:Factory checked in at 2023-07-06 18:28:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/hwinfo (Old) and /work/SRC/openSUSE:Factory/.hwinfo.new.23466 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hwinfo" Thu Jul 6 18:28:29 2023 rev:192 rq:1096979 version:23.1 Changes: -------- --- /work/SRC/openSUSE:Factory/hwinfo/hwinfo.changes 2023-07-04 15:21:53.506029606 +0200 +++ /work/SRC/openSUSE:Factory/.hwinfo.new.23466/hwinfo.changes 2023-07-06 18:28:33.879105876 +0200 @@ -1,0 +2,16 @@ +Wed Jul 5 15:12:32 UTC 2023 - [email protected] + +- merge gh#openSUSE/hwinfo#137 +- adjust exported symbols to yast2-hardware-detection test case +- 23.1 + +-------------------------------------------------------------------- +Wed Jul 5 12:01:36 UTC 2023 - [email protected] + +- merge gh#openSUSE/hwinfo#134 +- restrict libhd exported symbols to the documented API + (bsc#1212756) +- fix pppoe compile warning +- 23.0 + +-------------------------------------------------------------------- Old: ---- hwinfo-22.3.tar.xz New: ---- hwinfo-23.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hwinfo.spec ++++++ --- /var/tmp/diff_new_pack.rQpKhy/_old 2023-07-06 18:28:34.439109314 +0200 +++ /var/tmp/diff_new_pack.rQpKhy/_new 2023-07-06 18:28:34.443109339 +0200 @@ -17,7 +17,7 @@ Name: hwinfo -Version: 22.3 +Version: 23.1 %define lname libhd%(echo "%version" | perl -pe 's{\\D.*}{}') Release: 0 Summary: Hardware Library ++++++ hwinfo-22.3.tar.xz -> hwinfo-23.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-22.3/Makefile.common new/hwinfo-23.1/Makefile.common --- old/hwinfo-22.3/Makefile.common 2023-07-03 20:49:35.000000000 +0200 +++ new/hwinfo-23.1/Makefile.common 2023-07-05 17:12:32.000000000 +0200 @@ -23,7 +23,7 @@ CC ?= gcc LD = ld CFLAGS += $(RPM_OPT_FLAGS) -Wall -Wno-pointer-sign -pipe -g $(SHARED_FLAGS) $(EXTRA_FLAGS) -I$(TOPDIR)/src/hd -SHARED_FLAGS = -fPIC +SHARED_FLAGS = -fPIC -fvisibility=hidden LDFLAGS += -Lsrc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-22.3/VERSION new/hwinfo-23.1/VERSION --- old/hwinfo-22.3/VERSION 2023-07-03 20:49:35.000000000 +0200 +++ new/hwinfo-23.1/VERSION 2023-07-05 17:12:32.000000000 +0200 @@ -1 +1 @@ -22.3 +23.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-22.3/changelog new/hwinfo-23.1/changelog --- old/hwinfo-22.3/changelog 2023-07-03 20:49:35.000000000 +0200 +++ new/hwinfo-23.1/changelog 2023-07-05 17:12:32.000000000 +0200 @@ -1,3 +1,17 @@ +2023-07-05: 23.1 + - merge gh#openSUSE/hwinfo#137 + - adjust exported symbols to yast2-hardware-detection test case + +2023-07-05: 23.0 + - merge gh#openSUSE/hwinfo#134 + - restrict libhd exported symbols to the documented API + (bsc#1212756) + - fix pppoe compile warning + - merge gh#openSUSE/hwinfo#135 + - fix minor include issue + - merge gh#openSUSE/hwinfo#136 + - adjust exported symbols to linuxrc usage + 2023-07-03: 22.3 - merge gh#openSUSE/hwinfo#133 - avoid linking problems with libsamba (bsc#1212756) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-22.3/hwinfo.c new/hwinfo-23.1/hwinfo.c --- old/hwinfo-22.3/hwinfo.c 2023-07-03 20:49:35.000000000 +0200 +++ new/hwinfo-23.1/hwinfo.c 2023-07-05 17:12:32.000000000 +0200 @@ -29,12 +29,6 @@ static int get_probe_flags(int, char **, hd_data_t *); static void progress2(char *, char *); -// ##### temporary solution, fix it later! -str_list_t *read_file(char *file_name, unsigned start_line, unsigned lines); -str_list_t *search_str_list(str_list_t *sl, char *str); -str_list_t *add_str_list(str_list_t **sl, char *str); -char *new_str(const char *); - static unsigned deb = 0; static char *log_file = ""; static char *list = NULL; @@ -1272,8 +1266,8 @@ sl = hddb_get_packages(hd_data); for(i = 0; xserver3map[i]; i += 2) { - if (!search_str_list(sl, xserver3map[i + 1])) - add_str_list(&sl, new_str(xserver3map[i + 1])); + if(xserver3map[i + 1] && !search_str_list(sl, xserver3map[i + 1])) + add_str_list(&sl, strdup(xserver3map[i + 1])); } for(; sl; sl = sl->next) { @@ -1433,7 +1427,7 @@ } if(sscanf(sl->str, "vendor=%3s%n", buf, &cnt) >= 1 && !sl->str[cnt]) { - u = name2eisa_id(buf); + u = hd_name2eisa_id(buf); if(u) hd->vendor.id = u; tag = TAG_EISA; continue; @@ -1450,7 +1444,7 @@ } if(sscanf(sl->str, "subvendor=%3s%n", buf, &cnt) >= 1 && !sl->str[cnt]) { - u = name2eisa_id(buf); + u = hd_name2eisa_id(buf); if(u) hd->sub_vendor.id = u; tag = TAG_EISA; continue; @@ -1467,7 +1461,7 @@ } if(sscanf(sl->str, "serial=%255s%n", buf, &cnt) >= 1 && !sl->str[cnt]) { - hd->serial = new_str(buf); + hd->serial = strdup(buf); continue; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-22.3/src/hd/block.c new/hwinfo-23.1/src/hd/block.c --- old/hwinfo-22.3/src/hd/block.c 2023-07-03 20:49:35.000000000 +0200 +++ new/hwinfo-23.1/src/hd/block.c 2023-07-05 17:12:32.000000000 +0200 @@ -1295,7 +1295,7 @@ * Read iso9660/el torito info, if there is a CD inserted. * Returns NULL if nothing was found */ -cdrom_info_t *hd_read_cdrom_info(hd_data_t *hd_data, hd_t *hd) +API_SYM cdrom_info_t *hd_read_cdrom_info(hd_data_t *hd_data, hd_t *hd) { int fd; char *s; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-22.3/src/hd/hal.c new/hwinfo-23.1/src/hd/hal.c --- old/hwinfo-22.3/src/hd/hal.c 2023-07-03 20:49:35.000000000 +0200 +++ new/hwinfo-23.1/src/hd/hal.c 2023-07-05 17:12:32.000000000 +0200 @@ -498,7 +498,7 @@ } -int hd_write_properties(const char *udi, hal_prop_t *prop) +API_SYM int hd_write_properties(const char *udi, hal_prop_t *prop) { FILE *f; char *s; @@ -519,7 +519,7 @@ } -hal_prop_t *hd_read_properties(const char *udi) +API_SYM hal_prop_t *hd_read_properties(const char *udi) { char *path = NULL; str_list_t *sl0, *sl; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-22.3/src/hd/hd.c new/hwinfo-23.1/src/hd/hd.c --- old/hwinfo-22.3/src/hd/hd.c 2023-07-03 20:49:35.000000000 +0200 +++ new/hwinfo-23.1/src/hd/hd.c 2023-07-05 17:12:32.000000000 +0200 @@ -535,7 +535,7 @@ } -void hd_set_probe_feature(hd_data_t *hd_data, enum probe_feature feature) +API_SYM void hd_set_probe_feature(hd_data_t *hd_data, enum probe_feature feature) { unsigned ofs, bit, mask; int i; @@ -563,7 +563,7 @@ } -void hd_clear_probe_feature(hd_data_t *hd_data, enum probe_feature feature) +API_SYM void hd_clear_probe_feature(hd_data_t *hd_data, enum probe_feature feature) { unsigned ofs, bit, mask; int i; @@ -586,7 +586,7 @@ } -int hd_probe_feature(hd_data_t *hd_data, enum probe_feature feature) +API_SYM int hd_probe_feature(hd_data_t *hd_data, enum probe_feature feature) { if(feature < 0 || feature >= pr_default) return 0; @@ -594,7 +594,7 @@ } -void hd_set_probe_feature_hw(hd_data_t *hd_data, hd_hw_item_t item) +API_SYM void hd_set_probe_feature_hw(hd_data_t *hd_data, hd_hw_item_t item) { hd_set_probe_feature(hd_data, pr_int); // hd_set_probe_feature(hd_data, pr_manual); @@ -978,7 +978,7 @@ /* * Free all data associated with a hd_data_t struct. *Not* the struct itself. */ -hd_data_t *hd_free_hd_data(hd_data_t *hd_data) +API_SYM hd_data_t *hd_free_hd_data(hd_data_t *hd_data) { modinfo_t *p; unsigned u; @@ -1077,7 +1077,7 @@ /* * Free HAL property data. */ -hal_prop_t *hd_free_hal_properties(hal_prop_t *prop) +API_SYM hal_prop_t *hd_free_hal_properties(hal_prop_t *prop) { hal_prop_t *next; @@ -1204,7 +1204,7 @@ /*! * \note This may not free it. */ -hd_t *hd_free_hd_list(hd_t *hd) +API_SYM hd_t *hd_free_hd_list(hd_t *hd) { hd_t *h; @@ -1517,7 +1517,7 @@ // FIXME: obsolete -hd_manual_t *hd_free_manual(hd_manual_t *manual) +API_SYM hd_manual_t *hd_free_manual(hd_manual_t *manual) { return NULL; } @@ -1786,7 +1786,7 @@ } -hd_t *add_hd_entry(hd_data_t *hd_data, unsigned line, unsigned count) +API_SYM hd_t *hd_add_hd_entry(hd_data_t *hd_data, unsigned line, unsigned count) { hd_t *hd; @@ -1809,7 +1809,7 @@ } -void hd_scan(hd_data_t *hd_data) +API_SYM void hd_scan(hd_data_t *hd_data) { char *s = NULL; int i, j; @@ -2179,7 +2179,7 @@ /* * Must _not_ check that s is exactly 3 chars. */ -unsigned name2eisa_id(char *s) +API_SYM unsigned hd_name2eisa_id(char *s) { int i; unsigned u = 0; @@ -2299,7 +2299,7 @@ /* * find hardware entry with given index */ -hd_t *hd_get_device_by_idx(hd_data_t *hd_data, unsigned idx) +API_SYM hd_t *hd_get_device_by_idx(hd_data_t *hd_data, unsigned idx) { hd_t *hd; @@ -2370,7 +2370,7 @@ } -void hd_log_printf(hd_data_t *hd_data, char *format, ...) +API_SYM void hd_log_printf(hd_data_t *hd_data, char *format, ...) { ssize_t l; char *s = NULL; @@ -2473,7 +2473,7 @@ /** \relates s_str_list_t * Search a string list for a string. */ -str_list_t *search_str_list(str_list_t *sl, char *str) +API_SYM str_list_t *hd_search_str_list(str_list_t *sl, char *str) { if(!str) return NULL; @@ -2488,7 +2488,7 @@ * * The new string (str) will be *copied*! */ -str_list_t *add_str_list(str_list_t **sl, char *str) +API_SYM str_list_t *hd_add_str_list(str_list_t **sl, char *str) { while(*sl) sl = &(*sl)->next; @@ -2502,7 +2502,7 @@ /** \relates s_str_list_t * Free the memory allocated by a string list. */ -str_list_t *free_str_list(str_list_t *list) +API_SYM str_list_t *hd_free_str_list(str_list_t *list) { str_list_t *l; @@ -2517,7 +2517,7 @@ /** \relates s_str_list_t * Reverse string list. */ -str_list_t *reverse_str_list(str_list_t *list) +API_SYM str_list_t *hd_reverse_str_list(str_list_t *list) { str_list_t *sl, *sl_new = NULL, *next; @@ -2536,7 +2536,7 @@ * * start_line is zero-based; lines == 0 -> all lines */ -str_list_t *read_file(char *file_name, unsigned start_line, unsigned lines) +API_SYM str_list_t *hd_read_file(char *file_name, unsigned start_line, unsigned lines) { FILE *f; char buf[0x10000]; @@ -2585,7 +2585,7 @@ /* * Read directory, return a list of entries with file type 'type'. */ -str_list_t *read_dir(char *dir_name, int type) +API_SYM str_list_t *hd_read_dir(char *dir_name, int type) { str_list_t *sl_start = NULL, *sl_end = NULL, *sl; DIR *dir; @@ -2662,7 +2662,7 @@ } -char *hd_read_sysfs_link(char *base_dir, char *link_name) +API_SYM char *hd_read_sysfs_link(char *base_dir, char *link_name) { char *s = NULL; static char *buf = NULL; @@ -2761,7 +2761,7 @@ * If name is not a valid probe feature, 0 is returned. * */ -enum probe_feature hd_probe_feature_by_name(char *name) +API_SYM enum probe_feature hd_probe_feature_by_name(char *name) { pr_flags_t *flags; @@ -2775,7 +2775,7 @@ * Coverts a enum probe_feature to a string. * If it fails, NULL is returned. */ -char *hd_probe_feature_by_value(enum probe_feature feature) +API_SYM char *hd_probe_feature_by_value(enum probe_feature feature) { pr_flags_t *flags; @@ -2828,7 +2828,7 @@ } -int hd_module_is_active(hd_data_t *hd_data, char *mod) +API_SYM int hd_module_is_active(hd_data_t *hd_data, char *mod) { str_list_t *sl, *sl0 = read_kmods(hd_data); int active = 0; @@ -2901,7 +2901,7 @@ } -int hd_has_pcmcia(hd_data_t *hd_data) +API_SYM int hd_has_pcmcia(hd_data_t *hd_data) { hd_t *hd; @@ -2933,7 +2933,7 @@ } -int hd_usb_support(hd_data_t *hd_data) +API_SYM int hd_usb_support(hd_data_t *hd_data) { hd_t *hd; hd_res_t *res; @@ -2951,7 +2951,7 @@ } -int hd_smp_support(hd_data_t *hd_data) +API_SYM int hd_smp_support(hd_data_t *hd_data) { int is_smp = 0; unsigned u; @@ -3013,7 +3013,7 @@ } -int hd_color(hd_data_t *hd_data) +API_SYM int hd_color(hd_data_t *hd_data) { #if 0 hd_t *hd; @@ -3037,13 +3037,13 @@ } -int hd_mac_color(hd_data_t *hd_data) +API_SYM int hd_mac_color(hd_data_t *hd_data) { return hd_color(hd_data); } -unsigned hd_display_adapter(hd_data_t *hd_data) +API_SYM unsigned hd_display_adapter(hd_data_t *hd_data) { hd_t *hd; driver_info_t *di; @@ -3105,7 +3105,7 @@ } -enum cpu_arch hd_cpu_arch(hd_data_t *hd_data) +API_SYM enum cpu_arch hd_cpu_arch(hd_data_t *hd_data) { hd_t *hd; @@ -3169,13 +3169,13 @@ } -enum boot_arch hd_boot_arch(hd_data_t *hd_data) +API_SYM enum boot_arch hd_boot_arch(hd_data_t *hd_data) { return hd_data->boot; } -int hd_is_uml(hd_data_t *hd_data) +API_SYM int hd_is_uml(hd_data_t *hd_data) { int is_uml = 0; hd_t *hd; @@ -3218,7 +3218,7 @@ } -int hd_is_sgi_altix(hd_data_t *hd_data) +API_SYM int hd_is_sgi_altix(hd_data_t *hd_data) { struct stat sbuf; @@ -3231,7 +3231,7 @@ * * see https://www.sandpile.org/x86/cpuid.htm#level_4000_0000h */ -int hd_is_xen(hd_data_t *hd_data) +API_SYM int hd_is_xen(hd_data_t *hd_data) { #if defined(__i386__) || defined(__x86_64__) @@ -3284,7 +3284,7 @@ } -hd_t *hd_list(hd_data_t *hd_data, hd_hw_item_t item, int rescan, hd_t *hd_old) +API_SYM hd_t *hd_list(hd_data_t *hd_data, hd_hw_item_t item, int rescan, hd_t *hd_old) { hd_t *hd, *hd1, *hd_list = NULL; unsigned char probe_save[sizeof hd_data->probe]; @@ -3345,7 +3345,7 @@ } -hd_t *hd_list_with_status(hd_data_t *hd_data, hd_hw_item_t item, hd_status_t status) +API_SYM hd_t *hd_list_with_status(hd_data_t *hd_data, hd_hw_item_t item, hd_status_t status) { hd_t *hd, *hd1, *hd_list = NULL; unsigned char probe_save[sizeof hd_data->probe]; @@ -3395,7 +3395,7 @@ /* * items must be a 0 terminated list */ -hd_t *hd_list2(hd_data_t *hd_data, hd_hw_item_t *items, int rescan) +API_SYM hd_t *hd_list2(hd_data_t *hd_data, hd_hw_item_t *items, int rescan) { hd_t *hd, *hd1, *hd_list = NULL; unsigned char probe_save[sizeof hd_data->probe]; @@ -3463,7 +3463,7 @@ /* * items must be a 0 terminated list */ -hd_t *hd_list_with_status2(hd_data_t *hd_data, hd_hw_item_t *items, hd_status_t status) +API_SYM hd_t *hd_list_with_status2(hd_data_t *hd_data, hd_hw_item_t *items, hd_status_t status) { hd_t *hd, *hd1, *hd_list = NULL; unsigned char probe_save[sizeof hd_data->probe]; @@ -3494,7 +3494,7 @@ } -hd_t *hd_base_class_list(hd_data_t *hd_data, unsigned base_class) +API_SYM hd_t *hd_base_class_list(hd_data_t *hd_data, unsigned base_class) { hd_t *hd, *hd1, *hd_list = NULL; // hd_t *bridge_hd; @@ -3517,7 +3517,7 @@ return hd_list; } -hd_t *hd_sub_class_list(hd_data_t *hd_data, unsigned base_class, unsigned sub_class) +API_SYM hd_t *hd_sub_class_list(hd_data_t *hd_data, unsigned base_class, unsigned sub_class) { hd_t *hd, *hd1, *hd_list = NULL; @@ -3531,7 +3531,7 @@ return hd_list; } -hd_t *hd_bus_list(hd_data_t *hd_data, unsigned bus) +API_SYM hd_t *hd_bus_list(hd_data_t *hd_data, unsigned bus) { hd_t *hd, *hd1, *hd_list = NULL; @@ -3546,7 +3546,7 @@ } /* Convert libhd bus IDs to hwcfg bus names */ -const char* hd_busid_to_hwcfg(int busid) +API_SYM const char* hd_busid_to_hwcfg(int busid) { const char* const ids1[]={"none","isa","eisa","mc","pci","pcmcia","nubus","cardbus","other"}; const char* const ids2[]={"ps2","serial","parallel","floppy","scsi","ide","usb","adb","raid","sbus","i2o","vio","ccw","iucv"}; @@ -3761,7 +3761,7 @@ return 0; } -unsigned hd_boot_disk(hd_data_t *hd_data, int *matches) +API_SYM unsigned hd_boot_disk(hd_data_t *hd_data, int *matches) { hd_t *hd; unsigned crc, hd_idx = 0; @@ -3924,8 +3924,7 @@ return i; } -/* symbol clash with libsamba (bsc#1212756) */ -__attribute__((visibility("hidden"))) int load_module(hd_data_t *hd_data, char *module) +int load_module(hd_data_t *hd_data, char *module) { return load_module_with_params(hd_data, module, NULL); } @@ -5023,7 +5022,7 @@ #ifndef LIBHD_TINY -int hd_change_config_status(hd_data_t *hd_data, const char *id, hd_status_t status, const char *config_string) +API_SYM int hd_change_config_status(hd_data_t *hd_data, const char *id, hd_status_t status, const char *config_string) { hd_t *hd; int i; @@ -5051,7 +5050,7 @@ /* wrapper for hd_change_config_status(); obsolete - do not use */ -int hd_change_status(const char *id, hd_status_t status, const char *config_string) +API_SYM int hd_change_status(const char *id, hd_status_t status, const char *config_string) { hd_data_t *hd_data; int i; @@ -5190,7 +5189,7 @@ } -str_list_t *hd_split(char del, const char *str) +API_SYM str_list_t *hd_split(char del, const char *str) { char *t, *s, *str0; str_list_t *sl = NULL; @@ -5209,7 +5208,7 @@ } -char *hd_join(char *del, str_list_t *str) +API_SYM char *hd_join(char *del, str_list_t *str) { char *s; str_list_t *str0; @@ -5306,7 +5305,7 @@ return 0; } -void hd_set_hw_class(hd_t *hd, hd_hw_item_t hw_class) +API_SYM void hd_set_hw_class(hd_t *hd, hd_hw_item_t hw_class) { unsigned ofs, bit; @@ -5319,7 +5318,7 @@ } -int hd_is_hw_class(hd_t *hd, hd_hw_item_t hw_class) +API_SYM int hd_is_hw_class(hd_t *hd, hd_hw_item_t hw_class) { unsigned ofs, bit; @@ -5785,7 +5784,7 @@ /* * Return libhd version. */ -char *hd_version() +API_SYM char *hd_version() { return HD_VERSION_STRING; } @@ -5962,7 +5961,7 @@ /* * Read using mmap(). */ -int hd_read_mmap(hd_data_t *hd_data, char *name, unsigned char *buf, off_t start, unsigned size) +API_SYM int hd_read_mmap(hd_data_t *hd_data, char *name, unsigned char *buf, off_t start, unsigned size) { off_t map_start, xofs; int psize = getpagesize(), fd; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-22.3/src/hd/hd.h new/hwinfo-23.1/src/hd/hd.h --- old/hwinfo-22.3/src/hd/hd.h 2023-07-03 20:49:35.000000000 +0200 +++ new/hwinfo-23.1/src/hd/hd.h 2023-07-05 17:12:32.000000000 +0200 @@ -2819,6 +2819,21 @@ int hd_change_config_status(hd_data_t *hd_data, const char *id, hd_status_t status, const char *config_string); int hd_read_mmap(hd_data_t *hd_data, char *name, unsigned char *buf, off_t start, unsigned size); +str_list_t *hd_read_file(char *file_name, unsigned start_line, unsigned lines); +str_list_t *hd_read_dir(char *dir_name, int type); +unsigned hd_name2eisa_id(char *); + +str_list_t *hd_search_str_list(str_list_t *sl, char *str); +str_list_t *hd_add_str_list(str_list_t **sl, char *str); +str_list_t *hd_free_str_list(str_list_t *list); +str_list_t *hd_reverse_str_list(str_list_t *list); + +str_list_t *hd_split(char del, const char *str); +char *hd_join(char *del, str_list_t *str); + +hd_t *hd_add_hd_entry(hd_data_t *hd_data, unsigned line, unsigned count); +char *hd_read_sysfs_link(char *base_dir, char *link_name); + /* implemented in hddb.c */ /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-22.3/src/hd/hd_int.h new/hwinfo-23.1/src/hd/hd_int.h --- old/hwinfo-22.3/src/hd/hd_int.h 2023-07-03 20:49:35.000000000 +0200 +++ new/hwinfo-23.1/src/hd/hd_int.h 2023-07-05 17:12:32.000000000 +0200 @@ -72,6 +72,26 @@ #undef NUMERIC_UNIQUE_ID /* + * exported symbol - all others are not exported by the library + */ +#define API_SYM __attribute__((visibility("default"))) + +/* + * All API symbols start with 'hd_' or 'hddb_'. + * + * Add aliases for some symbols that are widespread throughout libhd sources + * to avoid massive code adjustments. + */ +#define read_dir hd_read_dir +#define read_file hd_read_file +#define name2eisa_id hd_name2eisa_id +#define search_str_list hd_search_str_list +#define add_str_list hd_add_str_list +#define free_str_list hd_free_str_list +#define reverse_str_list hd_reverse_str_list +#define add_hd_entry hd_add_hd_entry + +/* * Internal probing module numbers. Use mod_name_by_idx() outside of libhd. */ enum mod_idx { @@ -103,7 +123,6 @@ char *isa_id2str(unsigned); char *eisa_vendor_str(unsigned); -unsigned name2eisa_id(char *); char *canon_str(char *, int); int hex(char *string, int digits); @@ -114,14 +133,7 @@ void str_printf(char **buf, int offset, char *format, ...) __attribute__ ((format (printf, 3, 4))); void hexdump(char **buf, int with_ascii, unsigned data_len, unsigned char *data); -str_list_t *search_str_list(str_list_t *sl, char *str); -str_list_t *add_str_list(str_list_t **sl, char *str); -str_list_t *free_str_list(str_list_t *list); -str_list_t *reverse_str_list(str_list_t *list); -str_list_t *read_file(char *file_name, unsigned start_line, unsigned lines); -str_list_t *read_dir(char *dir_name, int type); str_list_t *read_dir_canonical(char *dir_name, int type); -char *hd_read_sysfs_link(char *base_dir, char *link_name); str_list_t *subcomponent_list(str_list_t *list, char *comp, int max); int has_subcomponent(str_list_t *list, char *comp); void progress(hd_data_t *hd_data, unsigned pos, unsigned count, char *msg); @@ -177,9 +189,6 @@ int hd_getdisksize(hd_data_t *hd_data, char *dev, int fd, hd_res_t **geo, hd_res_t **size); -str_list_t *hd_split(char del, const char *str); -char *hd_join(char *del, str_list_t *str); - int is_pnpinfo(ser_device_t *mi, int ofs); int is_pcmcia_ctrl(hd_data_t *hd_data, hd_t *hd); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-22.3/src/hd/hddb.c new/hwinfo-23.1/src/hd/hddb.c --- old/hwinfo-22.3/src/hd/hddb.c 2023-07-03 20:49:35.000000000 +0200 +++ new/hwinfo-23.1/src/hd/hddb.c 2023-07-05 17:12:32.000000000 +0200 @@ -1056,7 +1056,7 @@ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ -void hddb_dump_raw(hddb2_data_t *hddb, FILE *f) +API_SYM void hddb_dump_raw(hddb2_data_t *hddb, FILE *f) { int i; unsigned u, fl, v, t, id; @@ -1283,7 +1283,7 @@ } -void hddb_dump(hddb2_data_t *hddb, FILE *f) +API_SYM void hddb_dump(hddb2_data_t *hddb, FILE *f) { unsigned u; @@ -1794,7 +1794,7 @@ #endif -str_list_t *hddb_get_packages(hd_data_t *hd_data) +API_SYM str_list_t *hddb_get_packages(hd_data_t *hd_data) { return NULL; } @@ -1845,7 +1845,7 @@ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ -void hddb_add_info(hd_data_t *hd_data, hd_t *hd) +API_SYM void hddb_add_info(hd_data_t *hd_data, hd_t *hd) { hddb_search_t hs = {}; driver_info_t *new_driver_info = NULL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-22.3/src/hd/hdp.c new/hwinfo-23.1/src/hd/hdp.c --- old/hwinfo-22.3/src/hd/hdp.c 2023-07-03 20:49:35.000000000 +0200 +++ new/hwinfo-23.1/src/hd/hdp.c 2023-07-05 17:12:32.000000000 +0200 @@ -43,7 +43,7 @@ /* * Dump a hardware entry to FILE *f. */ -void hd_dump_entry(hd_data_t *hd_data, hd_t *h, FILE *f) +API_SYM void hd_dump_entry(hd_data_t *hd_data, hd_t *h, FILE *f) { char *s, *a0, *a1, *a2, *s1, *s2; char buf1[32], buf2[32]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-22.3/src/hd/hwclass_names.h new/hwinfo-23.1/src/hd/hwclass_names.h --- old/hwinfo-22.3/src/hd/hwclass_names.h 2023-07-03 20:49:35.000000000 +0200 +++ new/hwinfo-23.1/src/hd/hwclass_names.h 2023-07-05 17:12:32.000000000 +0200 @@ -1,3 +1,7 @@ +#ifndef API_SYM +#define API_SYM __attribute__((visibility("default"))) +#endif + typedef struct { int key; char *value; @@ -83,13 +87,13 @@ } -char *hd_hw_item_name(hd_hw_item_t item) +API_SYM char *hd_hw_item_name(hd_hw_item_t item) { return key2value(hw_items, item); } -hd_hw_item_t hd_hw_item_type(char *name) +API_SYM hd_hw_item_t hd_hw_item_type(char *name) { return name ? value2key(hw_items, name) : hw_none; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-22.3/src/hd/int.c new/hwinfo-23.1/src/hd/int.c --- old/hwinfo-22.3/src/hd/int.c 2023-07-03 20:49:35.000000000 +0200 +++ new/hwinfo-23.1/src/hd/int.c 2023-07-05 17:12:32.000000000 +0200 @@ -1329,7 +1329,7 @@ * * Interface function, don't use internally. */ -void hd_add_driver_data(hd_data_t *hd_data, hd_t *hd) +API_SYM void hd_add_driver_data(hd_data_t *hd_data, hd_t *hd) { char *s; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-22.3/src/hd/manual.c new/hwinfo-23.1/src/hd/manual.c --- old/hwinfo-22.3/src/hd/manual.c 2023-07-03 20:49:35.000000000 +0200 +++ new/hwinfo-23.1/src/hd/manual.c 2023-07-05 17:12:32.000000000 +0200 @@ -191,7 +191,7 @@ } -char *hd_status_value_name(hd_status_value_t status) +API_SYM char *hd_status_value_name(hd_status_value_t status) { return key2value(status_names, status); } @@ -200,7 +200,7 @@ /* * read an entry - obsolete */ -hd_manual_t *hd_manual_read_entry(hd_data_t *hd_data, const char *id) +API_SYM hd_manual_t *hd_manual_read_entry(hd_data_t *hd_data, const char *id) { return NULL; } @@ -261,7 +261,7 @@ * write an entry */ -int hd_manual_write_entry(hd_data_t *hd_data, hd_manual_t *entry) +API_SYM int hd_manual_write_entry(hd_data_t *hd_data, hd_manual_t *entry) { return 0; } @@ -888,7 +888,7 @@ } -hd_t *hd_read_config(hd_data_t *hd_data, const char *id) +API_SYM hd_t *hd_read_config(hd_data_t *hd_data, const char *id) { hd_t *hd = NULL; hal_prop_t *prop = NULL; @@ -919,7 +919,7 @@ } -int hd_write_config(hd_data_t *hd_data, hd_t *hd) +API_SYM int hd_write_config(hd_data_t *hd_data, hd_t *hd) { char *udi; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-22.3/src/hd/pppoe.c new/hwinfo-23.1/src/hd/pppoe.c --- old/hwinfo-22.3/src/hd/pppoe.c 2023-07-03 20:49:35.000000000 +0200 +++ new/hwinfo-23.1/src/hd/pppoe.c 2023-07-05 17:12:32.000000000 +0200 @@ -86,7 +86,8 @@ typedef struct PPPoETagStruct { unsigned int type:16; /* tag type */ unsigned int length:16; /* Length of payload */ - unsigned char payload[ETH_DATA_LEN]; /* A LOT of room to spare */ + /* ETH_DATA_LEN - 4 as PPPoETag is expected to fit into PPPoEPacket.payload[] */ + unsigned char payload[ETH_DATA_LEN - 4]; /* A LOT of room to spare */ } PPPoETag; /* Header size of a PPPoE Tag */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-22.3/src/isdn/cdbisdn.c new/hwinfo-23.1/src/isdn/cdbisdn.c --- old/hwinfo-22.3/src/isdn/cdbisdn.c 2023-07-03 20:49:35.000000000 +0200 +++ new/hwinfo-23.1/src/isdn/cdbisdn.c 2023-07-05 17:12:32.000000000 +0200 @@ -287,7 +287,7 @@ /* interface */ -cdb_isdn_vendor *hd_cdbisdn_get_vendor(int handle) +API_SYM cdb_isdn_vendor *hd_cdbisdn_get_vendor(int handle) { if (!CDBISDN_readhwdb) init_cdbisdn(); @@ -298,7 +298,7 @@ return(&cdb_isdnvendor_info[handle]); } -cdb_isdn_card *hd_cdbisdn_get_card(int handle) +API_SYM cdb_isdn_card *hd_cdbisdn_get_card(int handle) { if (!CDBISDN_readhwdb) init_cdbisdn(); @@ -309,7 +309,7 @@ return(&cdb_isdncard_info[handle]); } -cdb_isdn_vario *hd_cdbisdn_get_vario_from_type(int typ, int subtyp) +API_SYM cdb_isdn_vario *hd_cdbisdn_get_vario_from_type(int typ, int subtyp) { cdb_isdn_vario key, *ret; @@ -324,7 +324,7 @@ return(ret); } -cdb_isdn_card *hd_cdbisdn_get_card_from_type(int typ, int subtyp) +API_SYM cdb_isdn_card *hd_cdbisdn_get_card_from_type(int typ, int subtyp) { cdb_isdn_vario *civ; @@ -338,7 +338,7 @@ return(NULL); } -cdb_isdn_card *hd_cdbisdn_get_card_from_id(int vendor, int device, int subvendor, int subdevice) +API_SYM cdb_isdn_card *hd_cdbisdn_get_card_from_id(int vendor, int device, int subvendor, int subdevice) { int key, *ret; @@ -367,7 +367,7 @@ return(&cdb_isdncard_info[*ret]); } -cdb_isdn_vario *hd_cdbisdn_get_vario(int handle) +API_SYM cdb_isdn_vario *hd_cdbisdn_get_vario(int handle) { if (!CDBISDN_readhwdb) init_cdbisdn(); @@ -378,21 +378,21 @@ return(&cdb_isdnvario_info[handle]); } -int hd_cdbisdn_get_version(void) +API_SYM int hd_cdbisdn_get_version(void) { if (!CDBISDN_readhwdb) init_cdbisdn(); return(CDBISDN_VERSION); } -int hd_cdbisdn_get_db_version(void) +API_SYM int hd_cdbisdn_get_db_version(void) { if (!CDBISDN_readhwdb) init_cdbisdn(); return(cdb_dbversion); } -char *hd_cdbisdn_get_db_date(void) +API_SYM char *hd_cdbisdn_get_db_date(void) { if (!CDBISDN_readhwdb) init_cdbisdn();
