diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-11-18 07:12:30 +0200 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-11-18 07:12:30 +0200 |
commit | 22182420ea5608e681b50d097011c68ab6d52169 (patch) | |
tree | 082b033b438b65731c38ed206f5af50a41effba9 /src/libc.c | |
parent | 1e080418ec18eb028ad2c4d297f064f08f4eb547 (diff) |
move system_get_property to libc
Diffstat (limited to 'src/libc.c')
-rw-r--r-- | src/libc.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -2,6 +2,7 @@ #include <stdint.h> #include <stdlib.h> #include <stdio.h> +#include <string.h> #include <signal.h> #include <limits.h> #include <math.h> @@ -40,6 +41,21 @@ struct bionic_sigaction { // Stuff that doesn't exist in glibc +#define PROP_NAME_MAX 32 +#define PROP_VALUE_MAX 92 + +int +__system_property_get(const char *name, char *value) +{ + verbose("%s", name); + + if (!strcmp(name, "ro.build.version.sdk")) + return snprintf(value, PROP_VALUE_MAX, "28"); + + *value = 0; + return 0; +} + void __assert2(const char* file, int line, const char* function, const char* failed_expression) { |