#include #include #include #include int main(int argc, char **argv) { unsigned char ei[EI_NIDENT]; union { short s; char c[2]; } endian_test; if (fread(ei, 1, EI_NIDENT, stdin) != EI_NIDENT) { fprintf(stderr, "Error: input truncated\n"); return 1; } if (memcmp(ei, ELFMAG, SELFMAG) != 0) { fprintf(stderr, "Error: not ELF\n"); return 1; } switch (ei[EI_CLASS]) { case ELFCLASS32: printf("#define KERNEL_ELFCLASS ELFCLASS32\n"); break; case ELFCLASS64: printf("#define KERNEL_ELFCLASS ELFCLASS64\n"); break; default: exit(1); } switch (ei[EI_DATA]) { case ELFDATA2LSB: printf("#define KERNEL_ELFDATA ELFDATA2LSB\n"); break; case ELFDATA2MSB: printf("#define KERNEL_ELFDATA ELFDATA2MSB\n"); break; default: exit(1); } if (sizeof(unsigned long) == 4) { printf("#define HOST_ELFCLASS ELFCLASS32\n"); } else if (sizeof(unsigned long) == 8) { printf("#define HOST_ELFCLASS ELFCLASS64\n"); } endian_test.s = 0x0102; if (memcmp(endian_test.c, "\x01\x02", 2) == 0) printf("#define HOST_ELFDATA ELFDATA2MSB\n"); else if (memcmp(endian_test.c, "\x02\x01", 2) == 0) printf("#define HOST_ELFDATA ELFDATA2LSB\n"); else exit(1); return 0; } alue='packet-loop-back'>packet-loop-back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaju Lakkaraju <Raju.Lakkaraju@microsemi.com>2017-02-07 19:10:26 +0530
committerDavid S. Miller <davem@davemloft.net>2017-02-08 13:29:04 -0500
commit04d8a0a5f3b6887543850d991a5e37c4ec90e250 (patch)
treeee1fafb2122c2b29c7cb19e571bd7229afdbf847 /include/uapi/sound/tlv.h
parentff4cf0e5ce952488074aa7f47734af1794f55fbc (diff)
net: phy: Add LED mode driver for Microsemi PHYs.
LED Mode: Microsemi PHY support 2 LEDs (LED[0] and LED[1]) to display different status information that can be selected by setting LED mode. LED Mode parameter (vsc8531, led-0-mode) and (vsc8531, led-1-mode) get from Device Tree. Signed-off-by: Raju Lakkaraju <Raju.Lakkaraju@microsemi.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/sound/tlv.h')