Searched defs:fd (Results 1 - 25 of 208) sorted by last modified time

123456789

/system/vold/
H A DDevmapper.cpp57 int fd; local
58 if ((fd = open("/dev/device-mapper", O_RDWR)) < 0) {
68 if (ioctl(fd, DM_LIST_DEVICES, io)) {
72 close(fd);
80 close(fd);
91 if (ioctl(fd, DM_DEV_STATUS, io2)) {
113 close(fd);
140 int fd; local
141 if ((fd = open("/dev/device-mapper", O_RDWR)) < 0) {
150 if (ioctl(fd, DM_DEV_STATU
174 int fd; local
271 int fd; local
[all...]
H A DExt4.cpp115 int fd; local
H A DFat.cpp173 int fd; local
232 int fd; local
235 fd = open(fsPath, O_RDWR);
236 if (fd >= 0) {
238 numSectors = get_blkdev_size(fd);
242 close(fd);
247 if (ioctl(fd, BLKDISCARD, &range) < 0) {
252 close(fd);
H A DLoop.cpp41 int fd; local
50 if ((fd = open(filename, O_RDWR)) < 0) {
59 rc = ioctl(fd, LOOP_GET_STATUS64, &li);
60 close(fd);
83 int fd; local
94 if ((fd = open(filename, O_RDWR)) < 0) {
103 rc = ioctl(fd, LOOP_GET_STATUS64, &li);
104 close(fd);
129 int fd; local
151 if ((fd
236 int fd; local
253 int fd; local
281 int fd; local
[all...]
H A DProcess.cpp67 int fd; local
69 fd = open(buffer, O_RDONLY);
70 if (fd < 0) {
73 int length = read(fd, buffer, max - 1);
75 close(fd);
88 sprintf(path, "/proc/%d/fd", pid);
H A DVoldUtil.c20 unsigned int get_blkdev_size(int fd) argument
24 if ( (ioctl(fd, BLKGETSIZE, &nr_sec)) == -1) {
H A DVolumeManager.cpp618 int fd; local
621 if ((fd = open(asecFileName, O_RDONLY)) < 0) {
627 if (fstat(fd, &info) < 0) {
629 close(fd);
649 close(fd);
657 if (lseek(fd, ((oldNumSec - 1) * 512), SEEK_SET) < 0) {
659 close(fd);
662 if (read(fd, &sb, sizeof(struct asec_superblock)) != sizeof(struct asec_superblock)) {
664 close(fd);
667 close(fd);
867 int fd = open(ftsent->fts_accpath, O_NOFOLLOW); local
1219 int dirfd, fd; local
1300 int fd; local
1406 int fd; local
1497 int fd = open(device, O_RDONLY); local
1575 int fd; local
1635 int fd; local
[all...]
H A Dcryptfs.c391 int fd, block_size; local
395 if ((fd = open(dev, O_RDONLY)) < 0) {
400 if (lseek64(fd, 1024, SEEK_SET) < 0) {
405 if (read(fd, &sb, sizeof(sb)) != sizeof(sb)) {
410 close(fd);
429 int fd; local
439 if ( (fd = open(real_blkdev, O_RDWR)) < 0) {
444 if ((nr_sec = get_blkdev_size(fd))) {
455 close(fd);
481 int fd; local
533 unix_read(int fd, void* buff, int len) argument
538 unix_write(int fd, const void* buff, int len) argument
555 upgrade_crypt_ftr(int fd, struct crypt_mnt_ftr *crypt_ftr, off64_t offset) argument
620 int fd; local
719 int fd; local
815 int fd; local
978 load_crypto_mapping_table(struct crypt_mnt_ftr *crypt_ftr, unsigned char *master_key, char *real_blk_name, const char *name, int fd, char *extra_params) argument
1034 get_dm_crypt_version(int fd, const char *name, int *version) argument
1080 int fd=0; local
1147 int fd; local
1434 int fd; local
1905 int nr_sec, fd; local
2833 int fd = open(filename, O_RDONLY); local
2928 int rc=-1, fd, i, ret; local
3244 int fd = open("/cache/recovery/command", O_RDWR|O_CREAT|O_TRUNC, 0600); local
[all...]
H A Dfstrim.c61 int fd; local
98 fd = open(fstab->recs[i].mount_point, O_RDONLY);
99 if (fd < 0) {
109 ret = ioctl(fd, deep_trim ? FIDTRIM : FITRIM, &range);
116 close(fd);
H A Dmain.cpp112 int dfd, fd; local
116 fd = openat(dfd, "uevent", O_WRONLY);
117 if(fd >= 0) {
118 write(fd, "add\n", 4);
119 close(fd);
131 fd = openat(dfd, de->d_name, O_RDONLY | O_DIRECTORY);
132 if(fd < 0)
135 d2 = fdopendir(fd);
137 close(fd);
/system/media/camera/src/
H A Dcamera_metadata.c836 static void print_data(int fd, const uint8_t *data_ptr, uint32_t tag, int type,
841 int fd,
843 dump_indented_camera_metadata(metadata, fd, verbosity, 0);
847 int fd,
851 dprintf(fd, "%*sDumping camera metadata array: Not allocated\n",
856 dprintf(fd,
861 dprintf(fd, "%*sVersion: %d, Flags: %08x\n",
882 dprintf(fd, "%*s%s.%s (%05x): %s[%" PRIu32 "]\n",
911 print_data(fd, data_ptr, entry->tag, entry->type, count, indentation);
915 static void print_data(int fd, cons argument
840 dump_camera_metadata(const camera_metadata_t *metadata, int fd, int verbosity) argument
846 dump_indented_camera_metadata(const camera_metadata_t *metadata, int fd, int verbosity, int indentation) argument
[all...]
/system/netd/client/
H A DFwmarkClient.cpp43 int FwmarkClient::send(void* data, size_t len, int fd) { argument
67 char cmsg[CMSG_SPACE(sizeof(fd))];
75 cmsgh->cmsg_len = CMSG_LEN(sizeof(fd));
78 memcpy(CMSG_DATA(cmsgh), &fd, sizeof(fd)); local
H A DNetdClient.cpp44 int closeFdAndSetErrno(int fd, int error) { argument
45 close(fd);
/system/netd/server/
H A DMDnsSdListener.cpp599 mPollFds[0].fd = mCtrlSocketPair[0];
664 mPollFds[0].fd = mCtrlSocketPair[0];
670 int fd = DNSServiceRefSockFD((*prevPtr)->mRef); local
671 if (fd != -1) {
672 if (DBG_RESCAN) ALOGD(" adding FD %d", fd);
673 mPollFds[i].fd = fd;
H A DNetdConstants.cpp116 int fd = open(path, O_WRONLY); local
117 if (fd < 0) {
122 if (write(fd, value, size) != size) {
124 close(fd);
127 close(fd);
133 int fd = open(path, O_RDONLY); local
136 if (fd < 0) {
141 size = read(fd, buf, *sizep);
144 close(fd);
148 close(fd);
[all...]
H A DRouteController.cpp163 int fd = open(RT_TABLES_PATH, RT_TABLES_FLAGS, RT_TABLES_MODE); local
164 if (fd == -1) {
169 if (fchmod(fd, RT_TABLES_MODE) == -1) {
172 ssize_t bytesWritten = write(fd, contents.data(), contents.size());
177 close(fd);
H A DSoftapController.cpp121 int fd; local
165 fd = open(HOSTAPD_CONF_FILE, O_CREAT | O_TRUNC | O_WRONLY | O_NOFOLLOW, 0660);
166 if (fd < 0) {
172 if (write(fd, fbuf, strlen(fbuf)) < 0) {
180 if (fchmod(fd, 0660) < 0) {
183 close(fd);
188 if (fchown(fd, AID_SYSTEM, AID_WIFI) < 0) {
191 close(fd);
196 close(fd);
H A DTetherController.cpp69 int fd = open("/proc/sys/net/ipv4/ip_forward", O_WRONLY); local
70 if (fd < 0) {
75 if (write(fd, (enable ? "1" : "0"), 1) != 1) {
77 close(fd);
80 close(fd);
85 int fd = open("/proc/sys/net/ipv4/ip_forward", O_RDONLY); local
87 if (fd < 0) {
93 if (read(fd, &enabled, 1) != 1) {
95 close(fd);
99 close(fd);
[all...]
H A Dmain.cpp120 int fd = open(PID_FILE_PATH, PID_FILE_FLAGS, PID_FILE_MODE); local
121 if (fd == -1) {
127 if (fchmod(fd, PID_FILE_MODE) == -1) {
129 close(fd);
134 if (write(fd, pid_buf, strlen(pid_buf)) != (ssize_t)strlen(pid_buf)) {
136 close(fd);
140 close(fd);
/system/security/keystore/
H A Dkeystore.cpp387 static size_t readFully(int fd, uint8_t* data, size_t size) { argument
390 ssize_t n = TEMP_FAILURE_RETRY(read(fd, data, remaining));
400 static size_t writeFully(int fd, uint8_t* data, size_t size) { argument
403 ssize_t n = TEMP_FAILURE_RETRY(write(fd, data, remaining));
2240 int fd = TEMP_FAILURE_RETRY(open(filename.string(), O_NOFOLLOW, O_RDONLY)); local
2241 if (fd < 0) {
2247 int ret = fstat(fd, &s);
2248 close(fd);
/system/core/adb/
H A Dadb.c322 static void send_msg_with_header(int fd, const char* msg, size_t msglen) { argument
327 writex(fd, header, 4);
328 writex(fd, msg, msglen);
332 static void send_msg_with_okay(int fd, const char* msg, size_t msglen) { argument
337 writex(fd, header, 8);
338 writex(fd, msg, msglen);
679 int fd; local
682 fd = adb_socket_accept(_fd, &addr, &alen);
683 if(fd < 0) return;
685 adb_socket_setbufsize(fd, CHUNK_SIZ
705 int fd; local
1004 int fd; local
[all...]
H A Dadb.h102 ** us to our fd event system. For remote asockets
106 int fd; member in struct:asocket
185 int fd; member in struct:atransport
194 /* usb handle or socket fd as needed */
232 int fd; member in struct:alistener
250 asocket *create_local_socket(int fd);
330 void framebuffer_service(int fd, void *cookie);
331 void remount_service(int fd, void *cookie);
332 void disable_verity_service(int fd, void* cookie);
415 int sendfailmsg(int fd, cons
[all...]
H A Dadb_auth_client.c171 static void adb_auth_event(int fd, unsigned events, void *data) argument
177 ret = unix_read(fd, response, sizeof(response));
229 static void adb_auth_listener(int fd, unsigned events, void *data) argument
237 s = adb_socket_accept(fd, &addr, &alen);
253 int fd, ret; local
255 fd = android_get_control_socket("adbd");
256 if (fd < 0) {
260 fcntl(fd, F_SETFD, FD_CLOEXEC);
262 ret = listen(fd, 4);
264 D("Failed to listen on '%d'\n", fd);
[all...]
H A Dadb_client.c92 static int switch_socket_transport(int fd) argument
124 if(writex(fd, tmp, 4) || writex(fd, service, len)) {
126 adb_close(fd);
131 if(adb_status(fd)) {
132 adb_close(fd);
140 int adb_status(int fd) argument
145 if(readx(fd, buf, 4)) {
161 if(readx(fd, buf, 4)) {
168 if(readx(fd, __adb_erro
180 int fd; local
222 int fd = _adb_connect("host:version"); local
297 int fd = adb_connect(service); local
318 int fd = adb_connect(service); local
[all...]
H A Dcommandline.c245 static void stdin_raw_init(int fd) argument
249 if(tcgetattr(fd, &tio)) return;
250 if(tcgetattr(fd, &tio_save)) return;
258 tcsetattr(fd, TCSANOW, &tio);
259 tcflush(fd, TCIFLUSH);
262 static void stdin_raw_restore(int fd) argument
264 tcsetattr(fd, TCSANOW, &tio_save);
265 tcflush(fd, TCIFLUSH);
269 static void read_and_dump(int fd) argument
274 while(fd >
291 read_status_line(int fd, char* buf, size_t count) argument
358 int fd, fdi; local
412 int fdi, fd; local
458 int fd; local
568 int fd = adb_connect(buf); local
649 int fd; local
804 int fd, ret; local
876 int fd, outFd; local
930 int fd, tarFd; local
1334 int fd; local
1394 int fd; local
1423 int fd; local
1452 int fd = adb_connect(command); local
1733 int fd = adb_connect("jdwp"); local
1996 int fd = adb_connect(buf); local
[all...]

Completed in 517 milliseconds

123456789