Home
last modified time | relevance | path

Searched refs:mfr (Results 1 – 11 of 11) sorted by relevance

/frameworks/av/media/mtp/tests/MtpFfsHandleTest/
DMtpFfsHandle_test.cpp166 mtp_file_range mfr; in TYPED_TEST() local
171 mfr.offset = 0; in TYPED_TEST()
172 mfr.length = size; in TYPED_TEST()
173 mfr.fd = this->dummy_file.fd; in TYPED_TEST()
176 EXPECT_EQ(this->handle->receiveFile(mfr, false), 0); in TYPED_TEST()
183 mtp_file_range mfr; in TYPED_TEST() local
188 mfr.offset = 0; in TYPED_TEST()
189 mfr.length = size; in TYPED_TEST()
190 mfr.fd = this->dummy_file.fd; in TYPED_TEST()
195 EXPECT_EQ(this->handle->receiveFile(mfr, false), 0); in TYPED_TEST()
[all …]
/frameworks/av/media/mtp/tests/MtpFuzzer/
Dmtp_handle_fuzzer.cpp156 mtp_file_range mfr; in invokeMtpFfsHandle() local
157 mfr.fd = open(kFuzzerMtpInputFile.c_str(), O_CREAT | O_RDWR | O_NONBLOCK); in invokeMtpFfsHandle()
158 mfr.length = writeInputFile(mfr.fd); in invokeMtpFfsHandle()
159 mfr.offset = 0; /* Offset point to the start of the file */ in invokeMtpFfsHandle()
160 mfr.command = mFdp.ConsumeIntegral<uint16_t>(); in invokeMtpFfsHandle()
161 mfr.transaction_id = mFdp.ConsumeIntegral<uint32_t>(); in invokeMtpFfsHandle()
162 handle->sendFile(mfr); in invokeMtpFfsHandle()
163 close(mfr.fd); in invokeMtpFfsHandle()
177 mtp_file_range mfr; in invokeMtpFfsHandle() local
178 mfr.fd = open(kFuzzerMtpOutputFile.c_str(), O_CREAT | O_RDWR | O_NONBLOCK); in invokeMtpFfsHandle()
[all …]
DMtpMockHandle.h72 int receiveFile(mtp_file_range mfr, bool zero_packet) { in receiveFile() argument
76 int sendFile(mtp_file_range mfr) { in sendFile() argument
/frameworks/av/media/mtp/
DMtpFfsCompatHandle.cpp160 int MtpFfsCompatHandle::receiveFile(mtp_file_range mfr, bool zero_packet) { in receiveFile() argument
163 uint32_t file_length = mfr.length; in receiveFile()
164 uint64_t offset = mfr.offset; in receiveFile()
171 aio.aio_fildes = mfr.fd; in receiveFile()
179 posix_fadvise(mfr.fd, 0, 0, POSIX_FADV_SEQUENTIAL | POSIX_FADV_NOREUSE); in receiveFile()
246 int MtpFfsCompatHandle::sendFile(mtp_file_range mfr) { in sendFile() argument
247 uint64_t file_length = mfr.length; in sendFile()
250 uint64_t offset = mfr.offset; in sendFile()
261 posix_fadvise(mfr.fd, 0, 0, POSIX_FADV_SEQUENTIAL | POSIX_FADV_NOREUSE); in sendFile()
264 aio.aio_fildes = mfr.fd; in sendFile()
[all …]
DMtpServer.cpp797 mtp_file_range mfr; in doGetObject() local
809 mfr.fd = mDatabase->openFilePath(filePath, true); in doGetObject()
810 fstat(mfr.fd, &sstat); in doGetObject()
813 if (mfr.fd < 0) { in doGetObject()
823 mfr.fd = open(filePath, O_RDONLY); in doGetObject()
824 if (mfr.fd < 0) { in doGetObject()
827 fstat(mfr.fd, &sstat); in doGetObject()
831 mfr.offset = 0; in doGetObject()
832 mfr.length = fileLength; in doGetObject()
833 mfr.command = mRequest.getOperationCode(); in doGetObject()
[all …]
DMtpDevHandle.cpp51 int MtpDevHandle::receiveFile(mtp_file_range mfr, bool) { in receiveFile() argument
52 return ioctl(mFd, MTP_RECEIVE_FILE, reinterpret_cast<unsigned long>(&mfr)); in receiveFile()
55 int MtpDevHandle::sendFile(mtp_file_range mfr) { in sendFile() argument
56 return ioctl(mFd, MTP_SEND_FILE_WITH_HEADER, reinterpret_cast<unsigned long>(&mfr)); in sendFile()
DMtpDevHandle.h35 int receiveFile(mtp_file_range mfr, bool);
36 int sendFile(mtp_file_range mfr);
DIMtpHandle.h30 virtual int receiveFile(mtp_file_range mfr, bool zero_packet) = 0;
31 virtual int sendFile(mtp_file_range mfr) = 0;
DMtpFfsHandle.cpp447 int MtpFfsHandle::receiveFile(mtp_file_range mfr, bool zero_packet) { in receiveFile() argument
450 uint32_t file_length = mfr.length; in receiveFile()
451 uint64_t offset = mfr.offset; in receiveFile()
454 aio.aio_fildes = mfr.fd; in receiveFile()
467 advise(mfr.fd); in receiveFile()
568 int MtpFfsHandle::sendFile(mtp_file_range mfr) { in sendFile() argument
569 uint64_t file_length = mfr.length; in sendFile()
572 uint64_t offset = mfr.offset; in sendFile()
580 advise(mfr.fd); in sendFile()
583 aio.aio_fildes = mfr.fd; in sendFile()
[all …]
DMtpFfsCompatHandle.h38 int receiveFile(mtp_file_range mfr, bool zero_packet) override;
39 int sendFile(mtp_file_range mfr) override;
DMtpFfsHandle.h96 int receiveFile(mtp_file_range mfr, bool zero_packet) override;
97 int sendFile(mtp_file_range mfr) override;