Home
last modified time | relevance | path

Searched refs:ret (Results 1 – 25 of 352) sorted by relevance

12345678910>>...15

/system/media/camera/src/
Dcamera_metadata_tag_info.c711 int ret = -1; in camera_metadata_enum_snprint() local
718 ret = 0; in camera_metadata_enum_snprint()
722 ret = 0; in camera_metadata_enum_snprint()
726 ret = 0; in camera_metadata_enum_snprint()
743 ret = 0; in camera_metadata_enum_snprint()
747 ret = 0; in camera_metadata_enum_snprint()
751 ret = 0; in camera_metadata_enum_snprint()
766 ret = 0; in camera_metadata_enum_snprint()
770 ret = 0; in camera_metadata_enum_snprint()
774 ret = 0; in camera_metadata_enum_snprint()
[all …]
/system/security/keystore/
Dkeystore_cli.cpp50 int32_t ret = service->cmd(); \
51 if (ret < 0) { \
52 fprintf(stderr, "%s: could not connect: %d\n", argv[0], ret); \
55 printf(#cmd ": %s (%d)\n", responses[ret], ret); \
68 int32_t ret = service->cmd(String16(argv[2])); \
69 if (ret < 0) { \
70 fprintf(stderr, "%s: could not connect: %d\n", argv[0], ret); \
73 printf(#cmd ": %s (%d)\n", responses[ret], ret); \
86 int32_t ret = service->cmd(atoi(argv[2])); \
87 if (ret < 0) { \
[all …]
/system/core/libion/
Dion.c44 int ret = close(fd); in ion_close() local
45 if (ret < 0) in ion_close()
47 return ret; in ion_close()
52 int ret = ioctl(fd, req, arg); in ion_ioctl() local
53 if (ret < 0) { in ion_ioctl()
55 ret, strerror(errno)); in ion_ioctl()
58 return ret; in ion_ioctl()
64 int ret; in ion_alloc() local
75 ret = ion_ioctl(fd, ION_IOC_ALLOC, &data); in ion_alloc()
76 if (ret < 0) in ion_alloc()
[all …]
/system/gatekeeper/tests/
Dgatekeeper_device_test.cpp40 int ret; in gatekeeper_device_initialize() local
42 ret = hw_get_module_by_class(GATEKEEPER_HARDWARE_MODULE_ID, NULL, &mod); in gatekeeper_device_initialize()
44 ASSERT_EQ(0, ret); in gatekeeper_device_initialize()
46 ret = gatekeeper_open(mod, dev); in gatekeeper_device_initialize()
48 ASSERT_EQ(0, ret); in gatekeeper_device_initialize()
61 int ret; in TEST_F() local
63 ret = device->enroll(device, 400, NULL, 0, NULL, 0, password_payload, password_len, in TEST_F()
66 ASSERT_EQ(0, ret); in TEST_F()
70 ret = device->verify(device, 400, 0, password_handle, password_handle_length, in TEST_F()
73 ASSERT_EQ(0, ret); in TEST_F()
[all …]
/system/core/libsparse/
Dsparse_read.c105 int ret; in process_raw_chunk() local
117 ret = sparse_file_add_fd(s, fd, offset, len, block); in process_raw_chunk()
118 if (ret < 0) { in process_raw_chunk()
119 return ret; in process_raw_chunk()
125 ret = read_all(fd, copybuf, chunk); in process_raw_chunk()
126 if (ret < 0) { in process_raw_chunk()
127 return ret; in process_raw_chunk()
142 int ret; in process_fill_chunk() local
153 ret = read_all(fd, &fill_val, sizeof(fill_val)); in process_fill_chunk()
154 if (ret < 0) { in process_fill_chunk()
[all …]
Doutput_file.c128 off64_t ret; in file_skip() local
131 ret = lseek64(outn->fd, cnt, SEEK_CUR); in file_skip()
132 if (ret < 0) { in file_skip()
141 int ret; in file_pad() local
144 ret = ftruncate64(outn->fd, len); in file_pad()
145 if (ret < 0) { in file_pad()
154 int ret; in file_write() local
157 ret = write(outn->fd, data, len); in file_write()
158 if (ret < 0) { in file_write()
161 } else if (ret < len) { in file_write()
[all …]
/system/core/libcutils/
Dstrdup8to16.c45 char16_t *ret; in strdup8to16() local
57 ret = (char16_t *) malloc (sizeof(char16_t) * len); in strdup8to16()
59 return strcpy8to16 (ret, s, out_len); in strdup8to16()
114 uint32_t ret; in getUtf32FromUtf8() local
130 ret = (**pUtf8Ptr) & leaderMask [seq_len - 1]; in getUtf32FromUtf8()
132 if (**pUtf8Ptr == '\0') return ret; in getUtf32FromUtf8()
139 UTF8_SHIFT_AND_MASK(ret, **pUtf8Ptr); in getUtf32FromUtf8()
142 return ret; in getUtf32FromUtf8()
157 uint32_t ret; in strcpy8to16() local
159 ret = getUtf32FromUtf8(&utf8Str); in strcpy8to16()
[all …]
Dashmem-dev.c51 int ret; in __ashmem_open_locked() local
59 ret = TEMP_FAILURE_RETRY(fstat(fd, &st)); in __ashmem_open_locked()
60 if (ret < 0) { in __ashmem_open_locked()
64 return ret; in __ashmem_open_locked()
145 int ret, save_errno; in ashmem_create_region() local
156 ret = TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_SET_NAME, buf)); in ashmem_create_region()
157 if (ret < 0) { in ashmem_create_region()
162 ret = TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_SET_SIZE, size)); in ashmem_create_region()
163 if (ret < 0) { in ashmem_create_region()
173 return ret; in ashmem_create_region()
[all …]
Drecord_stream.c47 RecordStream *ret; in record_stream_new() local
51 ret = (RecordStream *)calloc(1, sizeof(RecordStream)); in record_stream_new()
53 ret->fd = fd; in record_stream_new()
54 ret->maxRecordLen = maxRecordLen; in record_stream_new()
55 ret->buffer = (unsigned char *)malloc (maxRecordLen + HEADER_SIZE); in record_stream_new()
57 ret->unconsumed = ret->buffer; in record_stream_new()
58 ret->read_end = ret->buffer; in record_stream_new()
59 ret->buffer_end = ret->buffer + maxRecordLen + HEADER_SIZE; in record_stream_new()
61 return ret; in record_stream_new()
130 void *ret; in record_stream_get_next() local
[all …]
/system/netd/server/
DPhysicalNetwork.cpp28 if (int ret = RouteController::addInterfaceToDefaultNetwork(interface.c_str(), permission)) { in addToDefault() local
30 return ret; in addToDefault()
32 if (int ret = delegate->addFallthrough(interface, permission)) { in addToDefault() local
33 return ret; in addToDefault()
41 if (int ret = RouteController::removeInterfaceFromDefaultNetwork(interface.c_str(), in removeFromDefault() local
44 return ret; in removeFromDefault()
46 if (int ret = delegate->removeFallthrough(interface, permission)) { in removeFromDefault() local
47 return ret; in removeFromDefault()
73 if (int ret = RouteController::modifyPhysicalNetworkPermission(mNetId, interface.c_str(), in setPermission() local
77 return ret; in setPermission()
[all …]
DRouteController.cpp204 int ret; in sendNetlinkRequest() local
215 (ret = recv(sock, &response, sizeof(response), 0)) != -1) { in sendNetlinkRequest()
216 if (ret == sizeof(response)) { in sendNetlinkRequest()
217 ret = response.err.error; // Netlink errors are negative errno. in sendNetlinkRequest()
218 if (ret) { in sendNetlinkRequest()
219 ALOGE("netlink response contains error (%s)", strerror(-ret)); in sendNetlinkRequest()
222 ALOGE("bad netlink response message size (%d != %zu)", ret, sizeof(response)); in sendNetlinkRequest()
223 ret = -EBADMSG; in sendNetlinkRequest()
227 ret = -errno; in sendNetlinkRequest()
234 return ret; in sendNetlinkRequest()
[all …]
/system/core/liblog/
Dlogd_reader.c266 ssize_t ret; in send_log_msg() local
281 ret = TEMP_FAILURE_RETRY(write(sock, buf, len)); in send_log_msg()
282 if (ret <= 0) { in send_log_msg()
288 while ((ret = TEMP_FAILURE_RETRY(read(sock, cp, len))) > 0) { in send_log_msg()
291 if (((size_t)ret == len) || (buf_size < PAGE_SIZE)) { in send_log_msg()
295 len -= ret; in send_log_msg()
296 cp += ret; in send_log_msg()
303 ret = TEMP_FAILURE_RETRY(poll(&p, 1, 20)); in send_log_msg()
305 if (ret <= 0) { in send_log_msg()
310 ret = 0; in send_log_msg()
[all …]
Duio.c34 int ret = read( fd, buf, len ); in readv() local
35 if (ret < 0) { in readv()
40 if (ret == 0) in readv()
43 total += ret; in readv()
44 buf += ret; in readv()
45 len -= ret; in readv()
61 int ret = write( fd, buf, len ); in writev() local
62 if (ret < 0) { in writev()
67 if (ret == 0) in writev()
70 total += ret; in writev()
[all …]
Dlog_event_write.c31 int ret = -EINVAL; in __android_log_error_write() local
36 ret = -ENOMEM; in __android_log_error_write()
38 ret = android_log_write_string8_len(ctx, subTag, MAX_SUBTAG_LEN); in __android_log_error_write()
39 if (ret >= 0) { in __android_log_error_write()
40 ret = android_log_write_int32(ctx, uid); in __android_log_error_write()
41 if (ret >= 0) { in __android_log_error_write()
42 ret = android_log_write_string8_len(ctx, data, dataLen); in __android_log_error_write()
43 if (ret >= 0) { in __android_log_error_write()
44 ret = android_log_write_list(ctx, LOG_ID_EVENTS); in __android_log_error_write()
51 return ret; in __android_log_error_write()
Dlog_time.cpp53 char *ret = const_cast<char *> (s); in strptime() local
58 ret = ::strptime(ret, f, ptm); in strptime()
71 ret = ::strptime(ret, f, ptm); in strptime()
72 if (!ret) { in strptime()
77 while (isdigit(*ret)) { in strptime()
78 tv_sec = tv_sec * 10 + *ret - '0'; in strptime()
79 ++ret; in strptime()
100 ret = ::strptime(ret, f, ptm); in strptime()
101 if (!ret) { in strptime()
110 while (isdigit(*ret) && num && (mul > 1)) { in strptime()
[all …]
Dlogd_writer.c67 int i, ret = 0; in logdOpen() local
72 ret = -errno; in logdOpen()
74 ret = -errno; in logdOpen()
84 ret = -errno; in logdOpen()
92 return ret; in logdOpen()
120 ssize_t ret; in logdWrite() local
181 ret = TEMP_FAILURE_RETRY(writev(logdLoggerWrite.context.sock, newVec, 2)); in logdWrite()
182 if (ret != (ssize_t)(sizeof(header) + sizeof(buffer))) { in logdWrite()
201 ret = TEMP_FAILURE_RETRY(writev(logdLoggerWrite.context.sock, newVec, 2)); in logdWrite()
202 if (ret != (ssize_t)(sizeof(header) + sizeof(buffer))) { in logdWrite()
[all …]
/system/core/libsuspend/
Dautosuspend.c68 int ret; in autosuspend_enable() local
70 ret = autosuspend_init(); in autosuspend_enable()
71 if (ret) { in autosuspend_enable()
72 return ret; in autosuspend_enable()
81 ret = autosuspend_ops->enable(); in autosuspend_enable()
82 if (ret) { in autosuspend_enable()
83 return ret; in autosuspend_enable()
92 int ret; in autosuspend_disable() local
94 ret = autosuspend_init(); in autosuspend_disable()
95 if (ret) { in autosuspend_disable()
[all …]
Dautosuspend_wakeup_count.c49 int ret; in suspend_thread_func() local
70 ret = sem_wait(&suspend_lockout); in suspend_thread_func()
71 if (ret < 0) { in suspend_thread_func()
79 ret = TEMP_FAILURE_RETRY(write(wakeup_count_fd, wakeup_count, wakeup_count_len)); in suspend_thread_func()
80 if (ret < 0) { in suspend_thread_func()
85 ret = TEMP_FAILURE_RETRY(write(state_fd, sleep_state, strlen(sleep_state))); in suspend_thread_func()
86 if (ret < 0) { in suspend_thread_func()
96 ret = sem_post(&suspend_lockout); in suspend_thread_func()
97 if (ret < 0) { in suspend_thread_func()
108 int ret; in autosuspend_wakeup_count_enable() local
[all …]
Dautosuspend_earlysuspend.c99 int ret; in autosuspend_earlysuspend_enable() local
103 ret = write(sPowerStatefd, pwr_state_mem, strlen(pwr_state_mem)); in autosuspend_earlysuspend_enable()
104 if (ret < 0) { in autosuspend_earlysuspend_enable()
123 return ret; in autosuspend_earlysuspend_enable()
129 int ret; in autosuspend_earlysuspend_disable() local
133 ret = TEMP_FAILURE_RETRY(write(sPowerStatefd, pwr_state_on, strlen(pwr_state_on))); in autosuspend_earlysuspend_disable()
134 if (ret < 0) { in autosuspend_earlysuspend_disable()
153 return ret; in autosuspend_earlysuspend_disable()
164 int ret; in start_earlysuspend_thread() local
166 ret = access(EARLYSUSPEND_WAIT_FOR_FB_SLEEP, F_OK); in start_earlysuspend_thread()
[all …]
/system/core/libprocessgroup/
Dprocessgroup.cpp107 int ret; in initCtx() local
114 ret = -errno; in initCtx()
116 return ret; in initCtx()
134 ssize_t ret = read(ctx->fd, ctx->buf_ptr + ctx->buf_len, in refillBuffer() local
136 if (ret < 0) { in refillBuffer()
138 } else if (ret == 0) { in refillBuffer()
142 ctx->buf_len += ret; in refillBuffer()
144 SLOGV("Read %zd to buffer: %s", ret, ctx->buf); in refillBuffer()
148 return ret; in refillBuffer()
154 int ret = initCtx(uid, appProcessPid, ctx); in getOneAppProcess() local
[all …]
/system/extras/bootctl/
Dbootctl.c84 int ret = module->markBootSuccessful(module); in do_mark_boot_successful() local
85 if (ret == 0) in do_mark_boot_successful()
88 strerror(-ret)); in do_mark_boot_successful()
95 int ret = module->setActiveBootSlot(module, slot_number); in do_set_active_boot_slot() local
96 if (ret == 0) in do_set_active_boot_slot()
98 fprintf(stderr, "Error setting active boot slot: %s\n", strerror(-ret)); in do_set_active_boot_slot()
105 int ret = module->setSlotAsUnbootable(module, slot_number); in do_set_slot_as_unbootable() local
106 if (ret == 0) in do_set_slot_as_unbootable()
108 fprintf(stderr, "Error setting slot as unbootable: %s\n", strerror(-ret)); in do_set_slot_as_unbootable()
115 int ret = module->isSlotBootable(module, slot_number); in do_is_slot_bootable() local
[all …]
/system/core/adb/
Dadb_auth.cpp37 int ret; in send_auth_request() local
39 ret = adb_auth_generate_token(t->token, sizeof(t->token)); in send_auth_request()
40 if (ret != sizeof(t->token)) { in send_auth_request()
41 D("Error generating token ret=%d", ret); in send_auth_request()
46 memcpy(p->data, t->token, ret); in send_auth_request()
49 p->msg.data_length = ret; in send_auth_request()
57 int ret; in send_auth_response() local
59 ret = adb_auth_sign(t->key, token, token_size, p->data); in send_auth_response()
60 if (!ret) { in send_auth_response()
68 p->msg.data_length = ret; in send_auth_response()
[all …]
/system/core/fingerprintd/
DIFingerprintDaemon.cpp57 const int32_t ret = authenticate(sessionId, groupId); in onTransact() local
59 reply->writeInt32(ret); in onTransact()
67 const int32_t ret = stopAuthentication(); in onTransact() local
69 reply->writeInt32(ret); in onTransact()
81 const int32_t ret = enroll(token, tokenSize, groupId, timeout); in onTransact() local
83 reply->writeInt32(ret); in onTransact()
91 const int32_t ret = stopEnrollment(); in onTransact() local
93 reply->writeInt32(ret); in onTransact()
101 const uint64_t ret = preEnroll(); in onTransact() local
103 reply->writeInt64(ret); in onTransact()
[all …]
/system/update_engine/
Dboot_control_android.cc70 int ret; in Init() local
72 ret = hw_get_module(BOOT_CONTROL_HARDWARE_MODULE_ID, &hw_module); in Init()
73 if (ret != 0) { in Init()
161 int ret = module_->isSlotBootable(module_, slot); in IsSlotBootable() local
162 if (ret < 0) { in IsSlotBootable()
164 << " is bootable: " << strerror(-ret); in IsSlotBootable()
167 return ret == 1; in IsSlotBootable()
171 int ret = module_->setSlotAsUnbootable(module_, slot); in MarkSlotUnbootable() local
172 if (ret < 0) { in MarkSlotUnbootable()
174 << " as bootable: " << strerror(-ret); in MarkSlotUnbootable()
[all …]
/system/core/adf/libadf/
Dadf.c39 ssize_t ret; in adf_find_nodes() local
52 ret = -errno; in adf_find_nodes()
60 ret = -ENOMEM; in adf_find_nodes()
69 ret = -errno; in adf_find_nodes()
71 ret = n; in adf_find_nodes()
75 if (ret < 0) in adf_find_nodes()
79 return ret; in adf_find_nodes()
110 int ret = 0; in adf_get_device_data() local
130 ret = -ENOMEM; in adf_get_device_data()
138 ret = -ENOMEM; in adf_get_device_data()
[all …]

12345678910>>...15