Mercurial > hg > dhcpcd
changeset 5564:dd1e6f7adadd draft
linux: ARM64 stock kernel does not emit hardware in cpuinfo
They have no plans to add it either, so just hardcode AArch64.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Sat, 26 Dec 2020 15:57:31 +0000 |
| parents | f0957b45f547 |
| children | 8f7592a6f80d |
| files | src/if-linux.c |
| diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/if-linux.c Sat Dec 12 22:12:54 2020 +0000 +++ b/src/if-linux.c Sat Dec 26 15:57:31 2020 +0000 @@ -167,10 +167,19 @@ #define SYS_LAYER2 "/sys/class/net/%s/device/layer2" #define SYS_TUNTAP "/sys/class/net/%s/tun_flags" +#if defined(__aarch64__) +static const char *mproc = "AArch64"; +int +if_machinearch(char *str, size_t len) +{ + + return snprintf(str, len, "%s", mproc); +} +#else static const char *mproc = #if defined(__alpha__) "system type" -#elif defined(__arm__) || defined(__aarch64__) +#elif defined(__arm__) "Hardware" #elif defined(__avr32__) "cpu family" @@ -232,6 +241,7 @@ errno = ESRCH; return -1; } +#endif static int check_proc_int(struct dhcpcd_ctx *ctx, const char *path)
