Lines Matching refs:len
141 size_t len; member
147 struct svcinfo *find_svc(const uint16_t *s16, size_t len) in find_svc() argument
152 if ((len == si->len) && in find_svc()
153 !memcmp(s16, si->name, len * sizeof(uint16_t))) { in find_svc()
164 ALOGI("service '%s' died\n", str8(si->name, si->len)); in svcinfo_death()
177 uint32_t do_find_service(const uint16_t *s, size_t len, uid_t uid, pid_t spid) in do_find_service() argument
179 struct svcinfo *si = find_svc(s, len); in do_find_service()
194 if (!svc_can_find(s, len, spid, uid)) { in do_find_service()
202 const uint16_t *s, size_t len, in do_add_service() argument
211 if (!handle || (len == 0) || (len > 127)) in do_add_service()
214 if (!svc_can_register(s, len, spid, uid)) { in do_add_service()
216 str8(s, len), handle, uid); in do_add_service()
220 si = find_svc(s, len); in do_add_service()
224 str8(s, len), handle, uid); in do_add_service()
229 si = malloc(sizeof(*si) + (len + 1) * sizeof(uint16_t)); in do_add_service()
232 str8(s, len), handle, uid); in do_add_service()
236 si->len = len; in do_add_service()
237 memcpy(si->name, s, (len + 1) * sizeof(uint16_t)); in do_add_service()
238 si->name[len] = '\0'; in do_add_service()
258 size_t len; in svcmgr_handler() local
277 s = bio_get_string16(msg, &len); in svcmgr_handler()
282 if ((len != (sizeof(svcmgr_id) / 2)) || in svcmgr_handler()
284 fprintf(stderr,"invalid id %s\n", str8(s, len)); in svcmgr_handler()
303 s = bio_get_string16(msg, &len); in svcmgr_handler()
307 handle = do_find_service(s, len, txn->sender_euid, txn->sender_pid); in svcmgr_handler()
314 s = bio_get_string16(msg, &len); in svcmgr_handler()
320 if (do_add_service(bs, s, len, handle, txn->sender_euid, in svcmgr_handler()
352 static int audit_callback(void *data, __unused security_class_t cls, char *buf, size_t len) in audit_callback() argument
361 snprintf(buf, len, "service=%s pid=%d uid=%d", ad->name, ad->pid, ad->uid); in audit_callback()