Home
last modified time | relevance | path

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

12345678910>>...13

/AliOS-Things-master/components/SDL2/src/image/external/tiff-4.0.9/contrib/mfs/
A Dmfs_file.c331 if (fds[fd] == -1 || buf_mode[fd] != 'r') in mfs_read()
338 else if (buf_off[fd] + size > buf_size[fd]) in mfs_read()
345 buf_off[fd] = buf_off[fd] + size; in mfs_read()
371 if (fds[fd] == -1 || buf_mode[fd] == 'r') in mfs_write()
382 if (buf_off[fd] + size > buf_size[fd]) in mfs_write()
385 buf_size[fd] = (buf_off[fd] + size); in mfs_write()
389 buf_off[fd] = buf_off[fd] + size; in mfs_write()
397 if (buf_off[fd] != buf_size[fd]) in mfs_write()
398 buf_off[fd] = buf_size[fd]; in mfs_write()
400 extend_mem_file (fd, buf_off[fd] + size); in mfs_write()
[all …]
/AliOS-Things-master/components/SDL2/src/image/external/tiff-4.0.9/libtiff/
A Dtif_print.c80 fprintf(fd, "0x%x", in _TIFFPrintField()
89 fprintf(fd, "%lu", in _TIFFPrintField()
136 fprintf(fd, ","); in _TIFFPrintField()
139 fprintf(fd, "\n"); in _TIFFPrintField()
203 fprintf(fd, in _TIFFPrettyPrintField()
220 fprintf(fd, in _TIFFPrettyPrintField()
273 fprintf(fd, "\n"); in TIFFPrintDirectory()
281 fprintf(fd, "\n"); in TIFFPrintDirectory()
401 fputs(sep, fd); in TIFFPrintDirectory()
568 fputc('\n', fd); in TIFFPrintDirectory()
[all …]
A Dtif_unix.c64 int fd; member
80 fdh.h = fd; in _tiffReadProc()
108 fdh.h = fd; in _tiffWriteProc()
135 fdh.h = fd; in _tiffSeekProc()
143 fdh.h = fd; in _tiffCloseProc()
152 fdh.h = fd; in _tiffSizeProc()
183 (void) fd; in _tiffUnmapProc()
210 fdh.fd = fd; in TIFFFdOpen()
228 int m, fd; in TIFFOpen() local
252 close(fd); in TIFFOpen()
[all …]
/AliOS-Things-master/components/linkkit/dev_model/client/
A Ddm_client.h18 void dm_client_thing_model_down_raw(int fd, const char *topic,
21 void dm_client_thing_model_up_raw_reply(int fd, const char *topic,
27 void dm_client_thing_event_notify(int fd, const char *topic,
66 void dm_client_thing_service_request(int fd, const char *topic,
72 void dm_client_rrpc_request_wildcard(int fd, const char *topic,
84 void dm_client_thing_topo_add_notify(int fd, const char *topic,
93 void dm_client_thing_gateway_permit(int fd, const char *topic,
108 void dm_client_thing_topo_add_reply(int fd, const char *topic,
114 void dm_client_thing_topo_get_reply(int fd, const char *topic,
120 void dm_client_combine_login_reply(int fd, const char *topic,
[all …]
/AliOS-Things-master/components/SDL2/src/image/external/tiff-4.0.9/tools/
A Dtiff2ps.c1778 fputs(" <", fd); in PS_Lvl2colorspace()
1862 fd); in PS_Lvl2ImageDict()
1955 fputs(" [", fd); in PS_Lvl2ImageDict()
2083 fputs(" ]", fd); in PS_Lvl2ImageDict()
2121 fputs("}\n", fd); in PS_Lvl2ImageDict()
2317 putc('\n', fd); in PS_Lvl2page()
2391 fprintf(fd, in PSpage()
2397 putc('\n', fd); in PSpage()
2437 #define PUTHEX(c,fd) putc(hex[((c)>>4)&0xf],fd); putc(hex[(c)&0xf],fd) argument
2531 PUTHEX(c,fd); in PSDataColorSeparate()
[all …]
A Dtiffdump.c116 int one = 1, fd; in main() local
145 if (fd < 0) { in main()
154 dump(fd, diroff); in main()
155 close(fd); in main()
168 dump(int fd, uint64 diroff) in dump() argument
645 PrintTag(FILE* fd, uint16 tag) in PrintTag() argument
699 fputc(*cp, fd); in PrintASCII()
706 fprintf(fd, "\\%c", *tp); in PrintASCII()
710 fprintf(fd, "\\0"); in PrintASCII()
859 vfprintf(fd, fmt, ap); in vError()
[all …]
/AliOS-Things-master/components/linkkit/dev_model/
A Diotx_cm.c13 static int _recycle_fd(int fd);
27 int fd; in iotx_cm_open() local
49 fd = _get_fd(connection); in iotx_cm_open()
50 if (fd < 0) { in iotx_cm_open()
55 connection->fd = fd; in iotx_cm_open()
56 return fd; in iotx_cm_open()
107 if (fd == -1) { in _iotx_cm_yield()
201 int iotx_cm_close(int fd) in iotx_cm_close() argument
252 ret = (fd >= 0 && fd < CM_MAX_FD_NUM && _cm_fd[fd] != NULL) ? 0 : -1; in _fd_is_valid()
266 if (fd < 0 || fd > CM_MAX_FD_NUM - 1) { in _recycle_fd()
[all …]
/AliOS-Things-master/components/mbedtls/platform/aos/library/
A Dnet_sockets.c45 ctx->fd = -1; in mbedtls_net_init()
64 ctx->fd = 0; in mbedtls_net_connect()
73 int fd = ((mbedtls_net_context *) ctx)->fd; in mbedtls_net_recv() local
75 if (fd < 0) in mbedtls_net_recv()
107 int fd = ((mbedtls_net_context *) ctx)->fd; in mbedtls_net_recv_timeout() local
109 if( fd < 0 ) in mbedtls_net_recv_timeout()
143 int fd = ((mbedtls_net_context *) ctx)->fd; in mbedtls_net_send() local
145 if( fd < 0 ) in mbedtls_net_send()
299 int fd = ((mbedtls_net_context *) ctx)->fd; in mbedtls_net_recv() local
329 int fd = ((mbedtls_net_context *) ctx)->fd; in mbedtls_net_recv_timeout() local
[all …]
/AliOS-Things-master/components/mbedtls/platform/yoc/
A Dnet_sockets.c71 ctx->fd = -1; in mbedtls_net_init()
181 ctx->fd = fd; in mbedtls_net_bind()
246 ret = client_ctx->fd = (int) accept( bind_ctx->fd, in mbedtls_net_accept()
275 client_ctx->fd = bind_ctx->fd; in mbedtls_net_accept()
337 int fd = ((mbedtls_net_context *) ctx)->fd; in mbedtls_net_recv() local
339 if( fd < 0 ) in mbedtls_net_recv()
370 int fd = ((mbedtls_net_context *) ctx)->fd; in mbedtls_net_recv_timeout() local
372 if( fd < 0 ) in mbedtls_net_recv_timeout()
406 int fd = ((mbedtls_net_context *) ctx)->fd; in mbedtls_net_send() local
434 close( ctx->fd ); in mbedtls_net_free()
[all …]
/AliOS-Things-master/components/mbedtls/library/
A Dnet_sockets.c77 #define close(fd) closesocket(fd) argument
141 ctx->fd = -1; in mbedtls_net_init()
341 ret = client_ctx->fd = (int) accept( bind_ctx->fd, in mbedtls_net_accept()
380 client_ctx->fd = bind_ctx->fd; in mbedtls_net_accept()
464 int fd = ctx->fd; in mbedtls_net_poll() local
466 if( fd < 0 ) in mbedtls_net_poll()
544 int fd = ((mbedtls_net_context *) ctx)->fd; in mbedtls_net_recv() local
546 if( fd < 0 ) in mbedtls_net_recv()
583 int fd = ((mbedtls_net_context *) ctx)->fd; in mbedtls_net_recv_timeout() local
585 if( fd < 0 ) in mbedtls_net_recv_timeout()
[all …]
/AliOS-Things-master/solutions/eduk1_demo/k1_apps/kws/beeper/
A Dbeeper.c13 int fd = 0; in beeper_start() local
18 fd = open(name, 0); in beeper_start()
19 if (fd >= 0) { in beeper_start()
23 ret = ioctl(fd, IOC_PWM_ON, (unsigned long)0); in beeper_start()
30 close(fd); in beeper_start()
38 int fd = 0; in beeper_stop() local
45 fd = open(name, 0); in beeper_stop()
46 if (fd >= 0) { in beeper_stop()
49 ret = ioctl(fd, IOC_PWM_ON, (unsigned long)0); in beeper_stop()
50 ret = ioctl(fd, IOC_PWM_OFF, (unsigned long)0); in beeper_stop()
[all …]
/AliOS-Things-master/components/netmgr/netdev/src/
A Dnetdev_cli.c30 int fd; member
46 if (fd >= 0) { in netdev_res_print()
229 cur->fd = fd; in add_fd_info()
270 return cur->fd; in get_fd_by_netdev()
291 int fd = -1; in netdev_ifconfig() local
296 if (fd >= 0) { in netdev_ifconfig()
297 close(fd); in netdev_ifconfig()
320 int fd = -1; in netdev_ifconfig() local
521 int fd = -1; in netdev_ping() local
571 if (fd >= 0) { in netdev_ping()
[all …]
/AliOS-Things-master/components/vfs/
A Dvfs_file.c118 fd -= VFS_FD_OFFSET; in vfs_fd_mark_open()
121 if (fd < 0) { in vfs_fd_mark_open()
125 word = fd / 32; in vfs_fd_mark_open()
126 bit = fd % 32; in vfs_fd_mark_open()
145 fd -= VFS_FD_OFFSET; in vfs_fd_mark_close()
148 if (fd < 0) { in vfs_fd_mark_close()
152 word = fd / 32; in vfs_fd_mark_close()
153 bit = fd % 32; in vfs_fd_mark_close()
175 if (fd < 0) { in vfs_fd_is_open()
179 word = fd / 32; in vfs_fd_is_open()
[all …]
/AliOS-Things-master/hardware/chip/rtl872xd/aos/
A Dota_port.c46 int fd; in ota_set_user_bootinfo() local
60 fd = open(dev_str, 0); in ota_set_user_bootinfo()
61 if (fd < 0) { in ota_set_user_bootinfo()
65 lseek(fd, 0 ,SEEK_SET); in ota_set_user_bootinfo()
71 close(fd); in ota_set_user_bootinfo()
86 fd = open(dev_str, 0); in ota_set_user_bootinfo()
87 if (fd < 0) { in ota_set_user_bootinfo()
99 close(fd); in ota_set_user_bootinfo()
103 close(fd); in ota_set_user_bootinfo()
118 fd = open(dev_str, 0); in ota_set_user_bootinfo()
[all …]
/AliOS-Things-master/components/drivers/peripheral/flash/example/
A Dflash_example.c30 int fd = -1; in vfs_flash_test() local
38 fd = open(dev_str, 0); in vfs_flash_test()
39 …ddkc_info("open flash %s %s, fd:%d, epfd:%d\r\n", dev_str, fd >= 0 ? "success" : "fail", fd, epfd); in vfs_flash_test()
41 if (fd >= 0) { in vfs_flash_test()
48 ev.data.fd = fd; in vfs_flash_test()
53 ret = lseek(fd, 0, SEEK_SET); in vfs_flash_test()
67 ret = lseek(fd,0,SEEK_SET); in vfs_flash_test()
104 close(fd); in vfs_flash_test()
105 fd = -1; in vfs_flash_test()
115 if (fd >= 0) in vfs_flash_test()
[all …]
/AliOS-Things-master/components/ota/hal/
A Dota_hal_fs_plat.c16 int fd = -1; in ota_fopen() local
18 fd = aos_open(filename, mode); in ota_fopen()
20 return fd; in ota_fopen()
26 if ((fd >= 0) && (buf != NULL)) { in ota_fwrite()
41 OTA_WEAK int ota_fclose(int fd) in ota_fclose() argument
44 if (fd >= 0) { in ota_fclose()
45 ret = aos_close(fd); in ota_fclose()
54 int fd = -1; in ota_jsapp_version_get() local
61 if (fd < 0) { in ota_jsapp_version_get()
83 if (fd >= 0) { in ota_jsapp_version_get()
[all …]
/AliOS-Things-master/components/SDL2/src/image/external/tiff-4.0.9/contrib/stream/
A Dtiffstream.cpp131 TiffStream::close(thandle_t fd) in close() argument
148 TiffStream::size(thandle_t fd) in size() argument
151 return ts->getSize(fd); in size()
168 if(!isOpen(fd)) return 0; in getSize()
170 unsigned int pos = tell(fd); in getSize()
171 seekInt(fd, 0, end); in getSize()
172 unsigned int size = tell(fd); in getSize()
173 seekInt(fd, pos, beg); in getSize()
179 TiffStream::tell(thandle_t fd) in tell() argument
195 if(!isOpen(fd)) return false; in seekInt()
[all …]
/AliOS-Things-master/components/drivers/peripheral/timer/example/
A Dtimer_example.c27 int fd = 0; in vfs_timer_test() local
33 fd = open(name, 0); in vfs_timer_test()
34 ddkc_info("open %s %s, fd:%d\r\n", name, fd >= 0 ? "success" : "fail", fd); in vfs_timer_test()
35 if (fd >= 0) { in vfs_timer_test()
37 alarm.arg = &fd; in vfs_timer_test()
42 ret = ioctl(fd, IOC_TIMER_IRQP_SET, (unsigned long)&alarm); in vfs_timer_test()
48 ret = ioctl(fd, IOC_TIMER_IRQP_SET, (unsigned long)&alarm); in vfs_timer_test()
53 ret = ioctl(fd, IOC_TIMER_IRQP_GET, (unsigned long)&ralarm); in vfs_timer_test()
57 ret = ioctl(fd, IOC_TIMER_IRQP_SET, (unsigned long)&alarm); in vfs_timer_test()
62 ret = ioctl(fd, IOC_TIMER_RELOAD, (unsigned long)0); in vfs_timer_test()
[all …]
/AliOS-Things-master/components/SDL2/src/image/external/zlib-1.2.11/examples/
A Dgzlog.c350 int fd; in log_lock() local
363 close(fd); in log_lock()
450 fsync(log->fd); in log_mark()
453 fsync(log->fd); in log_mark()
610 int fd; in log_compress() local
800 log->fd = -1; in log_close()
821 log->fd = -1; in log_open()
879 log->fd = -1; in gzlog_open()
910 int fd, ret; in gzlog_compress() local
997 int fd, ret; in gzlog_write() local
[all …]
/AliOS-Things-master/components/libc_stub/
A Dnewlib_stub.c51 if ((fd >= FD_VFS_START) && (fd <= FD_VFS_END)) { in _fcntl_r()
57 } else if ((fd >= FD_SOCKET_START) && (fd <= FD_EVENT_END)) { in _fcntl_r()
81 if (fd >= 0 && fd < 3) { in _isatty_r()
120 if ((fd >= FD_VFS_START) && (fd <= FD_VFS_END)) { in _close_r()
121 ret = aos_close(fd); in _close_r()
126 } else if ((fd >= FD_SOCKET_START) && (fd <= FD_EVENT_END)) { in _close_r()
140 if ((fd >= FD_VFS_START) && (fd <= FD_VFS_END)) { in _read_r()
146 } else if ((fd >= FD_SOCKET_START) && (fd <= FD_EVENT_END)) { in _read_r()
171 if ((fd >= FD_VFS_START) && (fd <= FD_VFS_END)) { in _write_r()
177 } else if ((fd >= FD_SOCKET_START) && (fd <= FD_EVENT_END)) { in _write_r()
[all …]
/AliOS-Things-master/components/drivers/peripheral/uart/example/
A Duart_example.c36 int fd = -1; in uart_write_test() local
57 if (fd < 0) { in uart_write_test()
66 close(fd); in uart_write_test()
76 close(fd); in uart_write_test()
90 int fd = -1; in uart_read_test() local
111 if (fd < 0) { in uart_read_test()
120 close(fd); in uart_read_test()
139 close(fd); in uart_read_test()
153 int fd = -1; in uart_echo_test() local
174 if (fd < 0) { in uart_echo_test()
[all …]
/AliOS-Things-master/components/amp_adapter/platform/aos/network/
A Daos_tcp.c45 int fd = 0; in aos_tcp_establish() local
72 if (fd < 0) { in aos_tcp_establish()
79 rc = fd; in aos_tcp_establish()
83 close(fd); in aos_tcp_establish()
98 int aos_tcp_destroy(unsigned int fd) in aos_tcp_destroy() argument
103 rc = shutdown((int)fd, 2); in aos_tcp_destroy()
109 rc = close((int)fd); in aos_tcp_destroy()
126 if (fd >= FD_SETSIZE) { in aos_tcp_write()
141 FD_SET(fd, &sets); in aos_tcp_write()
201 FD_SET(fd, &recv_sets); in aos_tcp_read()
[all …]
/AliOS-Things-master/components/amp/components/at/src/
A Dat.c50 return (fd >= 0 && fd < ATPSR_DEV_MAX_NUM); in check_fd_valid()
84 if (!check_fd_valid(fd) || !check_dev_ready(fd)) in at_scan_for_callback()
167 if (!check_fd_valid(fd) || !check_dev_ready(fd)) in at_getc()
232 if (!check_fd_valid(fd) || !check_dev_ready(fd)) in at_yield_impl()
346 if (!check_fd_valid(fd) || !check_dev_ready(fd)) in at_scan_for_response()
547 if (!check_fd_valid(fd) || !check_dev_ready(fd)) in stop_at_worker()
570 if (!check_fd_valid(fd) || !check_dev_ready(fd)) in at_worker_task_add()
591 if (!check_fd_valid(fd) || !check_dev_ready(fd)) in at_worker_task_del()
841 dev->_task_para->fd = fd; in init_dev()
928 int fd; in at_add_dev() local
[all …]
/AliOS-Things-master/components/drivers/peripheral/spi/example/
A Dspi_example.c23 int fd = 0; in vfs_spi_test() local
28 fd = open(name, 0); in vfs_spi_test()
29 ddkc_info("open %s %s, fd:%d\r\n", name, fd >= 0 ? "success" : "fail", fd); in vfs_spi_test()
31 if (fd >= 0) { in vfs_spi_test()
37 ev.data.fd = fd; in vfs_spi_test()
39 ret = epoll_ctl(epfd, EPOLL_CTL_ADD, fd, &ev); in vfs_spi_test()
43 ret = ioctl(fd, IOC_SPI_SET_CFLAG, SPI_MODE_0 | SPI_MSB | SPI_MASTER | SPI_DATA_8BIT); in vfs_spi_test()
47 ret = write(fd, buffer, 4); in vfs_spi_test()
51 ret = read(fd, buffer, sizeof(buffer)); in vfs_spi_test()
62 ret = read(fd, buffer, sizeof(buffer)); in vfs_spi_test()
[all …]
/AliOS-Things-master/components/kv/src/
A Dkv_adapt.c22 int fd; in kv_flash_fd_open() local
34 fd = open(dev_str, 0); in kv_flash_fd_open()
35 if(fd < 0){ in kv_flash_fd_open()
36 return fd; in kv_flash_fd_open()
38 g_kv_flash_fd = fd; in kv_flash_fd_open()
46 int fd; in kv_flash_read() local
50 fd = g_kv_flash_fd; in kv_flash_read()
66 int fd; in kv_flash_write() local
70 fd = g_kv_flash_fd; in kv_flash_write()
86 int fd; in kv_flash_erase() local
[all …]

Completed in 4467 milliseconds

12345678910>>...13