Hello community,

here is the log from the commit of package biosdevname for openSUSE:Factory 
checked in at 2016-01-30 11:34:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/biosdevname (Old)
 and      /work/SRC/openSUSE:Factory/.biosdevname.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "biosdevname"

Changes:
--------
--- /work/SRC/openSUSE:Factory/biosdevname/biosdevname.changes  2015-12-18 
21:52:52.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.biosdevname.new/biosdevname.changes     
2016-01-30 11:34:22.000000000 +0100
@@ -1,0 +2,6 @@
+Sun Jan 17 10:14:18 UTC 2016 - [email protected]
+
+- Update to 0.7.1
+  * no upstream changelog provided
+
+-------------------------------------------------------------------

Old:
----
  biosdevname-0.6.2.tar.gz

New:
----
  biosdevname-0.7.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ biosdevname.spec ++++++
--- /var/tmp/diff_new_pack.tF4W01/_old  2016-01-30 11:34:23.000000000 +0100
+++ /var/tmp/diff_new_pack.tF4W01/_new  2016-01-30 11:34:23.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package biosdevname
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %define _udevrulesdir %(pkg-config --variable=udevdir udev)/rules.d
 Name:           biosdevname
-Version:        0.6.2
+Version:        0.7.1
 Release:        0
 Summary:        Udev helper for naming devices per BIOS names
 License:        GPL-2.0

++++++ biosdevname-0.6.2.tar.gz -> biosdevname-0.7.1.tar.gz ++++++
++++ 17842 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/biosdevname-0.6.2/INSTALL new/biosdevname-0.7.1/INSTALL
--- old/biosdevname-0.6.2/INSTALL       2015-04-15 18:41:49.000000000 +0200
+++ new/biosdevname-0.7.1/INSTALL       2015-12-18 17:19:26.000000000 +0100
@@ -1,8 +1,8 @@
 Installation Instructions
 *************************
 
-Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation,
-Inc.
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
@@ -226,11 +226,6 @@
 
 and if that doesn't work, install pre-built binaries of GCC for HP-UX.
 
-   HP-UX `make' updates targets which have the same time stamps as
-their prerequisites, which makes it generally unusable when shipped
-generated files such as `configure' are involved.  Use GNU `make'
-instead.
-
    On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
 parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
 a workaround.  If GNU CC is not installed, it is therefore recommended
@@ -309,10 +304,9 @@
 overridden in the site shell script).
 
 Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf limitation.  Until the limitation is lifted, you can use
-this workaround:
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
 
-     CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
 
 `configure' Invocation
 ======================
@@ -368,3 +362,4 @@
 
 `configure' also accepts some other, not widely useful, options.  Run
 `configure --help' for more details.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/biosdevname-0.6.2/biosdevname.spec.fedora 
new/biosdevname-0.7.1/biosdevname.spec.fedora
--- old/biosdevname-0.6.2/biosdevname.spec.fedora       2015-04-15 
18:42:30.000000000 +0200
+++ new/biosdevname-0.7.1/biosdevname.spec.fedora       2015-12-18 
17:25:10.000000000 +0100
@@ -1,5 +1,5 @@
 Name:          biosdevname
-Version:       0.6.2
+Version:       0.7.1
 Release:       1%{?dist}
 Summary:       Udev helper for naming devices per BIOS names
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/biosdevname-0.6.2/biosdevname.spec.suse 
new/biosdevname-0.7.1/biosdevname.spec.suse
--- old/biosdevname-0.6.2/biosdevname.spec.suse 2015-04-15 18:42:30.000000000 
+0200
+++ new/biosdevname-0.7.1/biosdevname.spec.suse 2015-12-18 17:25:10.000000000 
+0100
@@ -1,5 +1,5 @@
 Name:          biosdevname
-Version:       0.6.2
+Version:       0.7.1
 Release:       1%{?dist}
 Summary:       Udev helper for naming devices per BIOS names
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/biosdevname-0.6.2/compile new/biosdevname-0.7.1/compile
--- old/biosdevname-0.6.2/compile       2015-04-15 18:41:49.000000000 +0200
+++ new/biosdevname-0.7.1/compile       2015-12-18 17:19:26.000000000 +0100
@@ -1,9 +1,10 @@
 #! /bin/sh
-# Wrapper for compilers which do not understand '-c -o'.
+# Wrapper for compilers which do not understand `-c -o'.
 
-scriptversion=2012-10-14.11; # UTC
+scriptversion=2009-10-06.20; # UTC
 
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009  Free Software
+# Foundation, Inc.
 # Written by Tom Tromey <[email protected]>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -28,224 +29,21 @@
 # bugs to <[email protected]> or send patches to
 # <[email protected]>.
 
-nl='
-'
-
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent tools from complaining about whitespace usage.
-IFS=" ""       $nl"
-
-file_conv=
-
-# func_file_conv build_file lazy
-# Convert a $build file to $host form and store it in $file
-# Currently only supports Windows hosts. If the determined conversion
-# type is listed in (the comma separated) LAZY, no conversion will
-# take place.
-func_file_conv ()
-{
-  file=$1
-  case $file in
-    / | /[!/]*) # absolute file, and not a UNC file
-      if test -z "$file_conv"; then
-       # lazily determine how to convert abs files
-       case `uname -s` in
-         MINGW*)
-           file_conv=mingw
-           ;;
-         CYGWIN*)
-           file_conv=cygwin
-           ;;
-         *)
-           file_conv=wine
-           ;;
-       esac
-      fi
-      case $file_conv/,$2, in
-       *,$file_conv,*)
-         ;;
-       mingw/*)
-         file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
-         ;;
-       cygwin/*)
-         file=`cygpath -m "$file" || echo "$file"`
-         ;;
-       wine/*)
-         file=`winepath -w "$file" || echo "$file"`
-         ;;
-      esac
-      ;;
-  esac
-}
-
-# func_cl_dashL linkdir
-# Make cl look for libraries in LINKDIR
-func_cl_dashL ()
-{
-  func_file_conv "$1"
-  if test -z "$lib_path"; then
-    lib_path=$file
-  else
-    lib_path="$lib_path;$file"
-  fi
-  linker_opts="$linker_opts -LIBPATH:$file"
-}
-
-# func_cl_dashl library
-# Do a library search-path lookup for cl
-func_cl_dashl ()
-{
-  lib=$1
-  found=no
-  save_IFS=$IFS
-  IFS=';'
-  for dir in $lib_path $LIB
-  do
-    IFS=$save_IFS
-    if $shared && test -f "$dir/$lib.dll.lib"; then
-      found=yes
-      lib=$dir/$lib.dll.lib
-      break
-    fi
-    if test -f "$dir/$lib.lib"; then
-      found=yes
-      lib=$dir/$lib.lib
-      break
-    fi
-    if test -f "$dir/lib$lib.a"; then
-      found=yes
-      lib=$dir/lib$lib.a
-      break
-    fi
-  done
-  IFS=$save_IFS
-
-  if test "$found" != yes; then
-    lib=$lib.lib
-  fi
-}
-
-# func_cl_wrapper cl arg...
-# Adjust compile command to suit cl
-func_cl_wrapper ()
-{
-  # Assume a capable shell
-  lib_path=
-  shared=:
-  linker_opts=
-  for arg
-  do
-    if test -n "$eat"; then
-      eat=
-    else
-      case $1 in
-       -o)
-         # configure might choose to run compile as 'compile cc -o foo foo.c'.
-         eat=1
-         case $2 in
-           *.o | *.[oO][bB][jJ])
-             func_file_conv "$2"
-             set x "$@" -Fo"$file"
-             shift
-             ;;
-           *)
-             func_file_conv "$2"
-             set x "$@" -Fe"$file"
-             shift
-             ;;
-         esac
-         ;;
-       -I)
-         eat=1
-         func_file_conv "$2" mingw
-         set x "$@" -I"$file"
-         shift
-         ;;
-       -I*)
-         func_file_conv "${1#-I}" mingw
-         set x "$@" -I"$file"
-         shift
-         ;;
-       -l)
-         eat=1
-         func_cl_dashl "$2"
-         set x "$@" "$lib"
-         shift
-         ;;
-       -l*)
-         func_cl_dashl "${1#-l}"
-         set x "$@" "$lib"
-         shift
-         ;;
-       -L)
-         eat=1
-         func_cl_dashL "$2"
-         ;;
-       -L*)
-         func_cl_dashL "${1#-L}"
-         ;;
-       -static)
-         shared=false
-         ;;
-       -Wl,*)
-         arg=${1#-Wl,}
-         save_ifs="$IFS"; IFS=','
-         for flag in $arg; do
-           IFS="$save_ifs"
-           linker_opts="$linker_opts $flag"
-         done
-         IFS="$save_ifs"
-         ;;
-       -Xlinker)
-         eat=1
-         linker_opts="$linker_opts $2"
-         ;;
-       -*)
-         set x "$@" "$1"
-         shift
-         ;;
-       *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
-         func_file_conv "$1"
-         set x "$@" -Tp"$file"
-         shift
-         ;;
-       *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
-         func_file_conv "$1" mingw
-         set x "$@" "$file"
-         shift
-         ;;
-       *)
-         set x "$@" "$1"
-         shift
-         ;;
-      esac
-    fi
-    shift
-  done
-  if test -n "$linker_opts"; then
-    linker_opts="-link$linker_opts"
-  fi
-  exec "$@" $linker_opts
-  exit 1
-}
-
-eat=
-
 case $1 in
   '')
-     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
      exit 1;
      ;;
   -h | --h*)
     cat <<\EOF
 Usage: compile [--help] [--version] PROGRAM [ARGS]
 
-Wrapper for compilers which do not understand '-c -o'.
-Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
 arguments, and rename the output as expected.
 
 If you are trying to build a whole package this is not the
-right script to run: please start by reading the file 'INSTALL'.
+right script to run: please start by reading the file `INSTALL'.
 
 Report bugs to <[email protected]>.
 EOF
@@ -255,13 +53,11 @@
     echo "compile $scriptversion"
     exit $?
     ;;
-  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
-    func_cl_wrapper "$@"      # Doesn't return...
-    ;;
 esac
 
 ofile=
 cfile=
+eat=
 
 for arg
 do
@@ -270,8 +66,8 @@
   else
     case $1 in
       -o)
-       # configure might choose to run compile as 'compile cc -o foo foo.c'.
-       # So we strip '-o arg' only if arg is an object.
+       # configure might choose to run compile as `compile cc -o foo foo.c'.
+       # So we strip `-o arg' only if arg is an object.
        eat=1
        case $2 in
          *.o | *.obj)
@@ -298,10 +94,10 @@
 done
 
 if test -z "$ofile" || test -z "$cfile"; then
-  # If no '-o' option was seen then we might have been invoked from a
+  # If no `-o' option was seen then we might have been invoked from a
   # pattern rule where we don't need one.  That is ok -- this is a
   # normal compilation that the losing compiler can handle.  If no
-  # '.c' file was seen then we are probably linking.  That is also
+  # `.c' file was seen then we are probably linking.  That is also
   # ok.
   exec "$@"
 fi
@@ -310,7 +106,7 @@
 cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
 
 # Create the lock directory.
-# Note: use '[/\\:.-]' here to ensure that we don't use the same name
+# Note: use `[/\\:.-]' here to ensure that we don't use the same name
 # that we are using for the .o file.  Also, base the name on the expected
 # object file name, since that is what matters with a parallel build.
 lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/biosdevname-0.6.2/config.h.in new/biosdevname-0.7.1/config.h.in
--- old/biosdevname-0.6.2/config.h.in   2015-04-15 18:41:48.000000000 +0200
+++ new/biosdevname-0.7.1/config.h.in   2015-12-18 17:19:26.000000000 +0100
@@ -123,7 +123,7 @@
 /* Define to 1 if you have the `strtoul' function. */
 #undef HAVE_STRTOUL
 
-/* Define to 1 if `domain' is a member of `struct pci_dev'. */
+/* Define to 1 if `domain' is member of `struct pci_dev'. */
 #undef HAVE_STRUCT_PCI_DEV_DOMAIN
 
 /* Define to 1 if you have the <syslog.h> header file. */
@@ -132,9 +132,6 @@
 /* Define to 1 if you have the <sys/ioctl.h> header file. */
 #undef HAVE_SYS_IOCTL_H
 
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
 /* Define to 1 if you have the <sys/select.h> header file. */
 #undef HAVE_SYS_SELECT_H
 
@@ -193,9 +190,6 @@
 /* Define to the one symbol short name of this package. */
 #undef PACKAGE_TARNAME
 
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/biosdevname-0.6.2/configure.ac new/biosdevname-0.7.1/configure.ac
--- old/biosdevname-0.6.2/configure.ac  2015-04-15 18:40:40.000000000 +0200
+++ new/biosdevname-0.7.1/configure.ac  2015-12-18 17:19:18.000000000 +0100
@@ -3,7 +3,7 @@
 # vim:tw=0:ts=8:sw=8:et
 
 AC_PREREQ(2.59)
-AC_INIT([biosdevname],[0.6.2],[[email protected]])
+AC_INIT([biosdevname],[0.7.1],[[email protected]])
 AC_LANG([C])
 AC_USE_SYSTEM_EXTENSIONS
 AC_CONFIG_SRCDIR([src/read_proc.c])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/biosdevname-0.6.2/missing new/biosdevname-0.7.1/missing
--- old/biosdevname-0.6.2/missing       2015-04-15 18:41:49.000000000 +0200
+++ new/biosdevname-0.7.1/missing       2015-12-18 17:19:26.000000000 +0100
@@ -1,10 +1,11 @@
 #! /bin/sh
-# Common wrapper for a few potentially missing GNU programs.
+# Common stub for a few missing GNU programs while installing.
 
-scriptversion=2012-06-26.16; # UTC
+scriptversion=2009-04-28.21; # UTC
 
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
-# Originally written by Fran,cois Pinard <[email protected]>, 1996.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <[email protected]>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,40 +26,69 @@
 # the same distribution terms that you use for the rest of that program.
 
 if test $# -eq 0; then
-  echo 1>&2 "Try '$0 --help' for more information"
+  echo 1>&2 "Try \`$0 --help' for more information"
   exit 1
 fi
 
-case $1 in
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
 
-  --is-lightweight)
-    # Used by our autoconf macros to check whether the available missing
-    # script is modern enough.
-    exit 0
-    ;;
+msg="missing on your system"
 
-  --run)
-    # Back-compat with the calling convention used by older automake.
-    shift
-    ;;
+case $1 in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
 
   -h|--h|--he|--hel|--help)
     echo "\
 $0 [OPTION]... PROGRAM [ARGUMENT]...
 
-Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
-to PROGRAM being missing or too old.
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
 
 Options:
   -h, --help      display this help and exit
   -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
 
 Supported PROGRAM values:
-  aclocal   autoconf  autoheader   autom4te  automake  makeinfo
-  bison     yacc      flex         lex       help2man
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  autom4te     touch the output file, or create a stub one
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
 
-Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
-'g' are ignored when checking the name.
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
 
 Send bug reports to <[email protected]>."
     exit $?
@@ -70,141 +100,272 @@
     ;;
 
   -*)
-    echo 1>&2 "$0: unknown '$1' option"
-    echo 1>&2 "Try '$0 --help' for more information"
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
     exit 1
     ;;
 
 esac
 
-# Run the given program, remember its exit status.
-"$@"; st=$?
+# normalize program name to check for.
+program=`echo "$1" | sed '
+  s/^gnu-//; t
+  s/^gnu//; t
+  s/^g//; t'`
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).  This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+  lex*|yacc*)
+    # Not GNU programs, they don't have --version.
+    ;;
 
-# If it succeeded, we are done.
-test $st -eq 0 && exit 0
+  tar*)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
 
-# Also exit now if we it failed (or wasn't found), and '--version' was
-# passed; such an option is passed most likely to detect whether the
-# program is present and works.
-case $2 in --version|--help) exit $st;; esac
-
-# Exit code 63 means version mismatch.  This often happens when the user
-# tries to use an ancient version of a tool on a file that requires a
-# minimum version.
-if test $st -eq 63; then
-  msg="probably too old"
-elif test $st -eq 127; then
-  # Program was missing.
-  msg="missing on your system"
-else
-  # Program was found and executed, but failed.  Give up.
-  exit $st
-fi
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $program in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' 
${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case $f in
+      *:*) touch_files="$touch_files "`echo "$f" |
+                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+          sed 's/\.am$/.in/' |
+          while read f; do touch "$f"; done
+    ;;
+
+  autom4te*)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo "#! /bin/sh"
+       echo "# Created by GNU Automake missing as a replacement of"
+       echo "#  $ $@"
+       echo "exit 0"
+       chmod +x $file
+       exit 1
+    fi
+    ;;
+
+  bison*|yacc*)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+       case $LASTARG in
+       *.y)
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" y.tab.c
+           fi
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" y.tab.h
+           fi
+         ;;
+       esac
+    fi
+    if test ! -f y.tab.h; then
+       echo >y.tab.h
+    fi
+    if test ! -f y.tab.c; then
+       echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex*|flex*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+       case $LASTARG in
+       *.l)
+           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" lex.yy.c
+           fi
+         ;;
+       esac
+    fi
+    if test ! -f lex.yy.c; then
+       echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+        you modified a dependency of a manual page.  You may need the
+        \`Help2man' package in order for those modifications to take
+        effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo ".ab help2man is required to generate this page"
+       exit $?
+    fi
+    ;;
+
+  makeinfo*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '
+       /^@setfilename/{
+         s/.* \([^ ]*\) *$/\1/
+         p
+         q
+       }' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
+    touch $file
+    ;;
+
+  tar*)
+    shift
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+       case $firstarg in
+       *o*)
+           firstarg=`echo "$firstarg" | sed s/o//`
+           tar "$firstarg" "$@" && exit 0
+           ;;
+       esac
+       case $firstarg in
+       *h*)
+           firstarg=`echo "$firstarg" | sed s/h//`
+           tar "$firstarg" "$@" && exit 0
+           ;;
+       esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
 
-perl_URL=http://www.perl.org/
-flex_URL=http://flex.sourceforge.net/
-gnu_software_URL=http://www.gnu.org/software
-
-program_details ()
-{
-  case $1 in
-    aclocal|automake)
-      echo "The '$1' program is part of the GNU Automake package:"
-      echo "<$gnu_software_URL/automake>"
-      echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
-      echo "<$gnu_software_URL/autoconf>"
-      echo "<$gnu_software_URL/m4/>"
-      echo "<$perl_URL>"
-      ;;
-    autoconf|autom4te|autoheader)
-      echo "The '$1' program is part of the GNU Autoconf package:"
-      echo "<$gnu_software_URL/autoconf/>"
-      echo "It also requires GNU m4 and Perl in order to run:"
-      echo "<$gnu_software_URL/m4/>"
-      echo "<$perl_URL>"
-      ;;
-  esac
-}
-
-give_advice ()
-{
-  # Normalize program name to check for.
-  normalized_program=`echo "$1" | sed '
-    s/^gnu-//; t
-    s/^gnu//; t
-    s/^g//; t'`
-
-  printf '%s\n' "'$1' is $msg."
-
-  configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
-  case $normalized_program in
-    autoconf*)
-      echo "You should only need it if you modified 'configure.ac',"
-      echo "or m4 files included by it."
-      program_details 'autoconf'
-      ;;
-    autoheader*)
-      echo "You should only need it if you modified 'acconfig.h' or"
-      echo "$configure_deps."
-      program_details 'autoheader'
-      ;;
-    automake*)
-      echo "You should only need it if you modified 'Makefile.am' or"
-      echo "$configure_deps."
-      program_details 'automake'
-      ;;
-    aclocal*)
-      echo "You should only need it if you modified 'acinclude.m4' or"
-      echo "$configure_deps."
-      program_details 'aclocal'
-      ;;
-   autom4te*)
-      echo "You might have modified some maintainer files that require"
-      echo "the 'automa4te' program to be rebuilt."
-      program_details 'autom4te'
-      ;;
-    bison*|yacc*)
-      echo "You should only need it if you modified a '.y' file."
-      echo "You may want to install the GNU Bison package:"
-      echo "<$gnu_software_URL/bison/>"
-      ;;
-    lex*|flex*)
-      echo "You should only need it if you modified a '.l' file."
-      echo "You may want to install the Fast Lexical Analyzer package:"
-      echo "<$flex_URL>"
-      ;;
-    help2man*)
-      echo "You should only need it if you modified a dependency" \
-           "of a man page."
-      echo "You may want to install the GNU Help2man package:"
-      echo "<$gnu_software_URL/help2man/>"
-    ;;
-    makeinfo*)
-      echo "You should only need it if you modified a '.texi' file, or"
-      echo "any other file indirectly affecting the aspect of the manual."
-      echo "You might want to install the Texinfo package:"
-      echo "<$gnu_software_URL/texinfo/>"
-      echo "The spurious makeinfo call might also be the consequence of"
-      echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
-      echo "want to install GNU make:"
-      echo "<$gnu_software_URL/make/>"
-      ;;
-    *)
-      echo "You might have modified some files without having the proper"
-      echo "tools for further handling them.  Check the 'README' file, it"
-      echo "often tells you about the needed prerequisites for installing"
-      echo "this package.  You may also peek at any GNU archive site, in"
-      echo "case some other package contains this missing '$1' program."
-      ;;
-  esac
-}
-
-give_advice "$1" | sed -e '1s/^/WARNING: /' \
-                       -e '2,$s/^/         /' >&2
-
-# Propagate the correct exit status (expected to be 127 for a program
-# not found, 63 for a program that failed due to version mismatch).
-exit $st
+exit 0
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/biosdevname-0.6.2/src/bios_dev_name.h 
new/biosdevname-0.7.1/src/bios_dev_name.h
--- old/biosdevname-0.6.2/src/bios_dev_name.h   2015-04-15 18:42:30.000000000 
+0200
+++ new/biosdevname-0.7.1/src/bios_dev_name.h   2015-12-18 17:25:10.000000000 
+0100
@@ -6,7 +6,7 @@
 #ifndef GLUE_H_INCLUDED
 #define GLUE_H_INCLUDED
 
-#define BIOSDEVNAME_VERSION "0.6.2"
+#define BIOSDEVNAME_VERSION "0.7.1"
 
 struct bios_dev_name_opts {
        int argc;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/biosdevname-0.6.2/src/bios_device.c new/biosdevname-0.7.1/src/bios_device.c
--- old/biosdevname-0.6.2/src/bios_device.c     2014-11-19 17:04:18.000000000 
+0100
+++ new/biosdevname-0.7.1/src/bios_device.c     2015-12-18 17:18:52.000000000 
+0100
@@ -21,6 +21,7 @@
                return;
        list_for_each_entry_safe(dev, n, &state->bios_devices, node) {
                list_del(&(dev->node));
+               free(dev->bios_name);
                free(dev);
        }
 }
@@ -138,6 +139,7 @@
 
        if      (x->pcidev && !y->pcidev) return -1;
        else if (!x->pcidev && y->pcidev) return 1;
+       else if (!x->pcidev && !y->pcidev) return 0;
 
        a = x->pcidev;
        b = y->pcidev;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/biosdevname-0.6.2/src/dmidecode/util.c 
new/biosdevname-0.7.1/src/dmidecode/util.c
--- old/biosdevname-0.6.2/src/dmidecode/util.c  2014-11-03 19:07:11.000000000 
+0100
+++ new/biosdevname-0.7.1/src/dmidecode/util.c  2015-12-18 17:10:29.000000000 
+0100
@@ -111,6 +111,7 @@
        if((p=malloc(len))==NULL)
        {
                perror("malloc");
+               close(fd);
                return NULL;
        }
        
@@ -129,6 +130,7 @@
        if(mmp==MAP_FAILED)
        {
                free(p);
+               close(fd);
                return NULL;
        }
        
@@ -145,18 +147,21 @@
                fprintf(stderr, "%s: ", devmem);
                perror("lseek");
                free(p);
+               close(fd);
                return NULL;
        }
        
        if(myread(fd, p, len, devmem)==-1)
        {
                free(p);
+               close(fd);
                return NULL;
        }
 #endif /* USE_MMAP */
        
        if(close(fd)==-1)
                perror(devmem);
-       
+
+       close(fd);
        return p;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/biosdevname-0.6.2/src/eths.c new/biosdevname-0.7.1/src/eths.c
--- old/biosdevname-0.6.2/src/eths.c    2014-11-19 17:04:18.000000000 +0100
+++ new/biosdevname-0.7.1/src/eths.c    2015-12-18 17:10:29.000000000 +0100
@@ -198,6 +198,7 @@
        /* Open control socket. */
        fd = socket(AF_INET, SOCK_DGRAM, 0);
        if (fd < 0) {
+               free(permaddr);
                perror("Cannot get control socket");
                return 1;
        }
@@ -208,6 +209,7 @@
        err = ioctl(fd, SIOCETHTOOL, &ifr);
        if (err < 0) {
                close(fd);
+               free(permaddr);
                return err;
        }
        memcpy(buf, permaddr->data, min(permaddr->size, size));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/biosdevname-0.6.2/src/pci.c new/biosdevname-0.7.1/src/pci.c
--- old/biosdevname-0.6.2/src/pci.c     2015-04-15 18:37:58.000000000 +0200
+++ new/biosdevname-0.7.1/src/pci.c     2015-12-18 17:10:29.000000000 +0100
@@ -30,6 +30,7 @@
 /* Borrowed from kernel vpd code */
 #define PCI_VPD_LRDT                   0x80
 #define PCI_VPD_SRDT_END               0x78
+#define PCI_VPDI_TAG                   0x82
 #define PCI_VPDR_TAG                   0x90
 
 #define PCI_VPD_SRDT_LEN_MASK          0x7
@@ -37,9 +38,16 @@
 #define PCI_VPD_SRDT_TAG_SIZE          1
 #define PCI_VPD_INFO_FLD_HDR_SIZE      3
 
+struct vpd_tag
+{
+       char    cc[2];
+       u8      len;
+       char    data[1];
+};
+
 static inline u16 pci_vpd_lrdt_size(const u8 *lrdt)
 {
-       return (u16)lrdt[1] + ((u16)lrdt[2] << 8L);
+       return (u16)lrdt[0] + ((u16)lrdt[1] << 8L);
 }
 
 static inline u8 pci_vpd_srdt_size(const u8* srdt)
@@ -47,78 +55,41 @@
        return (*srdt) & PCI_VPD_SRDT_LEN_MASK;
 }
 
-static inline u8 pci_vpd_info_field_size(const u8 *info_field)
-{
-       return info_field[2];
-}
-
-static int pci_vpd_size(struct pci_device *pdev, int fd)
-{
-       uint8_t buf[3], tag;
-       int off;
-
-       if (!is_pci_network(pdev))
-               return 0;
-       off = 0;
-       for(;;) {
-               if (pread(fd, buf, 1, off) != 1)
-                       break;
-               if (buf[0] & PCI_VPD_LRDT) {
-                       tag = buf[0];
-                       if (pread(fd, buf, 3, off) != 3)
-                               break;
-                       off += PCI_VPD_LRDT_TAG_SIZE + pci_vpd_lrdt_size(buf);
-               } else {
-                       tag = buf[0] & ~PCI_VPD_SRDT_LEN_MASK;
-                       off += PCI_VPD_SRDT_TAG_SIZE + pci_vpd_srdt_size(buf);
-               }
-               if (tag == 0 || tag == 0xFF || tag == PCI_VPD_SRDT_END || tag 
== PCI_VPDR_TAG)
-                       break;
-       }
-       return off;
-}
-
-static int pci_vpd_find_tag(const u8 *buf, unsigned int off, unsigned int len, 
u8 rdt)
-{
-       int i;
-
-       for (i = off; i < len;) {
-               u8 val = buf[i];
-
-               if (val & PCI_VPD_LRDT) {
-                       if (i + PCI_VPD_LRDT_TAG_SIZE > len)
-                               break;
-                       if (val == rdt)
-                               return i;
-                       i += PCI_VPD_LRDT_TAG_SIZE + pci_vpd_lrdt_size(&buf[i]);
-               } else {
-                       u8 tag = val & ~PCI_VPD_SRDT_LEN_MASK;
-                       
-                       if (tag == rdt)
-                               return i;
-                       if (tag == PCI_VPD_SRDT_END)
-                               break;
-                       i += PCI_VPD_SRDT_TAG_SIZE + pci_vpd_srdt_size(&buf[i]);
-               }
-       }
-       return -1;
-}
-
-/* Search for matching key/subkey in the VPD data */
-static int pci_vpd_find_info_subkey(const u8 *buf, unsigned int off, unsigned 
int len, 
-       const char *kw, const char *skw)
+static int pci_vpd_readtag(int fd, int *len)
 {
-       int i;
+       u8 tag, tlen[2];
 
-       for (i = off; i + PCI_VPD_INFO_FLD_HDR_SIZE <= off+len;) {
-               /* Match key and subkey names, can use * for regex */
-               if ((kw[0] == '*' || buf[i+0] == kw[0]) &&
-                   (kw[1] == '*' || buf[i+1] == kw[1]) &&
-                   (skw[0] == '*' || !memcmp(&buf[i+3], skw, 3)))
-                       return i;
-               i += PCI_VPD_INFO_FLD_HDR_SIZE + 
pci_vpd_info_field_size(&buf[i]);
-       }
-       return -1;
+       if (read(fd, &tag, 1) != 1)
+               return -1;
+       if (tag == 0x00 || tag == 0xFF || tag == 0x7F)
+               return -1;
+       if (tag & PCI_VPD_LRDT) {
+               if (read(fd, tlen, 2) != 2)
+                       return -1;
+               *len = pci_vpd_lrdt_size(tlen);
+               /* Check length of VPD-R */
+               if (*len  >= 1024)
+                       return -1;
+               return tag;
+       }
+       *len = pci_vpd_srdt_size(&tag);
+       return (tag & ~0x7);
+}
+
+static void *pci_vpd_findtag(void *buf, int len, const char *sig)
+{
+        int off, siglen;
+        struct vpd_tag *t;
+
+        off = 0;
+        siglen = strlen(sig);
+        while (off < len) {
+                t = (struct vpd_tag *)((u8 *)buf + off);
+                if (!memcmp(t->data, sig, siglen))
+                        return t;
+                off += (t->len + 3);
+        }
+        return NULL;
 }
 
 /* Add port identifier(s) to PCI device */
@@ -140,24 +111,35 @@
        list_add_tail(&p->node, &pdev->ports);
 }
 
-static void parse_dcm(struct libbiosdevname_state *state, int seg, int bus, 
-                    const char *dcm, int len)
+static void parse_dcm(struct libbiosdevname_state *state, struct pci_device 
*pdev,
+                     void *vpd, int len)
 {
-       int i;
-       int port, devfn, pfi;
+       int i, port, devfn, pfi, step;
        struct pci_device *vf;
+       struct vpd_tag *dcm;
+       const char *fmt;
 
-       for (i=3; i<len; ) {
-               if (!strncmp(dcm, "DCM", 3)) {
-                       sscanf(dcm+i, "%1x%1x%2x", &port, &devfn, &pfi);
-                       i += 10;
-               } else if (!strncmp(dcm, "DC2", 3)) {
-                       sscanf(dcm+i, "%1x%2x%2x", &port, &devfn, &pfi);
-                       i += 11;
-               } else {
+       fmt = "%1x%1x%2x";
+       step = 10;
+       dcm = pci_vpd_findtag(vpd, len, "DCM");
+       if (dcm == NULL) {
+               dcm = pci_vpd_findtag(vpd, len, "DC2");
+               if (dcm == NULL)
+                       return;
+               fmt = "%1x%2x%2x";
+               step = 11;
+       }
+       for (i = 3; i < dcm->len; i += step) {
+               if (i+step > dcm->len) {
+                       /* DCM is truncated */
                        return;
                }
-               if ((vf = find_pci_dev_by_pci_addr(state, seg, bus, devfn>>3, 
devfn & 7)) != NULL) {
+               if (sscanf(dcm->data+i, fmt, &port, &devfn, &pfi) != 3)
+                       break;
+               vf = find_pci_dev_by_pci_addr(state, pdev->pci_dev->domain,
+                                             pdev->pci_dev->bus,
+                                             devfn >> 3, devfn & 7);
+               if (vf != NULL) {
                        add_port(vf, port, pfi);
                        if (vf->vpd_port == INT_MAX) {
                                vf->vpd_port = port;
@@ -167,66 +149,40 @@
        }
 }
 
-static int parse_vpd(struct libbiosdevname_state *state, struct pci_device 
*pdev, int len, unsigned char *vpd)
-{
-       int i, j, isz, jsz;
-
-       i = pci_vpd_find_tag(vpd, 0, len, PCI_VPDR_TAG);
-       if (i < 0)
-               return 1;
-       isz = pci_vpd_lrdt_size(&vpd[i]);
-       i += PCI_VPD_LRDT_TAG_SIZE;
-
-       /* Lookup Version */
-       j = pci_vpd_find_info_subkey(vpd, i, isz, "**", "DSV");
-       if (j < 0)
-               return 1;
-       jsz = pci_vpd_info_field_size(&vpd[j]);
-       j += PCI_VPD_INFO_FLD_HDR_SIZE;
-       if ((memcmp(vpd+j+3, "1028VPDR.VER1.0", 15)) &&
-           (memcmp(vpd+j+3, "1028VPDR.VER2.0", 15)))
-               return 1;
-       
-       /* Lookup Port Mappings */
-       j = pci_vpd_find_info_subkey(vpd, i, isz, "**", "DC2");
-       if (j < 0) {
-               j = pci_vpd_find_info_subkey(vpd, i, isz, "**", "DCM");
-               if (j < 0)
-                       return 1;
-       }
-       jsz = pci_vpd_info_field_size(&vpd[j]);
-       j += PCI_VPD_INFO_FLD_HDR_SIZE;
-
-       parse_dcm(state, pdev->pci_dev->domain, pdev->pci_dev->bus, 
-                 (char *)vpd+j, jsz);
-       return 0;
-}
-
 /* Read and parse PCI VPD section if it exists */
 static int read_pci_vpd(struct libbiosdevname_state *state, struct pci_device 
*pdev)
 {
        char path[PATH_MAX];
        char pci_name[16];
-       int fd, rc=1;
+       int fd, len;
        unsigned char *vpd;
-       off_t size;
-       ssize_t nrd;
 
+       if (!is_pci_network(pdev))
+               return 1;
        unparse_pci_name(pci_name, sizeof(pci_name), pdev->pci_dev);
-       snprintf(path, sizeof(path), "/sys/bus/pci/devices/%s/vpd", pci_name);
-       if ((fd = open(path, O_RDONLY|O_SYNC)) >= 0) {
-               size = pci_vpd_size(pdev, fd);
-               if (size > 0) {
-                       vpd = malloc(size);
-                       if (vpd != NULL) {
-                               if ((nrd = pread(fd, vpd, size, 0)) > 0)
-                                       rc = parse_vpd(state, pdev, nrd, vpd);
-                               free(vpd);
-                       }
-               }
-               close(fd);
+       snprintf(path, sizeof(path), "/sys/bus/pci/devices/%s/physfn/vpd", 
pci_name);
+       fd = open(path, O_RDONLY|O_SYNC);
+       if (fd < 0) {
+               snprintf(path, sizeof(path), "/sys/bus/pci/devices/%s/vpd", 
pci_name);
+               fd = open(path, O_RDONLY|O_SYNC);
+               if (fd < 0)
+                       return 1;
        }
-       return rc;
+       if (pci_vpd_readtag(fd, &len) != PCI_VPDI_TAG)
+               goto done;
+       lseek(fd, len, SEEK_CUR);
+       if (pci_vpd_readtag(fd, &len) != PCI_VPDR_TAG)
+               goto done;
+       vpd = alloca(len);
+       if (read(fd, vpd, len) != len)
+               goto done;
+       /* Check for DELL VPD tag */
+       if (!pci_vpd_findtag(vpd, len, "DSV1028VPDR.VER"))
+               goto done;
+       parse_dcm(state, pdev, vpd, len);
+ done:
+       close(fd);
+       return 0;
 }
 
 static void set_pci_vpd_instance(struct libbiosdevname_state *state)
@@ -254,6 +210,10 @@
                if (dev->pci_dev->vendor_id == 0x1969 ||
                    dev->pci_dev->vendor_id == 0x168c)
                        continue;
+               if (dev->vpd_port != INT_MAX) {
+                       /* Ignore already parsed devices */
+                       continue;
+               }
                read_pci_vpd(state, dev);
        }
 
@@ -636,7 +596,7 @@
        snprintf(path, sizeof(path), "/sys/bus/pci/devices/%s/%s", pci_name, 
virtpath);
 
        memset(cpath, 0, sizeof(cpath));
-       if (readlink(path, cpath, sizeof(cpath)) < 0)
+       if (readlink(path, cpath, sizeof(cpath) - 1) < 0)
                return;
        if ((vf = find_dev_by_pci_name(state, cpath)) != NULL) {
                vf->is_sriov_virtual_function = 1;
@@ -789,7 +749,7 @@
                             "SATA Controller",
                             "SAS Controller",
        };
-       if (type > 0 && type <= sizeof(msg))
+       if (type > 0 && type <= (sizeof(msg)/sizeof(msg[0])))
                s += snprintf(s, size-(s-buf), "%s\n", msg[type-1]);
        else
                s += snprintf(s, size-(s-buf), "<OUT OF SPEC>\n");

++++++ biosdevname-pic.patch ++++++
--- /var/tmp/diff_new_pack.tF4W01/_old  2016-01-30 11:34:23.000000000 +0100
+++ /var/tmp/diff_new_pack.tF4W01/_new  2016-01-30 11:34:23.000000000 +0100
@@ -1,7 +1,7 @@
-Index: biosdevname-0.6.2/src/bios_dev_name.c
+Index: biosdevname-0.7.1/src/bios_dev_name.c
 ===================================================================
---- biosdevname-0.6.2.orig/src/bios_dev_name.c
-+++ biosdevname-0.6.2/src/bios_dev_name.c
+--- biosdevname-0.7.1.orig/src/bios_dev_name.c
++++ biosdevname-0.7.1/src/bios_dev_name.c
 @@ -114,10 +114,21 @@ static u_int32_t
  cpuid (u_int32_t eax, u_int32_t ecx)
  {

++++++ udev-rule-path.patch ++++++
--- /var/tmp/diff_new_pack.tF4W01/_old  2016-01-30 11:34:23.000000000 +0100
+++ /var/tmp/diff_new_pack.tF4W01/_new  2016-01-30 11:34:23.000000000 +0100
@@ -1,8 +1,8 @@
-Index: biosdevname-0.6.1/configure.ac
+Index: biosdevname-0.7.1/configure.ac
 ===================================================================
---- biosdevname-0.6.1.orig/configure.ac        2014-12-01 16:05:47.000000000 
+0100
-+++ biosdevname-0.6.1/configure.ac     2015-01-22 13:24:22.231621837 +0100
-@@ -66,20 +66,9 @@
+--- biosdevname-0.7.1.orig/configure.ac
++++ biosdevname-0.7.1/configure.ac
+@@ -66,20 +66,9 @@ AC_FUNC_STAT
  AC_FUNC_VPRINTF
  AC_CHECK_FUNCS([dup2 gettimeofday memset munmap select socket strcasecmp 
strchr strdup strerror strncasecmp strpbrk strrchr strstr strtol strtoul])
  
@@ -26,11 +26,11 @@
  RULEDIR=$(dirname $RULEDEST)
  AC_SUBST(RULEDEST, $RULEDEST)
  AC_SUBST(RULEDIR,  $RULEDIR)
-Index: biosdevname-0.6.1/configure
+Index: biosdevname-0.7.1/configure
 ===================================================================
---- biosdevname-0.6.1.orig/configure   2014-12-01 16:06:21.000000000 +0100
-+++ biosdevname-0.6.1/configure        2015-01-22 13:48:51.915645203 +0100
-@@ -7305,18 +7305,7 @@
+--- biosdevname-0.7.1.orig/configure
++++ biosdevname-0.7.1/configure
+@@ -10560,18 +10560,7 @@ done
  
  # this is ugly, but accounts for SLES 10, Red Hat/Fedora, and Ubuntu
  # handles default udev rules as of udev 114 or thereabouts


Reply via email to