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  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 30 Dec 2009 11:33:12 -0800
From:	Joe Perches <joe@...ches.com>
To:	H Hartley Sweeten <hartleys@...ionengravers.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers/message/i2o/i2o_proc.c: use %pM to show MAC
 address

On Wed, 2009-12-30 at 14:22 -0500, H Hartley Sweeten wrote:
> Use the %pM kernel extension to display the MAC address.
> diff --git a/drivers/message/i2o/i2o_proc.c b/drivers/message/i2o/i2o_proc.c
> index 7045c45..949a648 100644
> --- a/drivers/message/i2o/i2o_proc.c
> +++ b/drivers/message/i2o/i2o_proc.c
> @@ -111,10 +111,7 @@ static int print_serial_number(struct seq_file *seq, u8 * serialno, int max_len)
>  		break;
>  
>  	case I2O_SNFORMAT_LAN48_MAC:	/* LAN-48 MAC Address */
> -		seq_printf(seq,
> -			   "LAN-48 MAC address @ %02X:%02X:%02X:%02X:%02X:%02X",
> -			   serialno[2], serialno[3],
> -			   serialno[4], serialno[5], serialno[6], serialno[7]);
> +		seq_printf(seq, "LAN-48 MAC address @ %pM", &serialno[2]);
>  		break;
>  
>  	case I2O_SNFORMAT_WAN:	/* WAN MAC Address */
> @@ -126,10 +123,8 @@ static int print_serial_number(struct seq_file *seq, u8 * serialno, int max_len)
>  	case I2O_SNFORMAT_LAN64_MAC:	/* LAN-64 MAC Address */
>  		/* FIXME: Figure out what a LAN-64 address really looks like?? */
>  		seq_printf(seq,
> -			   "LAN-64 MAC address @ [?:%02X:%02X:?] %02X:%02X:%02X:%02X:%02X:%02X",
> -			   serialno[8], serialno[9],
> -			   serialno[2], serialno[3],
> -			   serialno[4], serialno[5], serialno[6], serialno[7]);
> +			   "LAN-64 MAC address @ [?:%02X:%02X:?] %pM",
> +			   serialno[8], serialno[9], &serialno[2]);

User visible change but low probability to break things

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ