/system/vold/ |
H A D | VoldUtil.c | 20 unsigned int get_blkdev_size(int fd) argument 24 if ( (ioctl(fd, BLKGETSIZE, &nr_sec)) == -1) {
|
/system/core/adf/libadf/include/adf/ |
H A D | adf.h | 30 int fd; member in struct:adf_device 70 * Returns a sync fence fd that will fire when the configuration is removed 125 * Returns a file descriptor. The caller must close() the fd when done. 135 int adf_get_interface_data(int fd, struct adf_interface_data *data); 144 int adf_interface_blank(int fd, __u8 mode); 148 int adf_interface_set_mode(int fd, struct drm_mode_modeinfo *mode); 152 * Returns a dma-buf fd. On error, returns -errno. 154 int adf_interface_simple_buffer_alloc(int fd, __u32 w, __u32 h, 160 * Returns a sync fence fd that will fire when the buffer is removed 163 int adf_interface_simple_post(int fd, adf_id_ [all...] |
/system/core/libcutils/ |
H A D | load_file.c | 26 int fd; local 29 fd = open(fn, O_RDONLY); 30 if(fd < 0) return 0; 32 sz = lseek(fd, 0, SEEK_END); 35 if(lseek(fd, 0, SEEK_SET) != 0) goto oops; 40 if(read(fd, data, sz) != sz) goto oops; 41 close(fd); 48 close(fd);
|
H A D | partition_utils.c | 43 int fd, ret; local 45 if ((fd = open(source, O_RDONLY)) < 0) { 49 ret = read(fd, buf, sizeof(buf)); 50 close(fd);
|
H A D | process_name.c | 87 int fd = open(PROCESS_NAME_DEVICE, O_RDWR); local 88 if (fd < 0) 90 write(fd, process_name, strlen(process_name) + 1); 91 close(fd);
|
/system/core/libion/tests/ |
H A D | ion_test_fixture.cpp | 44 int fd = ion_open(); local 45 ASSERT_GE(fd, 0); 50 ret = ion_alloc(fd, 4096, 0, i, 0, &handle); 52 ion_free(fd, handle); 62 ion_close(fd);
|
/system/extras/ext4_utils/ |
H A D | wipe.c | 35 int wipe_block_device(int fd, s64 len) argument 40 if (!is_block_device_fd(fd)) { 47 ret = ioctl(fd, BLKSECDISCARD, &range); 51 ret = ioctl(fd, BLKDISCARD, &range); 70 int wipe_block_device(int fd, s64 len) argument
|
/system/extras/tests/cpueater/ |
H A D | cpueater.c | 32 int fd; local 60 for (fd = 3; fd < 256; fd++) { 61 close(fd);
|
H A D | daemonize.c | 33 int pid, fd, mode; local 96 for (fd = 3; fd < 256; fd++) { 97 close(fd);
|
/system/core/adb/ |
H A D | console.c | 8 int fd, port; local 18 fd = socket_loopback_client( port, SOCK_STREAM ); 19 if (fd < 0) { 23 return fd; 29 int fd, nn; local 31 fd = connect_to_console(); 32 if (fd < 0) 38 adb_write( fd, argv[nn], strlen(argv[nn]) ); 39 adb_write( fd, (nn == argc-1) ? "\n" : " ", 1 ); 41 adb_write( fd, QUI [all...] |
H A D | fdevent.h | 33 typedef void (*fd_func)(int fd, unsigned events, void *userdata); 36 * Note: use FD_TIMER as 'fd' to create a fd-less object 39 fdevent *fdevent_create(int fd, fd_func func, void *arg); 48 void fdevent_install(fdevent *fde, int fd, fd_func func, void *arg); 72 int fd; member in struct:fdevent
|
H A D | test_track_devices.c | 17 unix_write( int fd, const char* buf, int len ) argument 21 int len2 = write(fd, buf, len); 35 unix_read( int fd, char* buf, int len ) argument 39 int len2 = read(fd, buf, len);
|
H A D | test_track_jdwp.c | 17 unix_write( int fd, const char* buf, int len ) argument 21 int len2 = write(fd, buf, len); 35 unix_read( int fd, char* buf, int len ) argument 39 int len2 = read(fd, buf, len);
|
/system/core/fastbootd/commands/ |
H A D | flash.h | 41 int flash_erase(int fd); 47 static inline int flash_close(int fd) { argument 48 return close(fd); 53 static inline ssize_t read_data_once(int fd, char *buffer, ssize_t size) { argument 57 while ((len = TEMP_FAILURE_RETRY(read(fd, (void *) &buffer[readcount], size - readcount))) > 0) {
|
/system/core/fastbootd/ |
H A D | socket_client.c | 46 int fd; local 51 fd = socket_local_client("fastbootd", 55 if (fd < 0) { 60 fds[0].fd = STDIN_FD; 62 fds[1].fd = fd; 76 if (bulk_write(fd, buffer, n) < 0) { 82 if ((n = read(fd, buffer, BUFFER_SIZE)) < 0) {
|
H A D | config.c | 100 int fd; local 106 fd = open(CONFIG_PATH, O_RDONLY); 107 if (fd < 0) { 112 len = lseek(fd, 0, SEEK_END); 118 lseek(fd, 0, SEEK_SET); 127 ret = read(fd, buffer + count, len - count);
|
/system/core/init/ |
H A D | watchdogd.c | 31 int fd; local 50 fd = open(DEV_NAME, O_RDWR); 51 if (fd < 0) { 56 ret = ioctl(fd, WDIOC_SETTIMEOUT, &timeout); 59 ret = ioctl(fd, WDIOC_GETTIMEOUT, &timeout); 73 write(fd, "", 1);
|
/system/core/liblog/ |
H A D | uio.c | 22 int readv( int fd, struct iovec* vecs, int count ) argument 31 int ret = read( fd, buf, len ); 49 int writev( int fd, const struct iovec* vecs, int count ) argument 58 int ret = write( fd, buf, len );
|
/system/core/toolbox/ |
H A D | load_policy.c | 13 int fd, rc; local 24 fd = open(path, O_RDONLY); 25 if (fd < 0) { 30 if (fstat(fd, &sb) < 0) { 35 map = mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0); 47 close(fd);
|
H A D | rotatefb.c | 18 int fd; local 43 fd = open(fbdev, O_RDWR); 44 if(fd < 0) { 49 res = ioctl(fd, FBIOGET_VSCREENINFO, &fbinfo); 64 res = ioctl(fd, FBIOPUT_VSCREENINFO, &fbinfo);
|
H A D | setkey.c | 23 int fd; local 31 fd = open(TTYDEV, O_RDWR | O_SYNC); 32 if (fd < 0) { 53 ret = ioctl(fd, KDSKBENT, &kbe); 63 ret = ioctl(fd, KDGKBENT, &kbe);
|
H A D | smd.c | 9 int fd, len, r, port = 0; local 21 fd = open(devname, O_WRONLY); 22 if(fd < 0) { 29 r = write(fd, argv[0], len); 37 write(fd, argc ? " " : "\r", 1); 39 close(fd);
|
/system/extras/f2fs_utils/ |
H A D | f2fs_utils.c | 53 config.fd = -1; 60 int make_f2fs_sparse_fd(int fd, long long len, argument 73 sparse_file_write(f2fs_sparse_file, fd, /*gzip*/0, /*sparse*/1, /*crc*/0);
|
/system/core/fastboot/ |
H A D | fs.c | 25 static int generate_ext4_image(int fd, long long partSize) argument 27 make_ext4fs_sparse_fd(fd, partSize, NULL, NULL); 33 static int generate_f2fs_image(int fd, long long partSize) argument 35 return make_f2fs_sparse_fd(fd, partSize, NULL, NULL); 42 int (*generate)(int fd, long long partSize); //returns 0 or error value
|
/system/core/fs_mgr/ |
H A D | fs_mgr_format.c | 37 int fd, rc = 0; local 39 if ((fd = open(fs_blkdev, O_WRONLY, 0644)) < 0) { 44 if ((ioctl(fd, BLKGETSIZE, &nr_sec)) == -1) { 46 close(fd); 55 rc = make_ext4fs_internal(fd, NULL, fs_mnt_point, 0, 0, 0, 0, 0, 0, 0, 0, NULL); 59 close(fd);
|