/system/core/libcutils/ |
D | strdup8to16.c | 45 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 …]
|
D | record_stream.c | 47 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 …]
|
D | uio.c | 31 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 …]
|
D | zygote.c | 61 ssize_t ret; in send_request() 93 ret = sendmsg(fd, &msg, MSG_NOSIGNAL); in send_request() 94 } while (ret < 0 && errno == EINTR); in send_request() 96 if (ret < 0) { in send_request() 125 ret = sendmsg(fd, &msg, MSG_NOSIGNAL); in send_request() 126 } while (ret < 0 && errno == EINTR); in send_request() 132 if (ret < 0) { in send_request() 145 ret = recvmsg(fd, &msg, MSG_NOSIGNAL | MSG_WAITALL); in send_request() 146 } while (ret < 0 && errno == EINTR); in send_request() 148 if (ret < 0) { in send_request() [all …]
|
D | ashmem-dev.c | 44 int fd, ret; in ashmem_create_region() local 54 ret = ioctl(fd, ASHMEM_SET_NAME, buf); in ashmem_create_region() 55 if (ret < 0) in ashmem_create_region() 59 ret = ioctl(fd, ASHMEM_SET_SIZE, size); in ashmem_create_region() 60 if (ret < 0) in ashmem_create_region() 67 return ret; in ashmem_create_region()
|
/system/extras/tests/bionic/libc/common/ |
D | test_libgen.c | 13 char* ret; in test_basename() local 22 ret = basename(input); in test_basename() 24 if (ret != NULL) { in test_basename() 27 _input, ret); in test_basename() 39 if (ret == NULL) { in test_basename() 44 else if (strcmp(ret, _expected)) { in test_basename() 46 _input, ret, _expected); in test_basename() 50 _input, ret ); in test_basename() 60 int ret; in test_basename_r() local 62 ret = basename_r(_input, _buff, _bufflen ); in test_basename_r() [all …]
|
D | test_getaddrinfo.c | 20 int ret; in main() local 23 ret = getaddrinfo( SERVER_NAME, PORT_NUMBER, NULL, &res); in main() 24 if (ret != 0) { in main() 25 printf("first getaddrinfo returned error: %s\n", gai_strerror(ret)); in main() 37 ret = getaddrinfo( SERVER_NAME, PORT_NUMBER, &hints, &res ); in main() 38 if (ret != 0) { in main() 39 printf("second getaddrinfo returned error: %s\n", gai_strerror(ret)); in main()
|
/system/bluetooth/bluedroid/ |
D | bttest.c | 28 int ret; in do_enable() local 29 ret = bt_enable(); in do_enable() 30 printf("= %d\n", ret); in do_enable() 31 return ret; in do_enable() 35 int ret; in do_disable() local 36 ret = bt_disable(); in do_disable() 37 printf("= %d\n", ret); in do_disable() 38 return ret; in do_disable() 42 int ret; in do_is_enabled() local 43 ret = bt_is_enabled(); in do_is_enabled() [all …]
|
D | bluetooth.c | 77 int ret = -1; in check_bluetooth_power() local 99 ret = 1; in check_bluetooth_power() 102 ret = 0; in check_bluetooth_power() 108 return ret; in check_bluetooth_power() 114 int ret = -1; in set_bluetooth_power() local 133 ret = 0; in set_bluetooth_power() 137 return ret; in set_bluetooth_power() 152 int ret = -1; in bt_enable() local 188 ret = 0; in bt_enable() 192 return ret; in bt_enable() [all …]
|
/system/core/adb/ |
D | services.c | 140 int ret; in reboot_service() local 143 ret = __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, arg); in reboot_service() 144 if (ret < 0) { in reboot_service() 289 int fd, ret = 0; in shell_service() local 304 ret = poll(ufds, 2, 100); in shell_service() 305 if (ret <= 0) { in shell_service() 306 D("poll returned %d\n", ret); in shell_service() 309 ret = 1; in shell_service() 314 ret = adb_read(fd, buffer + count, sizeof(buffer) - count); in shell_service() 315 D("read fd ret: %d, count: %d\n", ret, count); in shell_service() [all …]
|
D | usb_windows.c | 134 int ret = 0; in known_device() local 138 ret = known_device_locked(dev_name); in known_device() 142 return ret; in known_device() 192 usb_handle* ret = (usb_handle*)malloc(sizeof(usb_handle)); in do_usb_open() local 193 if (NULL == ret) in do_usb_open() 197 ret->next = ret; in do_usb_open() 198 ret->prev = ret; in do_usb_open() 201 ret->adb_interface = AdbCreateInterfaceByName(interface_name); in do_usb_open() 203 if (NULL == ret->adb_interface) { in do_usb_open() 204 free(ret); in do_usb_open() [all …]
|
/system/core/fastboot/ |
D | usb_windows.c | 92 usb_handle* ret = (usb_handle*)malloc(sizeof(usb_handle)); in do_usb_open() local 93 if (NULL == ret) in do_usb_open() 97 ret->adb_interface = AdbCreateInterfaceByName(interface_name); in do_usb_open() 99 if (NULL == ret->adb_interface) { in do_usb_open() 100 free(ret); in do_usb_open() 106 ret->adb_read_pipe = in do_usb_open() 107 AdbOpenDefaultBulkReadEndpoint(ret->adb_interface, in do_usb_open() 110 if (NULL != ret->adb_read_pipe) { in do_usb_open() 112 ret->adb_write_pipe = in do_usb_open() 113 AdbOpenDefaultBulkWriteEndpoint(ret->adb_interface, in do_usb_open() [all …]
|
/system/wlan/ti/sta_dk_4_0_4_32/wpa_supplicant_lib/ |
D | driver_ti.c | 260 int ret; in wpa_driver_tista_set_ssid() local 274 ret = (int)TI_SetSSID( myDrv->hDriver, (char *)ssidBuf ); in wpa_driver_tista_set_ssid() 276 ret = (int)TI_SetSSID( myDrv->hDriver, (u8 *)ssidBuf ); in wpa_driver_tista_set_ssid() 278 return( TI2WPA_STATUS(ret) ); in wpa_driver_tista_set_ssid() 327 int ret; in wpa_driver_tista_set_wpa_options() local 357 ret = TI_SetWpaOptions( myDrv->hDriver, wpa_opt ); in wpa_driver_tista_set_wpa_options() 358 return( TI2WPA_STATUS(ret) ); in wpa_driver_tista_set_wpa_options() 372 int ret = -1; in wpa_driver_tista_set_encryption() local 403 ret = TI_SetEncryptionType( myDrv->hDriver, wpa_cipher ); in wpa_driver_tista_set_encryption() 404 return( TI2WPA_STATUS(ret) ); in wpa_driver_tista_set_encryption() [all …]
|
/system/extras/tests/bionic/libc/other/ |
D | test_zlib.c | 47 int ret, flush; in def() local 57 ret = deflateInit(&strm, level); in def() 58 if (ret != Z_OK) in def() 59 return ret; in def() 76 ret = deflate(&strm, flush); /* no bad return value */ in def() 95 int ret; in inf() local 107 ret = inflateInit(&strm); in inf() 108 if (ret != Z_OK) in inf() 109 return ret; in inf() 126 ret = inflate(&strm, Z_NO_FLUSH); in inf() [all …]
|
/system/core/toolbox/ |
D | iftop.c | 73 int s, ret; in get_mtu() local 85 ret = ioctl(s, SIOCGIFMTU, &ifr); in get_mtu() 86 if (ret < 0) { in get_mtu() 91 ret = close(s); in get_mtu() 92 if (ret < 0) { in get_mtu() 104 int ret, nr, fd; in get_interfaces() local 112 ret = read(fd, buf, sizeof(buf) - 1); in get_interfaces() 113 if (ret < 0) { in get_interfaces() 116 } else if (!ret) { in get_interfaces() 120 buf[ret] = '\0'; in get_interfaces() [all …]
|
D | wipe.c | 61 int ret; in wipe_main() local 66 ret = reboot(RB_AUTOBOOT); in wipe_main() 67 if (ret < 0) { in wipe_main() 85 int ret; in wipe() local 118 ret = lstat (nameBuffer, &statBuffer); in wipe() 120 if (ret != 0) { in wipe() 143 ret = rmdir(newpath); in wipe() 144 if (ret != 0) { in wipe() 165 ret = unlink(nameBuffer); in wipe() 167 if (ret != 0) { in wipe()
|
D | ln.c | 15 int ret; in ln_main() local 27 ret = symlink(argv[1], argv[2]); in ln_main() 29 ret = link(argv[1], argv[2]); in ln_main() 31 if(ret < 0) in ln_main() 33 return ret; in ln_main()
|
D | insmod.c | 15 int ret, fd; in read_file() local 36 ret = read(fd, buffer, size); in read_file() 37 if (ret != size) in read_file() 54 int ret; in insmod_main() local 86 ret = init_module(file, size, opts); in insmod_main() 87 if (ret != 0) { in insmod_main() 96 return ret; in insmod_main()
|
D | dmesg.c | 15 ssize_t ret; in dmesg_main() local 31 while((ret = write(STDOUT_FILENO, p, n))) { in dmesg_main() 32 if (ret == -1) { in dmesg_main() 38 p += ret; in dmesg_main() 39 n -= ret; in dmesg_main()
|
D | reboot.c | 9 int ret; in reboot_main() local 45 ret = __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_POWER_OFF, NULL); in reboot_main() 47 … ret = __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, argv[optind]); in reboot_main() 49 ret = reboot(RB_AUTOBOOT); in reboot_main() 50 if(ret < 0) { in reboot_main()
|
D | mkdir.c | 15 int ret; in mkdir_main() local 21 ret = mkdir(argv[0], 0777); in mkdir_main() 22 if(ret < 0) { in mkdir_main() 24 return ret; in mkdir_main()
|
D | rmdir.c | 15 int ret; in rmdir_main() local 21 ret = rmdir(argv[0]); in rmdir_main() 22 if(ret < 0) { in rmdir_main() 24 return ret; in rmdir_main()
|
D | renice.c | 123 int ret; in renice_main() local 125 ret = sched_setscheduler(pid, SCHED_RR, &sp); in renice_main() 126 if (ret) { in renice_main() 131 int ret; in renice_main() local 133 ret = setpriority(PRIO_PROCESS, pid, prio); in renice_main() 134 if (ret) { in renice_main()
|
/system/core/init/ |
D | bootchart.c | 52 int ret; in unix_read() local 53 do { ret = read(fd, buff, len); } while (ret < 0 && errno == EINTR); in unix_read() 54 return ret; in unix_read() 60 int ret; in unix_write() local 61 do { ret = write(fd, buff, len); } while (ret < 0 && errno == EINTR); in unix_write() 62 return ret; in unix_write() 188 int fd, ret, len; in do_log_uptime() local 192 int ret; in do_log_uptime() local 193 ret = unix_read(fd, buff, 64); in do_log_uptime() 196 if (ret >= 0) { in do_log_uptime() [all …]
|
D | builtins.c | 46 int fd, ret, len; in write_file() local 56 ret = write(fd, value, len); in write_file() 57 } while (ret < 0 && errno == EINTR); in write_file() 60 if (ret < 0) { in write_file() 71 int ret; in insmod() local 77 ret = init_module(module, size, options); in insmod() 81 return ret; in insmod() 86 int fd, ret; in setkey() local 92 ret = ioctl(fd, KDSKBENT, kbe); in setkey() 95 return ret; in setkey() [all …]
|