Re: Initial network device(s)

From: Andi Kleen (ak@suse.de)
Date: Tue Jul 11 2000 - 10:47:43 EDT

  • Next message: Martin Mares: "Re: [PATCH] arcnet and 64bit arithmetic"

    On Tue, Jul 11, 2000 at 10:39:13AM -0400, Richard B. Johnson wrote:
    >
    >
    > Does anybody know, during early startup of the kernel, what I
    > can check to see if an Ethernet device "eth0" exists. This
    > is before the network is started and before any possible
    > network-device module would be installed. The idea is to
    > install a network device module IFF the correct one is not
    > already linked into the kernel. This is an embedded system
    > so It doesn't use the current 'try to install if you get
    > an ifconfig error' mechanism. It doesn't use 'ifconfig'.
    > It uses socket ioctl(SIOCSxxxx) calls.

    Just do a SIOCGIFFLAGS. If the device doesn't exist you'll get a ENODEV,
    otherwise 0.

    -Andi

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



    This archive was generated by hypermail 2b29 : Tue Jul 11 2000 - 10:51:24 EDT