lkml.org 
[lkml]   [2009]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH] simeth.c: use %pM to shown MAC address
    Date
    From
    Use the %pM kernel extension to display the HwAddr.

    The only difference in the output is that the MAC address is
    shown in the usual colon-separated hex notation instead of
    space-separated.

    Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
    Cc: David S. Miller <davem@davemloft.net>

    ---

    diff --git a/arch/ia64/hp/sim/simeth.c b/arch/ia64/hp/sim/simeth.c
    index 7e81966..3489b0d 100644
    --- a/arch/ia64/hp/sim/simeth.c
    +++ b/arch/ia64/hp/sim/simeth.c
    @@ -193,7 +193,7 @@ simeth_probe1(void)
    unsigned char mac_addr[ETH_ALEN];
    struct simeth_local *local;
    struct net_device *dev;
    - int fd, i, err, rc;
    + int fd, err, rc;

    /*
    * XXX Fix me
    @@ -236,12 +236,8 @@ simeth_probe1(void)
    */
    netdev_connect(dev->irq);

    - printk(KERN_INFO "%s: hosteth=%s simfd=%d, HwAddr",
    - dev->name, simeth_device, local->simfd);
    - for(i = 0; i < ETH_ALEN; i++) {
    - printk(" %2.2x", dev->dev_addr[i]);
    - }
    - printk(", IRQ %d\n", dev->irq);
    + printk(KERN_INFO "%s: hosteth=%s simfd=%d, HwAddr %pM, IRQ %d\n",
    + dev->name, simeth_device, local->simfd, dev->dev_addr, dev->irq);

    return 0;
    }

    \
     
     \ /
      Last update: 2009-12-28 23:27    [W:0.032 / U:31.360 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site