Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 226) sorted by relevance

12345678910

/device/asus/flo/conn_init/
Dwfc_util_fctrl.c55 static void wfc_util_finsert_new_string(int fd, char **ppReadedBuff, char *pNewStringValue, char *p… in wfc_util_finsert_new_string() argument
62 if( 0 == fd || NULL == pNewStringValue || 0 == strlen(pNewStringValue) ) { in wfc_util_finsert_new_string()
83 sz_file = lseek( fd, 0, SEEK_END ); in wfc_util_finsert_new_string()
101 lseek( fd, (int)(pSPointer-pReadBuff), SEEK_SET ); in wfc_util_finsert_new_string()
102 write( fd, pNewStringValue, strlen(pNewStringValue)); in wfc_util_finsert_new_string()
112 lseek( fd, (int)(pETagPointer-pReadBuff), SEEK_SET ); in wfc_util_finsert_new_string()
113 write( fd, pBackupBuff, sz_backupBuff ); in wfc_util_finsert_new_string()
115 …ftruncate(fd, sz_file + strlen(pNewStringValue) - 1); /* we use "-1" becasue of "pSPointer = pETag… in wfc_util_finsert_new_string()
132 static void wfc_util_fupdate_string(int fd, char **ppReadedBuff, in wfc_util_fupdate_string() argument
139 if( 0 == fd ) { in wfc_util_fupdate_string()
[all …]
/device/generic/goldfish/qemud/
Dqemud.c209 fd_read(int fd, void* to, int len) in fd_read() argument
214 ret = read(fd, to, len); in fd_read()
221 fd_write(int fd, const void* from, int len) in fd_write() argument
226 ret = write(fd, from, len); in fd_write()
233 fd_setnonblock(int fd) in fd_setnonblock() argument
238 flags = fcntl(fd, F_GETFD); in fd_setnonblock()
243 __FUNCTION__, fd, strerror(errno) ); in fd_setnonblock()
247 ret = fcntl(fd, F_SETFD, flags | O_NONBLOCK); in fd_setnonblock()
252 __FUNCTION__, fd, strerror(errno) ); in fd_setnonblock()
258 fd_accept(int fd) in fd_accept() argument
[all …]
/device/moto/shamu/camera/QCamera2/stack/mm-camera-test/inc/
Dmm_qcamera_socket.h53 #define __FD_SET(fd, fdsetp) \ argument
54 (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] |= (1<<((fd) & 31)))
57 #define __FD_CLR(fd, fdsetp) \ argument
58 (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] &= ~(1<<((fd) & 31)))
61 #define __FD_ISSET(fd, fdsetp) \ argument
62 ((((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] & (1<<((fd) & 31))) != 0)
/device/generic/goldfish/sensors/
Dsensors_qemu.c134 int fd; member
167 if (dev->fd < 0) { in sensor_device_get_fd_locked()
168 dev->fd = qemud_channel_open(SENSORS_SERVICE_NAME); in sensor_device_get_fd_locked()
169 if (dev->fd < 0) { in sensor_device_get_fd_locked()
176 return dev->fd; in sensor_device_get_fd_locked()
184 int fd = sensor_device_get_fd_locked(dev); in sensor_device_send_command_locked() local
185 if (fd < 0) { in sensor_device_send_command_locked()
186 return fd; in sensor_device_send_command_locked()
190 if (qemud_channel_send(fd, cmd, strlen(cmd)) < 0) { in sensor_device_send_command_locked()
192 E("%s(fd=%d): ERROR: %s", __FUNCTION__, fd, strerror(errno)); in sensor_device_send_command_locked()
[all …]
/device/asus/flo/charger_touch/
Dcharger_touch.c37 int fd = open(path, O_RDONLY, 0); in read_path() local
40 if (fd < 0) { in read_path()
44 count = read(fd, buf, size); in read_path()
46 close(fd); in read_path()
51 int fd = open(TOUCH_PATH, O_RDWR, 0); in write_path() local
54 if (fd < 0) { in write_path()
60 write(fd, buf, 1); in write_path()
62 close(fd); in write_path()
/device/moto/shamu/camera/QCamera/stack/mm-camera-test/inc/
Dmm_qcamera_main_menu.h377 int8_t (*getPicture)(int fd, struct crop_info *cropInfo );
382 int8_t (*getMaxZoom)(int fd, void *pZm);
394 int8_t (*sethjr) (int fd, int8_t hjr_status);
395 int8_t (*setLensShading) (int fd, int8_t rolloff_status);
396 int8_t (*setLedMode) (int fd, led_mode_t led_mode);
397 int8_t (*getSharpness_AF) (int fd, int32_t *sharpness);
398 int8_t (*setMotionIso) (int fd, motion_iso_t motion_iso);
399 int8_t (*setHue) (int fd, int32_t hue);
400 int8_t (*cancelAF) (int fd);
401 int8_t (*getAfStep) (int fd, int32_t *afStep);
[all …]
/device/lge/hammerhead/libsensors/
DLightSensor.cpp54 int fd; in setDelay() local
60 fd = open(sysfs, O_RDWR); in setDelay()
61 if (fd >= 0) { in setDelay()
64 write(fd, buf, sizeof(buf)); in setDelay()
65 close(fd); in setDelay()
88 int fd = open(sysfs, O_RDWR); in enable() local
89 if (fd < 0) { in enable()
98 write(fd, buf, sizeof(buf)); in enable()
99 close(fd); in enable()
/device/moto/shamu/camera/QCamera/stack/mm-camera-interface/src/
Dmm_camera_stream.c129 rc = ioctl(my_obj->fd, MSM_CAM_V4L2_IOCTL_PRIVATE_G_CTRL, &v4l2_ioctl); in get_stream_inst_handle()
139 my_obj->ext_image_mode, my_obj->fd, my_obj->state, rc); in get_stream_inst_handle()
151 my_obj->ext_image_mode, my_obj->fd, my_obj->state); in mm_stream_handle_rcvd_buf()
215 my_obj->ext_image_mode, my_obj->fd, my_obj->state); in mm_stream_data_notify()
270 my_obj->ext_image_mode, my_obj->fd, my_obj->state); in mm_stream_buf_notify()
325 my_obj->ext_image_mode, my_obj->fd, my_obj->state); in mm_stream_dispatch_app_data()
377 my_obj->ext_image_mode, my_obj->fd, my_obj->state, evt); in mm_stream_fsm_fn()
422 my_obj->ext_image_mode, my_obj->fd, my_obj->state, evt); in mm_stream_fsm_inited()
434 my_obj->fd = open(dev_name, O_RDWR | O_NONBLOCK); in mm_stream_fsm_inited()
435 if (my_obj->fd <= 0) { in mm_stream_fsm_inited()
[all …]
Dmm_camera_thread.c122 poll_cb->poll_fds[poll_cb->num_fds].fd = poll_cb->pfds[0]; in mm_camera_poll_proc_pipe()
127 if (poll_cb->poll_entries[0].fd > 0) { in mm_camera_poll_proc_pipe()
129 poll_cb->poll_fds[poll_cb->num_fds].fd = poll_cb->poll_entries[0].fd; in mm_camera_poll_proc_pipe()
135 if(poll_cb->poll_entries[i].fd > 0) { in mm_camera_poll_proc_pipe()
137 poll_cb->poll_fds[poll_cb->num_fds].fd = poll_cb->poll_entries[i].fd; in mm_camera_poll_proc_pipe()
148 poll_cb->poll_fds[poll_cb->num_fds].fd = -1; in mm_camera_poll_proc_pipe()
221 poll_cb->poll_fds[poll_cb->num_fds++].fd = poll_cb->pfds[0]; in mm_camera_poll_thread()
239 int32_t fd, in mm_camera_poll_thread_add_poll_fd() argument
255 poll_cb->poll_entries[idx].fd = fd; in mm_camera_poll_thread_add_poll_fd()
285 poll_cb->poll_entries[idx].fd = -1; /* set fd to invalid */ in mm_camera_poll_thread_del_poll_fd()
Dmm_camera_sock.c94 void mm_camera_socket_close(int fd) in mm_camera_socket_close() argument
96 if (fd >= 0) { in mm_camera_socket_close()
97 close(fd); in mm_camera_socket_close()
111 int fd, in mm_camera_socket_sendmsg() argument
156 return sendmsg(fd, &(msgh), 0); in mm_camera_socket_sendmsg()
171 int fd, in mm_camera_socket_recvmsg() argument
199 if ( (rcvd_len = recvmsg(fd, &(msgh), 0)) <= 0) { in mm_camera_socket_recvmsg()
/device/lge/hammerhead/liblight/
Dlights.c61 int fd; in write_int() local
64 fd = open(path, O_RDWR); in write_int()
65 if (fd >= 0) { in write_int()
68 int amt = write(fd, buffer, bytes); in write_int()
69 close(fd); in write_int()
82 int fd; in write_on_off() local
85 fd = open(path, O_RDWR); in write_on_off()
86 if (fd >= 0) { in write_on_off()
89 int amt = write(fd, buffer, bytes); in write_on_off()
90 close(fd); in write_on_off()
/device/lge/bullhead/liblight/
Dlights.c61 int fd; in write_int() local
64 fd = open(path, O_RDWR); in write_int()
65 if (fd >= 0) { in write_int()
68 int amt = write(fd, buffer, bytes); in write_int()
69 close(fd); in write_int()
82 int fd; in write_on_off() local
85 fd = open(path, O_RDWR); in write_on_off()
86 if (fd >= 0) { in write_on_off()
89 int amt = write(fd, buffer, bytes); in write_on_off()
90 close(fd); in write_on_off()
/device/lge/hammerhead/camera/QCamera2/HAL3/
DQCamera3Mem.cpp63 mMemInfo[i].fd = 0; in QCamera3Memory()
111 cache_inv_data.fd = mMemInfo[index].fd; in cacheOpsInternal()
118 __func__, cache_inv_data.vaddr, cache_inv_data.fd, in cacheOpsInternal()
143 return mMemInfo[index].fd; in getFd()
200 bufDef.fd = mMemInfo[index].fd; in getBufDef()
209 bufDef.planes[0].m.userptr = mMemInfo[index].fd; in getBufDef()
214 bufDef.planes[i].m.userptr = mMemInfo[i].fd; in getBufDef()
357 memInfo.fd = ion_info_fd.fd; in allocOneBuffer()
386 if (memInfo.fd > 0) { in deallocOneBuffer()
387 close(memInfo.fd); in deallocOneBuffer()
[all …]
/device/huawei/angler/liblight/
Dlights.c90 int fd; in write_int() local
93 fd = open(path, O_WRONLY); in write_int()
94 if (fd >= 0) { in write_int()
97 ssize_t amt = write(fd, buffer, (size_t)bytes); in write_int()
98 close(fd); in write_int()
112 int fd; in write_on_off() local
115 fd = open(path, O_WRONLY); in write_on_off()
116 if (fd >= 0) { in write_on_off()
119 int amt = write(fd, buffer, bytes); in write_on_off()
120 close(fd); in write_on_off()
/device/asus/flo/camera/QCamera2/HAL3/
DQCamera3Mem.cpp63 mMemInfo[i].fd = 0; in QCamera3Memory()
111 cache_inv_data.fd = mMemInfo[index].fd; in cacheOpsInternal()
118 __func__, cache_inv_data.vaddr, cache_inv_data.fd, in cacheOpsInternal()
143 return mMemInfo[index].fd; in getFd()
197 bufDef.fd = mMemInfo[index].fd; in getBufDef()
206 bufDef.planes[0].m.userptr = mMemInfo[index].fd; in getBufDef()
211 bufDef.planes[i].m.userptr = mMemInfo[i].fd; in getBufDef()
352 memInfo.fd = ion_info_fd.fd; in allocOneBuffer()
381 if (memInfo.fd > 0) { in deallocOneBuffer()
382 close(memInfo.fd); in deallocOneBuffer()
[all …]
/device/asus/fugu/power/
Dpower.c46 int fd = open(path, O_WRONLY); in sysfs_write() local
48 if (fd < 0) { in sysfs_write()
54 if ((len = write(fd, s, strlen(s))) < 0) { in sysfs_write()
59 close(fd); in sysfs_write()
69 int fd = open(path, O_RDONLY); in sysfs_read() local
71 if (fd < 0) { in sysfs_read()
77 if ((count = read(fd, s, (num_bytes - 1))) < 0) { in sysfs_read()
88 close(fd); in sysfs_read()
/device/htc/flounder/sensor_hub/libsensors/
DCwMcuSensor.cpp73 int fd; in sysfs_set_input_attr() local
79 fd = open(fname, O_WRONLY); in sysfs_set_input_attr()
80 if (fd < 0) { in sysfs_set_input_attr()
81 ALOGE("%s: fname = %s, fd = %d, failed: %s\n", __func__, fname, fd, strerror(errno)); in sysfs_set_input_attr()
85 rc = write(fd, value, (size_t)len); in sysfs_set_input_attr()
87 … ALOGE("%s: write failed: fd = %d, rc = %d, strerr = %s\n", __func__, fd, rc, strerror(errno)); in sysfs_set_input_attr()
88 close(fd); in sysfs_set_input_attr()
92 close(fd); in sysfs_set_input_attr()
148 int fd = open(filename, O_RDONLY); in find_type_by_name() local
150 if (fd < 0) { in find_type_by_name()
[all …]
DSensorBase.cpp74 int fd, amt; in write_sys_attribute() local
76 fd = open(path, O_WRONLY); in write_sys_attribute()
77 if (fd < 0) { in write_sys_attribute()
83 amt = write(fd, value, bytes); in write_sys_attribute()
87 close(fd); in write_sys_attribute()
/device/moto/shamu/camera/QCamera/HAL/usbcamcore/inc/
DQCameraUsbPriv.h101 camHal->fd = open(camHal->dev_name, O_RDWR | O_NONBLOCK, 0);\
102 if(!camHal->fd)\
113 if(camHal->fd){\
114 rc = close(camHal->fd);\
119 camHal->fd = 0;\
156 int fd; member
/device/generic/goldfish/libqemu/
Dtest_util.c47 static int fd; in pipe_openSocket() local
52 fd = socket( AF_INET, SOCK_STREAM, 0 ); in pipe_openSocket()
53 if (fd < 0) { in pipe_openSocket()
63 if ( connect(fd, (struct sockaddr*)&addr, sizeof(addr)) < 0 ) { in pipe_openSocket()
66 close(fd); in pipe_openSocket()
70 pipe->socket = fd; in pipe_openSocket()
/device/huawei/angler/power/
Dutils.c107 int fd = open(path, O_RDONLY); in sysfs_read() local
109 if (fd < 0) { in sysfs_read()
116 if ((count = read(fd, s, num_bytes - 1)) < 0) { in sysfs_read()
125 close(fd); in sysfs_read()
135 int fd = open(path, O_WRONLY); in sysfs_write() local
137 if (fd < 0) { in sysfs_write()
143 len = write(fd, s, strlen(s)); in sysfs_write()
151 close(fd); in sysfs_write()
/device/lge/bullhead/power/
Dutils.c107 int fd = open(path, O_RDONLY); in sysfs_read() local
109 if (fd < 0) { in sysfs_read()
116 if ((count = read(fd, s, num_bytes - 1)) < 0) { in sysfs_read()
125 close(fd); in sysfs_read()
135 int fd = open(path, O_WRONLY); in sysfs_write() local
137 if (fd < 0) { in sysfs_write()
143 len = write(fd, s, strlen(s)); in sysfs_write()
151 close(fd); in sysfs_write()
/device/moto/shamu/camera/QCamera2/HAL3/
DQCamera3Mem.cpp65 mMemInfo[i].fd = 0; in QCamera3Memory()
121 cache_inv_data.fd = mMemInfo[index].fd; in cacheOpsInternal()
128 __func__, cache_inv_data.vaddr, cache_inv_data.fd, in cacheOpsInternal()
160 return mMemInfo[index].fd; in getFd()
228 bufDef.fd = mMemInfo[index].fd; in getBufDef()
237 bufDef.planes[0].m.userptr = mMemInfo[index].fd; in getBufDef()
242 bufDef.planes[i].m.userptr = mMemInfo[i].fd; in getBufDef()
385 memInfo.fd = ion_info_fd.fd; in allocOneBuffer()
414 if (memInfo.fd > 0) { in deallocOneBuffer()
415 close(memInfo.fd); in deallocOneBuffer()
[all …]
/device/generic/goldfish/audio/
Daudio_hw.c48 int fd; member
102 static int out_dump(const struct audio_stream *stream, int fd) in out_dump() argument
106 dprintf(fd, "\tout_dump:\n" in out_dump()
190 if (adev->fd >= 0) in out_write()
191 bytes = write(adev->fd, buffer, bytes); in out_write()
258 static int in_dump(const struct audio_stream *stream, int fd) in in_dump() argument
262 dprintf(fd, "\tin_dump:\n" in in_dump()
342 if (adev->fd >= 0) in in_read()
343 bytes = read(adev->fd, buffer, bytes); in in_read()
458 if (adev->fd >= 0) in adev_init_check()
[all …]
/device/asus/flo/camera/QCamera2/stack/mm-camera-interface/src/
Dmm_camera_sock.c98 void mm_camera_socket_close(int fd) in mm_camera_socket_close() argument
100 if (fd > 0) { in mm_camera_socket_close()
101 close(fd); in mm_camera_socket_close()
116 int fd, in mm_camera_socket_sendmsg() argument
161 return sendmsg(fd, &(msgh), 0); in mm_camera_socket_sendmsg()
177 int fd, in mm_camera_socket_recvmsg() argument
205 if ( (rcvd_len = recvmsg(fd, &(msgh), 0)) <= 0) { in mm_camera_socket_recvmsg()

12345678910