Home
last modified time | relevance | path

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

12345678910

/system/media/camera/src/
Dcamera_metadata_tag_info.c699 int ret = -1; in camera_metadata_enum_snprint() local
706 ret = 0; in camera_metadata_enum_snprint()
710 ret = 0; in camera_metadata_enum_snprint()
714 ret = 0; in camera_metadata_enum_snprint()
731 ret = 0; in camera_metadata_enum_snprint()
735 ret = 0; in camera_metadata_enum_snprint()
739 ret = 0; in camera_metadata_enum_snprint()
754 ret = 0; in camera_metadata_enum_snprint()
758 ret = 0; in camera_metadata_enum_snprint()
762 ret = 0; in camera_metadata_enum_snprint()
[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/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/libsparse/
Dsparse_read.c104 int ret; in process_raw_chunk() local
116 ret = sparse_file_add_fd(s, fd, offset, len, block); in process_raw_chunk()
117 if (ret < 0) { in process_raw_chunk()
118 return ret; in process_raw_chunk()
124 ret = read_all(fd, copybuf, chunk); in process_raw_chunk()
125 if (ret < 0) { in process_raw_chunk()
126 return ret; in process_raw_chunk()
141 int ret; in process_fill_chunk() local
152 ret = read_all(fd, &fill_val, sizeof(fill_val)); in process_fill_chunk()
153 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 …]
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/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/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.cpp194 int ret; in sendNetlinkRequest() local
205 (ret = recv(sock, &response, sizeof(response), 0)) != -1) { in sendNetlinkRequest()
206 if (ret == sizeof(response)) { in sendNetlinkRequest()
207 ret = response.err.error; // Netlink errors are negative errno. in sendNetlinkRequest()
208 if (ret) { in sendNetlinkRequest()
209 ALOGE("netlink response contains error (%s)", strerror(-ret)); in sendNetlinkRequest()
212 ALOGE("bad netlink response message size (%d != %zu)", ret, sizeof(response)); in sendNetlinkRequest()
213 ret = -EBADMSG; in sendNetlinkRequest()
217 ret = -errno; in sendNetlinkRequest()
224 return ret; in sendNetlinkRequest()
[all …]
/system/core/libprocessgroup/
Dprocessgroup.cpp68 int ret; in initCtx() local
75 ret = -errno; in initCtx()
77 return ret; in initCtx()
95 ssize_t ret = read(ctx->fd, ctx->buf_ptr + ctx->buf_len, in refillBuffer() local
97 if (ret < 0) { in refillBuffer()
99 } else if (ret == 0) { in refillBuffer()
103 ctx->buf_len += ret; in refillBuffer()
105 SLOGV("Read %zd to buffer: %s", ret, ctx->buf); in refillBuffer()
109 return ret; in refillBuffer()
115 int ret = initCtx(uid, appProcessPid, ctx); in getOneAppProcess() local
[all …]
/system/gatekeeper/tests/
Dgatekeeper_device_test.cpp38 int ret; in gatekeeper_device_initialize() local
40 ret = hw_get_module_by_class(GATEKEEPER_HARDWARE_MODULE_ID, NULL, &mod); in gatekeeper_device_initialize()
42 ASSERT_EQ(0, ret); in gatekeeper_device_initialize()
44 ret = gatekeeper_open(mod, dev); in gatekeeper_device_initialize()
46 ASSERT_EQ(0, ret); in gatekeeper_device_initialize()
59 int ret; in TEST_F() local
61 ret = device->enroll(device, 0, NULL, 0, NULL, 0, password_payload, password_len, in TEST_F()
64 ASSERT_EQ(0, ret); in TEST_F()
67 ret = device->verify(device, 0, 0, password_handle, password_handle_length, in TEST_F()
70 ASSERT_EQ(0, ret); in TEST_F()
[all …]
/system/core/liblog/
Duio.c31 int ret = read( fd, buf, len ); in readv() local
32 if (ret < 0) { in readv()
37 if (ret == 0) in readv()
40 total += ret; in readv()
41 buf += ret; in readv()
42 len -= ret; in readv()
58 int ret = write( fd, buf, len ); in writev() local
59 if (ret < 0) { in writev()
64 if (ret == 0) in writev()
67 total += ret; in writev()
[all …]
Dlog_read.c225 int ret; in android_name_to_log_id() local
237 for(ret = LOG_ID_MIN; ret < LOG_ID_MAX; ++ret) { in android_name_to_log_id()
238 const char *l = LOG_NAME[ret]; in android_name_to_log_id()
240 return ret; in android_name_to_log_id()
286 ssize_t ret; in send_log_msg() local
301 ret = TEMP_FAILURE_RETRY(write(sock, buf, len)); in send_log_msg()
302 if (ret <= 0) { in send_log_msg()
308 while ((ret = TEMP_FAILURE_RETRY(read(sock, cp, len))) > 0) { in send_log_msg()
311 if (((size_t)ret == len) || (buf_size < PAGE_SIZE)) { in send_log_msg()
315 len -= ret; in send_log_msg()
[all …]
Dlog_time.cpp52 char *ret = const_cast<char *> (s); in strptime() local
57 ret = ::strptime(ret, f, ptm); in strptime()
70 ret = ::strptime(ret, f, ptm); in strptime()
71 if (!ret) { in strptime()
76 while (isdigit(*ret)) { in strptime()
77 tv_sec = tv_sec * 10 + *ret - '0'; in strptime()
78 ++ret; in strptime()
99 ret = ::strptime(ret, f, ptm); in strptime()
100 if (!ret) { in strptime()
109 while (isdigit(*ret) && num && (mul > 1)) { in strptime()
[all …]
/system/bt/osi/src/
Dfuture.c38 future_t *ret = osi_calloc(sizeof(future_t)); in future_new() local
39 if (!ret) { in future_new()
44 ret->semaphore = semaphore_new(0); in future_new()
45 if (!ret->semaphore) { in future_new()
50 ret->ready_can_be_called = true; in future_new()
51 return ret; in future_new()
53 future_free(ret); in future_new()
58 future_t *ret = osi_calloc(sizeof(future_t)); in future_new_immediate() local
59 if (!ret) { in future_new_immediate()
64 ret->result = value; in future_new_immediate()
[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\n", 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 …]
Dadb_auth_client.cpp59 int ret; in read_keys() local
80 ret = __b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4); in read_keys()
81 if (ret != sizeof(key->key)) { in read_keys()
82 D("%s: Invalid base64 data ret=%d\n", file, ret); in read_keys()
129 int ret; in adb_auth_generate_token() local
135 ret = fread(token, token_size, 1, f); in adb_auth_generate_token()
138 return ret * token_size; in adb_auth_generate_token()
145 int ret = 0; in adb_auth_verify() local
154 ret = RSA_verify(&key->key, sig, siglen, token, SHA_DIGEST_SIZE); in adb_auth_verify()
155 if (ret) in adb_auth_verify()
[all …]
Dusb_windows.cpp138 int ret = 0; in known_device() local
142 ret = known_device_locked(dev_name); in known_device()
146 return ret; in known_device()
196 usb_handle* ret = (usb_handle*)malloc(sizeof(usb_handle)); in do_usb_open() local
197 if (NULL == ret) in do_usb_open()
201 ret->next = ret; in do_usb_open()
202 ret->prev = ret; in do_usb_open()
205 ret->adb_interface = AdbCreateInterfaceByName(interface_name); in do_usb_open()
207 if (NULL == ret->adb_interface) { in do_usb_open()
208 free(ret); in do_usb_open()
[all …]
/system/bt/btif/src/
Dbtif_sock_util.c74 int ret; in sock_send_all() local
77 do ret = send(sock_fd, buf, s, 0); in sock_send_all()
78 while(ret < 0 && errno == EINTR); in sock_send_all()
79 if(ret <= 0) in sock_send_all()
81 BTIF_TRACE_ERROR("sock fd:%d send errno:%d, ret:%d", sock_fd, errno, ret); in sock_send_all()
84 buf += ret; in sock_send_all()
85 s -= ret; in sock_send_all()
92 int ret = -1; in sock_recv_all() local
95 do ret = recv(sock_fd, buf, r, MSG_WAITALL); in sock_recv_all()
96 while(ret < 0 && errno == EINTR); in sock_recv_all()
[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()
111 int ret = 0; in adf_get_device_data() local
131 ret = -ENOMEM; in adf_get_device_data()
139 ret = -ENOMEM; in adf_get_device_data()
[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/core/fastboot/
Dusb_windows.c94 usb_handle* ret = (usb_handle*)malloc(sizeof(usb_handle)); in do_usb_open() local
95 if (NULL == ret) in do_usb_open()
99 ret->adb_interface = AdbCreateInterfaceByName(interface_name); in do_usb_open()
101 if (NULL == ret->adb_interface) { in do_usb_open()
102 free(ret); in do_usb_open()
108 ret->adb_read_pipe = in do_usb_open()
109 AdbOpenDefaultBulkReadEndpoint(ret->adb_interface, in do_usb_open()
112 if (NULL != ret->adb_read_pipe) { in do_usb_open()
114 ret->adb_write_pipe = in do_usb_open()
115 AdbOpenDefaultBulkWriteEndpoint(ret->adb_interface, in do_usb_open()
[all …]

12345678910