Lines Matching refs:tmpfd
212 int res = -1, tmpfd, tmpfd2;
229 tmpfd = creat((char*)args[0], 0755);
230 ftruncate(tmpfd, 1); /* So that mmap() doesn't fool us */
231 if (tmpfd >= 0) {
232 close(tmpfd);
240 tmpfd = open((char*)args[0], O_RDONLY);
241 if (tmpfd >= 0) {
242 res = read(tmpfd, &c, 1);
245 close(tmpfd);
248 tmpfd = open((char*)args[0], O_RDWR);
249 if (tmpfd >= 0) {
250 res = write(tmpfd, TEST_STRING, strlen(TEST_STRING));
257 close(tmpfd);
308 tmpfd = open((char*)args[0], O_RDONLY | O_CREAT);
309 res = close(tmpfd);
313 tmpfd = open((char*)args[0], O_RDWR);
314 addr = mmap(0, 20, PROT_WRITE | PROT_READ, MAP_FILE | MAP_SHARED, tmpfd, 0);
322 close(tmpfd);
341 tmpfd = open((char*)args[0], O_RDONLY);
343 close(tmpfd);