Home
last modified time | relevance | path

Searched refs:name (Results 1 – 25 of 269) sorted by relevance

1234567891011

/system/core/libsysutils/src/
DServiceManager.cpp41 int ServiceManager::start(const char *name) { in start() argument
42 if (strlen(name) > SERVICE_NAME_MAX) { in start()
43 SLOGE("Service name '%s' is too long", name); in start()
46 if (isRunning(name)) { in start()
47 SLOGW("Service '%s' is already running", name); in start()
51 SLOGD("Starting service '%s'", name); in start()
52 property_set("ctl.start", name); in start()
58 if (isRunning(name)) in start()
62 SLOGW("Timed out waiting for service '%s' to start", name); in start()
66 SLOGD("Sucessfully started '%s'", name); in start()
[all …]
/system/core/toolbox/
Dtoolbox.c18 #define TOOL(name) int name##_main(int, char**); argument
24 const char *name; member
28 #define TOOL(name) { #name, name##_main }, argument
37 char *name = argv[0]; in main() local
40 name = argv[1] + 1; in main()
46 name = cmd + 1; in main()
49 for(i = 0; tools[i].name; i++){ in main()
50 if(!strcmp(tools[i].name, name)){ in main()
Dsyren.c23 const char *name; member
43 static syren_reg *find_reg(const char *name) in find_reg() argument
47 for (i = 0; registers[i].name != 0; i++) { in find_reg()
48 if (!strcasecmp(registers[i].name, name)) in find_reg()
67 char name[32]; in syren_main() local
110 for (i = 0; registers[i].name; i++) { in syren_main()
114 fprintf(stderr, "%s: error\n", registers[i].name); in syren_main()
116 fprintf(stderr, "%s: %04x\n", registers[i].name, sio.value); in syren_main()
126 if(strlen(argv[2]) >= sizeof(name)){ in syren_main()
130 strlcpy(name, argv[2], sizeof(name)); in syren_main()
[all …]
Dwatchprops.c22 static void announce(char *name, char *value) in announce() argument
30 fprintf(stderr,"%10d %s = '%s'\n", (int) time(0), name, value); in announce()
33 static void add_to_watchlist(Hashmap *watchlist, const char *name, in add_to_watchlist() argument
36 char *key = strdup(name); in add_to_watchlist()
48 char name[PROP_NAME_MAX]; in populate_watchlist() local
51 __system_property_read(pi, name, value_unused); in populate_watchlist()
52 add_to_watchlist(watchlist, name, pi); in populate_watchlist()
58 char name[PROP_NAME_MAX]; in update_watchlist() local
62 __system_property_read(pi, name, value); in update_watchlist()
63 serial = hashmapGet(watchlist, name); in update_watchlist()
[all …]
Dls.c34 static int listpath(const char *name, int flags);
169 const char *name; in listfile_long() local
176 name = strrchr(path, '/'); in listfile_long()
177 if(name == 0) { in listfile_long()
178 name = path; in listfile_long()
180 name++; in listfile_long()
204 date, name); in listfile_long()
208 mode, user, group, (long long)s->st_size, date, name); in listfile_long()
227 mode, user, group, date, name, linkto); in listfile_long()
232 mode, user, group, date, name); in listfile_long()
[all …]
Dreadlink.c39 static void usage(char* name) { in usage() argument
40 fprintf(stderr, "Usage: %s [OPTION]... FILE\n", name); in usage()
69 char name[PATH_MAX+1]; in readlink_main() local
71 if(!realpath(argv[optind], name)) { in readlink_main()
78 ssize_t len = readlink(argv[1], name, PATH_MAX); in readlink_main()
86 name[len] = '\0'; in readlink_main()
89 fputs(name, stdout); in readlink_main()
/system/core/init/
Dproperty_service.c95 static int check_mac_perms(const char *name, char *sctx) in check_mac_perms() argument
111 if (selabel_lookup(sehandle_prop, &tctx, name, 1) != 0) in check_mac_perms()
114 if (selinux_check_access(sctx, tctx, class, perm, (void*) name) == 0) in check_mac_perms()
122 static int check_control_mac_perms(const char *name, char *sctx) in check_control_mac_perms() argument
131 int ret = snprintf(ctl_name, sizeof(ctl_name), "ctl.%s", name); in check_control_mac_perms()
143 static int check_perms(const char *name, char *sctx) in check_perms() argument
148 if(!strncmp(name, "ro.", 3)) in check_perms()
149 name +=3; in check_perms()
151 return check_mac_perms(name, sctx); in check_perms()
154 int __property_get(const char *name, char *value) in __property_get() argument
[all …]
Dueventd.c37 static void import_kernel_nv(char *name, int in_qemu) in import_kernel_nv() argument
39 if (*name != '\0') { in import_kernel_nv()
40 char *value = strchr(name, '='); in import_kernel_nv()
43 if (!strcmp(name,"androidboot.hardware")) in import_kernel_nv()
117 if (!strcmp(id, android_ids[i].name)) in get_android_id()
124 char *name; in set_device_permission() local
141 name = args[0]; in set_device_permission()
143 if (!strncmp(name,"/sys/", 5) && (nargs == 5)) { in set_device_permission()
156 if (!strncmp(name, "mtd@", 4)) { in set_device_permission()
157 int n = mtd_name_to_number(name + 4); in set_device_permission()
[all …]
/system/core/include/netutils/
Difc.h28 extern int ifc_get_ifindex(const char *name, int *if_indexp);
29 extern int ifc_get_hwaddr(const char *name, void *ptr);
31 extern int ifc_up(const char *name);
32 extern int ifc_down(const char *name);
43 extern int ifc_get_addr(const char *name, in_addr_t *addr);
44 extern int ifc_set_addr(const char *name, in_addr_t addr);
45 extern int ifc_add_address(const char *name, const char *address,
47 extern int ifc_del_address(const char *name, const char *address,
49 extern int ifc_set_prefixLength(const char *name, int prefixLength);
50 extern int ifc_set_hwaddr(const char *name, const void *ptr);
[all …]
/system/core/include/cutils/
Dtrace.h183 #define ATRACE_BEGIN(name) atrace_begin(ATRACE_TAG, name) argument
184 static inline void atrace_begin(uint64_t tag, const char* name) in atrace_begin() argument
190 len = snprintf(buf, ATRACE_MESSAGE_LENGTH, "B|%d|%s", getpid(), name); in atrace_begin()
215 #define ATRACE_ASYNC_BEGIN(name, cookie) \ argument
216 atrace_async_begin(ATRACE_TAG, name, cookie)
217 static inline void atrace_async_begin(uint64_t tag, const char* name, in atrace_async_begin() argument
225 getpid(), name, cookie); in atrace_async_begin()
234 #define ATRACE_ASYNC_END(name, cookie) atrace_async_end(ATRACE_TAG, name, cookie) argument
235 static inline void atrace_async_end(uint64_t tag, const char* name, in atrace_async_end() argument
243 getpid(), name, cookie); in atrace_async_end()
[all …]
Dconfig_utils.h32 const char *name; member
43 cnode* config_node(const char *name, const char *value);
46 cnode* config_find(cnode *root, const char *name);
49 int config_bool(cnode *root, const char *name, int _default);
52 const char* config_str(cnode *root, const char *name, const char *_default);
55 void config_set(cnode *root, const char *name, const char *value);
Dsockets.h47 static inline int android_get_control_socket(const char *name) in android_get_control_socket() argument
56 name, in android_get_control_socket()
60 name, in android_get_control_socket()
92 extern int socket_local_server(const char *name, int namespaceId, int type);
93 extern int socket_local_server_bind(int s, const char *name, int namespaceId);
95 const char *name, int namespaceId, int type);
96 extern int socket_local_client(const char *name, int namespaceId, int type);
/system/core/libcutils/
Ddir_hash.c118 char *name; member
126 return strcmp((*ra)->name, (*rb)->name); in cmp()
149 char *name = malloc(strlen(de->d_name) + 1); in recurse() local
152 if (name == NULL || node == NULL) { in recurse()
156 free(f->name); in recurse()
160 free(name); in recurse()
166 strcpy(name, de->d_name); in recurse()
168 node->name = name; in recurse()
177 char *name; in recurse() local
182 name = malloc(strlen(f->name) + strlen(directory_path) + 2); in recurse()
[all …]
Dsocket_local_client.c27 int socket_local_client(const char *name, int namespaceId, int type) in socket_local_client() argument
47 int socket_make_sockaddr_un(const char *name, int namespaceId, in socket_make_sockaddr_un() argument
56 namelen = strlen(name); in socket_make_sockaddr_un()
69 memcpy(p_addr->sun_path + 1, name, namelen); in socket_make_sockaddr_un()
73 namelen = strlen(name) + strlen(FILESYSTEM_SOCKET_PREFIX); in socket_make_sockaddr_un()
81 strcat(p_addr->sun_path, name); in socket_make_sockaddr_un()
86 namelen = strlen(name) + strlen(ANDROID_RESERVED_SOCKET_PREFIX); in socket_make_sockaddr_un()
94 strcat(p_addr->sun_path, name); in socket_make_sockaddr_un()
98 namelen = strlen(name); in socket_make_sockaddr_un()
105 strcpy(p_addr->sun_path, name); in socket_make_sockaddr_un()
[all …]
/system/core/liblog/tests/
Dbenchmark.h38 Benchmark(const char* name, void (*fn)(int)) : name_(strdup(name)), fn_(fn) { in Benchmark() argument
41 Benchmark(const char* name) : name_(strdup(name)), fn_(NULL) {} in Benchmark() argument
61 BenchmarkWantsArgBase(const char* name, void (*fn)(int, T)) : Benchmark(name) { in BenchmarkWantsArgBase() argument
78 BenchmarkWithArg(const char* name, void (*fn)(int, T), const char* arg_name, T arg) : in BenchmarkWithArg() argument
79 BenchmarkWantsArg<T>(name, fn), arg_(arg) { in BenchmarkWithArg()
100 BenchmarkWantsArg<T>(const char* name, void (*fn)(int, T)) :
101 BenchmarkWantsArgBase<T>(name, fn) { }
107 BenchmarkWantsArg<int>(const char* name, void (*fn)(int, int)) :
108 BenchmarkWantsArgBase<int>(name, fn) { }
118 static inline Benchmark* BenchmarkFactory(const char* name, void (*fn)(int)) { in BenchmarkFactory() argument
[all …]
/system/core/adb/
Dservices.c340 static int create_subproc_thread(const char *name, const subproc_mode mode) in create_subproc_thread() argument
348 if (name == 0 || *name == 0) { in create_subproc_thread()
351 arg0 = "-c"; arg1 = name; in create_subproc_thread()
385 int service_to_fd(const char *name) in service_to_fd() argument
389 if(!strncmp(name, "tcp:", 4)) { in service_to_fd()
390 int port = atoi(name + 4); in service_to_fd()
391 name = strchr(name + 4, ':'); in service_to_fd()
392 if(name == 0) { in service_to_fd()
398 ret = socket_network_client(name + 1, port, SOCK_STREAM); in service_to_fd()
404 } else if(!strncmp(name, "local:", 6)) { in service_to_fd()
[all …]
/system/core/libnetutils/
Difc_utils.c165 static void ifc_init_ifr(const char *name, struct ifreq *ifr) in ifc_init_ifr() argument
168 strncpy(ifr->ifr_name, name, IFNAMSIZ); in ifc_init_ifr()
172 int ifc_get_hwaddr(const char *name, void *ptr) in ifc_get_hwaddr() argument
176 ifc_init_ifr(name, &ifr); in ifc_get_hwaddr()
185 int ifc_get_ifindex(const char *name, int *if_indexp) in ifc_get_ifindex() argument
189 ifc_init_ifr(name, &ifr); in ifc_get_ifindex()
198 static int ifc_set_flags(const char *name, unsigned set, unsigned clr) in ifc_set_flags() argument
201 ifc_init_ifr(name, &ifr); in ifc_set_flags()
208 int ifc_up(const char *name) in ifc_up() argument
210 int ret = ifc_set_flags(name, IFF_UP, 0); in ifc_up()
[all …]
/system/extras/tests/memtest/
Dbandwidth.cpp31 const char *name; member
72 for (int j = 0; options[j].name != NULL; j++) { in processBandwidthOptions()
73 if (strcmp(arg, options[j].name) == 0) { in processBandwidthOptions()
74 const char *name = options[j].name; in processBandwidthOptions() local
76 printf("The option --%s requires an argument.\n", name); in processBandwidthOptions()
80 (*values)[name].int_value = strtol(argv[++i], NULL, 0); in processBandwidthOptions()
82 (*values)[name].char_value = argv[++i]; in processBandwidthOptions()
95 const char *name = values["type"].char_value; in createBandwidthBenchmarkObject() local
100 if (strcmp(name, "copy_ldrd_strd") == 0) { in createBandwidthBenchmarkObject()
102 } else if (strcmp(name, "copy_ldmia_stmia") == 0) { in createBandwidthBenchmarkObject()
[all …]
/system/extras/tests/fstest/
Dperm_checker.c200 static void print_new_rule(const char *name, mode_t mode, uid_t uid, gid_t gid) in print_new_rule() argument
206 printf("%s %4o %4o %s %d %s %d\n", name, mode, mode, pw->pw_name, uid, in print_new_rule()
223 static int validate_file(const char *name, mode_t mode, uid_t uid, gid_t gid) in validate_file() argument
231 if (strcmp(name, pr->spec) == 0) { in validate_file()
241 printf("# WARNING # Multiple exact rules for file: %s\n", name); in validate_file()
245 print_new_rule(name, mode, uid, gid); in validate_file()
253 if ((strstr(name, pr->spec) == name) && in validate_file()
254 (!strchr(name + strlen(pr->spec), '/'))) { in validate_file()
265 if (strstr(name, pr->spec) == name) { in validate_file()
278 print_new_rule(name, mode, uid, gid); in validate_file()
[all …]
/system/core/fastbootd/other/
Dgptedit.c67 void deleteGPT(struct GPT_entry_table *table, const char *name);
177 char name[GPT_NAMELEN + 1]; in printGPT() local
186 name[m] = entry->name[m] & 127; in printGPT()
188 name[m] = 0; in printGPT()
190 n + 1, entry->first_lba, entry->last_lba, name); in printGPT()
197 char name[GPT_NAMELEN + 1]; in configPrintGPT() local
217 name[m] = entry->name[m] & 127; in configPrintGPT()
219 name[m] = 0; in configPrintGPT()
221 printf(" %s {\n", name); in configPrintGPT()
242 char *name = arg; in addGPT() local
[all …]
/system/extras/showmap/
Dshowmap.c27 char name[1]; member
30 static int is_library(const char *name) { in is_library() argument
31 int len = strlen(name); in is_library()
32 return len >= 4 && name[0] == '/' in is_library()
33 && name[len - 3] == '.' && name[len - 2] == 's' && name[len - 1] == 'o'; in is_library()
43 char name[128]; in parse_header() local
57 strlcpy(name, line + name_pos, sizeof(name)); in parse_header()
59 if (prev && start == prev->end && is_library(prev->name)) { in parse_header()
63 strlcpy(name, prev->name, sizeof(name)); in parse_header()
66 strlcpy(name, "[anon]", sizeof(name)); in parse_header()
[all …]
/system/extras/micro_bench/
Dmicro_bench.cpp79 const char *name; member
142 static inline void printIter(uint64_t time_ns, const char *name, size_t size, size_t copies, double… in printIter() argument
144 name, copies, size, (double)time_ns/NS_PER_SEC, avg/1024.0); in printIter()
147 static inline void printSummary(uint64_t /*time_ns*/, const char *name, size_t size, size_t copies,… in printSummary() argument
149 name, copies, size, running_avg/1024.0, std_dev/1024.0, min/1024.0, in printSummary()
176 static void inline printColdIter(uint64_t time_ns, const char *name, size_t size, size_t copies, si… in printColdIter() argument
178 name, copies, num_buffers, size, (double)time_ns/NS_PER_SEC, avg/1024.0); in printColdIter()
182 uint64_t /*time_ns*/, const char *name, size_t size, size_t copies, size_t num_buffers, in printColdSummary() argument
185 name, copies, num_buffers, size, running_avg/1024.0, in printColdSummary()
219 #define MAINLOOP_DATA(name, cmd_data, size, BENCH) \ argument
[all …]
/system/keymaster/include/keymaster/
Dkeymaster_tags.h103 inline TypedTag(const char* name) : name_(name) {
115 const char* name() { return name_; }
128 inline TypedEnumTag(const char* name) : name_(name) {
140 const char* name() { return name_; }
149 #define DEFINE_KEYMASTER_TAG(type, name) static TypedTag<type, KM_##name> name(#name)
151 #define DEFINE_KEYMASTER_TAG(type, name) static TypedTag<type, KM_##name> name
182 #define DEFINE_KEYMASTER_ENUM_TAG(type, name, enumtype) \
183 static TypedEnumTag<type, KM_##name, enumtype> name(#name)
185 #define DEFINE_KEYMASTER_ENUM_TAG(type, name, enumtype) \
186 static TypedEnumTag<type, KM_##name, enumtype> name
/system/core/libbacktrace/
Dmap_info.c45 const char* name = line + name_pos; in parse_vmmap_line() local
46 size_t name_len = strlen(name); in parse_vmmap_line()
55 memcpy(mi->name, name, name_len); in parse_vmmap_line()
56 mi->name[name_len - 1] = '\0'; in parse_vmmap_line()
60 mi->is_readable, mi->is_writable, mi->is_executable, mi->name); in parse_vmmap_line()
109 const char* name = line + name_pos; in parse_maps_line() local
110 size_t name_len = strlen(name); in parse_maps_line()
111 if (name_len && name[name_len - 1] == '\n') { in parse_maps_line()
122 memcpy(mi->name, name, name_len); in parse_maps_line()
123 mi->name[name_len] = '\0'; in parse_maps_line()
[all …]
/system/netd/server/
DNetlinkHandler.h37 void notifyInterfaceAdded(const char *name);
38 void notifyInterfaceRemoved(const char *name);
39 void notifyInterfaceChanged(const char *name, bool isUp);
40 void notifyInterfaceLinkChanged(const char *name, bool isUp);
41 void notifyQuotaLimitReached(const char *name, const char *iface);
42 void notifyInterfaceClassActivity(const char *name, bool isActive,

1234567891011