Lines Matching refs:fd
88 int read_hci_event(int fd, unsigned char *buf, int size) in read_hci_event() argument
105 rd = read(fd, buf, 1); in read_hci_event()
121 rd = read(fd, buf + count, 3 - count); in read_hci_event()
134 rd = read(fd, buf + count, remain - (count - 3)); in read_hci_event()
149 static int read_command_complete(int fd, unsigned short opcode) in read_command_complete() argument
156 if (read_hci_event(fd, (unsigned char *)&resp, sizeof(resp)) < 0) { in read_command_complete()
288 int ldisc, len, fd, flow_ctrl; in st_uart_config() local
300 fd = open(sysfs_dev_name, O_RDONLY); in st_uart_config()
301 if (fd < 0) { in st_uart_config()
305 len = read(fd, buf, UART_DEV_NAME_LEN); in st_uart_config()
308 close(fd); in st_uart_config()
312 close(fd); in st_uart_config()
315 fd = open(sysfs_baud_rate, O_RDONLY); in st_uart_config()
316 if (fd < 0) { in st_uart_config()
320 len = read(fd, buf, UART_DEV_NAME_LEN); in st_uart_config()
323 close(fd); in st_uart_config()
326 close(fd); in st_uart_config()
330 fd = open(sysfs_flow_ctrl, O_RDONLY); in st_uart_config()
331 if (fd < 0) { in st_uart_config()
333 close(fd); in st_uart_config()
336 len = read(fd, buf, UART_DEV_NAME_LEN); in st_uart_config()
339 close(fd); in st_uart_config()
342 close(fd); in st_uart_config()
531 p.fd = st_fd; in main()