lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 21 Apr 2014 23:40:52 +0100
From:	Ben Hutchings <ben@...adent.org.uk>
To:	netdev <netdev@...r.kernel.org>
Cc:	Florian Fainelli <f.fainelli@...il.com>
Subject: [PATCH ethtool] Fix ETHTOOL_ENABLE_PRETTY_DUMP conditions

The C macro ETHTOOL_ENABLE_PRETTY_DUMP was not being defined by default.
Rearrange the autoconf mess to fix this.

The macro name was also misspelt in one condition.

Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
I applied this before the 3.14 release I just made.  autotools continues
to surprise me, never pleasantly.

Ben.

 configure.ac | 15 ++++++++-------
 ethtool.c    |  2 +-
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index c08938b..ab0b01b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,13 +32,14 @@ AC_CHECK_FUNCS(socket strtol)
 
 dnl Check for options
 AC_ARG_ENABLE(pretty-dump,
-	       [  --enable-pretty-dump	  enable registers, EEPROM and SFP pretty dumps (enabled by default)],
-	       [if test x$enableval != xno; then
-			AC_DEFINE(ETHTOOL_ENABLE_PRETTY_DUMP, 1,
-			[Define this to enable register, EEPROM and SFP pretty dumps.]) enable_prettydump=yes
-		fi],
-	       enable_prettydump=yes)
-AM_CONDITIONAL([ETHTOOL_ENABLE_PRETTY_DUMP], [test x$enable_prettydump = xyes])
+	      [  --enable-pretty-dump	  enable registers, EEPROM and SFP pretty dumps (enabled by default)],
+	      ,
+	      enable_pretty_dump=yes)
+if test x$enable_pretty_dump = xyes; then
+    AC_DEFINE(ETHTOOL_ENABLE_PRETTY_DUMP, 1,
+	      [Define this to enable register, EEPROM and SFP pretty dumps.])
+fi
+AM_CONDITIONAL([ETHTOOL_ENABLE_PRETTY_DUMP], [test x$enable_pretty_dump = xyes])
 
 AC_CONFIG_FILES([Makefile ethtool.spec ethtool.8])
 AC_OUTPUT
diff --git a/ethtool.c b/ethtool.c
index 091a6b9..8e968a8 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -979,7 +979,7 @@ static int dump_eeprom(int geeprom_dump_raw, struct ethtool_drvinfo *info,
 		fwrite(ee->data, 1, ee->len, stdout);
 		return 0;
 	}
-#ifdef ETHTOOL_ENABL_PRETTY_DUMP
+#ifdef ETHTOOL_ENABLE_PRETTY_DUMP
 	if (!strncmp("natsemi", info->driver, ETHTOOL_BUSINFO_LEN)) {
 		return natsemi_dump_eeprom(info, ee);
 	} else if (!strncmp("tg3", info->driver, ETHTOOL_BUSINFO_LEN)) {

-- 
Ben Hutchings
Knowledge is power.  France is bacon.

Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)

Powered by blists - more mailing lists