/frameworks/compile/libbcc/lib/Support/ |
FileBase.cpp | 33 : mFD(-1), 65 mFD = ::open(mName.c_str(), mOpenFlags, 0644); 66 if (mFD > 0) { 81 // Check the file integrity by examining whether the inode referring to the mFD 85 // Get the file status of file descriptor mFD. 87 if (::fstat(mFD, &fd_stat) == 0) { 122 if ((mFD < 0) || hasError()) { 146 if (::flock(mFD, lock_operation) == 0) { 148 // Here we got a lock but we need to check whether the mFD still 150 // check may failed when another process deleted the original file mFD [all...] |
InputFile.cpp | 27 if ((mFD < 0) || hasError()) { 38 ssize_t read_size = ::read(mFD, pBuf, count);
|
OutputFile.cpp | 84 if ((mFD < 0) || hasError()) { 95 ssize_t write_size = ::write(mFD, pBuf, count); 113 if (mFD < 0) { 118 if (::ftruncate(mFD, 0) == 0) { 131 newfd = ::dup(mFD);
|
/frameworks/av/media/libstagefright/ |
FileSource.cpp | 28 : mFd(-1), 37 mFd = open(filename, O_LARGEFILE | O_RDONLY); 39 if (mFd >= 0) { 40 mLength = lseek64(mFd, 0, SEEK_END); 47 : mFd(fd), 60 if (mFd >= 0) { 61 close(mFd); 62 mFd = -1; 84 return mFd >= 0 ? OK : NO_INIT; 88 if (mFd < 0) [all...] |
AMRWriter.cpp | 33 : mFd(-1), 39 mFd = open(filename, O_CREAT | O_LARGEFILE | O_TRUNC | O_RDWR, S_IRUSR | S_IWUSR); 40 if (mFd >= 0) { 46 : mFd(dup(fd)), 47 mInitCheck(mFd < 0? NO_INIT: OK), 58 if (mFd != -1) { 59 close(mFd); 60 mFd = -1; 101 if (write(mFd, kHeader, n) != n) { 250 ssize_t n = write(mFd, [all...] |
AACWriter.cpp | 38 : mFd(-1), 49 mFd = open(filename, O_CREAT | O_LARGEFILE | O_TRUNC | O_RDWR, S_IRUSR | S_IWUSR); 50 if (mFd >= 0) { 56 : mFd(dup(fd)), 57 mInitCheck(mFd < 0? NO_INIT: OK), 70 if (mFd != -1) { 71 close(mFd); 72 mFd = -1; 255 write(mFd, &data, 1); 264 write(mFd, &data, 1) [all...] |
/libcore/luni/src/main/native/ |
NetFd.h | 26 : mEnv(env), mFileDescriptor(fileDescriptor), mFd(-1) 31 mFd = jniGetFDFromFileDescriptor(mEnv, mFileDescriptor); 32 bool closed = (mFd == -1); 40 return mFd; 46 int mFd;
|
AsynchronousSocketCloseMonitor.h | 53 int mFd;
|
/frameworks/native/libs/utils/ |
Static.cpp | 69 FdTextOutput(int fd) : BufferedTextOutput(MULTITHREADED), mFD(fd) { } 75 writev(mFD, &vec, N); 80 int mFD;
|
ZipFileRO.cpp | 109 if (mFd >= 0) 110 TEMP_FAILURE_RETRY(close(mFd)); 160 mFd = fd; 205 if (lseek64(mFd, 0, SEEK_SET) != 0) { 211 ssize_t actual = TEMP_FAILURE_RETRY(read(mFd, scanBuf, sizeof(int32_t))); 245 if (lseek64(mFd, searchStart, SEEK_SET) != searchStart) { 250 actual = TEMP_FAILURE_RETRY(read(mFd, scanBuf, readAmount)); 311 if (!mDirectoryMap->create(mFileName, mFd, dirOffset, dirSize, true)) { 563 TEMP_FAILURE_RETRY(pread64(mFd, lfhBuf, sizeof(lfhBuf), localHdrOffset)); 588 if (lseek64(mFd, localHdrOffset, SEEK_SET) != localHdrOffset) [all...] |
/cts/tests/tests/content/src/android/content/res/cts/ |
AssetFileDescriptor_AutoCloseInputStreamTest.java | 38 private AssetFileDescriptor mFd; 53 if (mFd != null) { 54 mFd.close(); 55 mFd = null; 157 if (mFd != null) { 158 mFd.close(); 159 mFd = null; 163 mFd = new AssetFileDescriptor(fd, startOffset, length); 164 mInput = new AssetFileDescriptor.AutoCloseInputStream(mFd);
|
AssetFileDescriptorTest.java | 40 private ParcelFileDescriptor mFd; 53 mFd = ParcelFileDescriptor.open(mFile, ParcelFileDescriptor.MODE_READ_WRITE); 54 mAssetFileDes = new AssetFileDescriptor(mFd, START_OFFSET, LENGTH); 161 assertSame(mFd, mAssetFileDes.getParcelFileDescriptor()); 162 assertSame(mFd.getFileDescriptor(), mAssetFileDes.getFileDescriptor()); 164 assertEquals(mFd.describeContents(), mAssetFileDes.describeContents());
|
/frameworks/av/media/mtp/ |
MtpServer.h | 38 int mFD; 79 int mFD; 83 : mHandle(handle), mPath(path), mSize(size), mFormat(format), mFD(fd) { 87 close(mFD);
|
/frameworks/native/libs/binder/ |
MemoryHeapBase.cpp | 44 : mFD(-1), mSize(0), mBase(MAP_FAILED), 50 : mFD(-1), mSize(0), mBase(MAP_FAILED), mFlags(flags), 67 : mFD(-1), mSize(0), mBase(MAP_FAILED), mFlags(flags), 86 : mFD(-1), mSize(0), mBase(MAP_FAILED), mFlags(flags), 96 if (mFD != -1) { 99 mFD = fd; 142 mFD = fd; 155 int fd = android_atomic_or(-1, &mFD); 168 return mFD;
|
/device/generic/goldfish/audio/ |
AudioHardwareGeneric.cpp | 43 : mOutput(0), mInput(0), mFd(-1), mMicMute(false) 45 mFd = ::open(kAudioDeviceName, O_RDWR); 50 if (mFd >= 0) ::close(mFd); 57 if (mFd >= 0) { 79 status_t lStatus = out->set(this, mFd, devices, format, channels, sampleRate); 119 status_t lStatus = in->set(this, mFd, devices, format, channels, sampleRate, acoustics); 169 snprintf(buffer, SIZE, "\tmFd: %d mMicMute: %s\n", mFd, mMicMute? "true": "false"); 221 mFd = fd; 233 return ssize_t(::write(mFd, buffer, bytes)) [all...] |
AudioHardwareGeneric.h | 38 AudioStreamOutGeneric() : mAudioHardware(0), mFd(-1) {} 43 int mFd, 65 int mFd; 71 AudioStreamInGeneric() : mAudioHardware(0), mFd(-1) {} 76 int mFd, 100 int mFd; 147 int mFd;
|
/hardware/libhardware_legacy/audio/ |
AudioHardwareGeneric.cpp | 46 : mOutput(0), mInput(0), mFd(-1), mMicMute(false) 48 mFd = ::open(kAudioDeviceName, O_RDWR); 53 if (mFd >= 0) ::close(mFd); 60 if (mFd >= 0) { 82 status_t lStatus = out->set(this, mFd, devices, format, channels, sampleRate); 122 status_t lStatus = in->set(this, mFd, devices, format, channels, sampleRate, acoustics); 172 snprintf(buffer, SIZE, "\tmFd: %d mMicMute: %s\n", mFd, mMicMute? "true": "false"); 224 mFd = fd; 236 return ssize_t(::write(mFd, buffer, bytes)) [all...] |
AudioHardwareGeneric.h | 39 AudioStreamOutGeneric() : mAudioHardware(0), mFd(-1) {} 44 int mFd, 66 int mFd; 72 AudioStreamInGeneric() : mAudioHardware(0), mFd(-1) {} 77 int mFd, 99 int mFd; 146 int mFd;
|
/frameworks/base/core/java/android/content/res/ |
AssetFileDescriptor.java | 41 private final ParcelFileDescriptor mFd; 62 mFd = fd; 73 return mFd; 81 return mFd.getFileDescriptor(); 106 long len = mFd.getStatSize(); 126 mFd.close(); 139 return new ParcelFileDescriptor.AutoCloseInputStream(mFd); 154 return new ParcelFileDescriptor.AutoCloseOutputStream(mFd); 161 return "{AssetFileDescriptor: " + mFd 312 return mFd.describeContents() [all...] |
/frameworks/base/core/java/android/os/ |
MemoryFile.java | 57 private FileDescriptor mFD; // ashmem file descriptor 71 mFD = native_open(name, length); 73 mAddress = native_mmap(mFD, length, PROT_READ | PROT_WRITE); 86 native_close(mFD); 119 return !mFD.valid(); 158 native_pin(mFD, !allowPurging); 204 return native_read(mFD, mAddress, buffer, srcOffset, destOffset, count, mAllowPurging); 228 native_write(mFD, mAddress, buffer, srcOffset, destOffset, count, mAllowPurging); 241 return mFD;
|
/frameworks/av/cmds/stagefright/ |
stream.cpp | 57 int mFd; 68 : mFd(fd), 78 close(mFd); 79 mFd = -1; 100 lseek(mFd, offset, SEEK_SET); 114 ssize_t n = read(mFd, mem->pointer(), mem->size());
|
/frameworks/av/include/media/stagefright/ |
AACWriter.h | 49 int mFd;
|
AMRWriter.h | 47 int mFd;
|
FileSource.h | 49 int mFd;
|
/frameworks/base/libs/androidfw/ |
StreamingZipInflater.cpp | 36 mFd = fd; 55 mFd = -1; 96 ::lseek(mFd, mInFileStart, SEEK_SET); 194 ssize_t didRead = ::read(mFd, mInBuf, toRead);
|