• Home
  • Raw
  • Download

Lines Matching refs:mfr

793     mtp_file_range mfr;  in doGetObject()  local
805 mfr.fd = mDatabase->openFilePath(filePath, true); in doGetObject()
806 fstat(mfr.fd, &sstat); in doGetObject()
809 if (mfr.fd < 0) { in doGetObject()
819 mfr.fd = open(filePath, O_RDONLY); in doGetObject()
820 if (mfr.fd < 0) { in doGetObject()
823 fstat(mfr.fd, &sstat); in doGetObject()
827 mfr.offset = 0; in doGetObject()
828 mfr.length = fileLength; in doGetObject()
829 mfr.command = mRequest.getOperationCode(); in doGetObject()
830 mfr.transaction_id = mRequest.getTransactionID(); in doGetObject()
833 int ret = mHandle->sendFile(mfr); in doGetObject()
849 closeObjFd(mfr.fd, filePath); in doGetObject()
906 mtp_file_range mfr; in doGetPartialObject() local
907 mfr.fd = open(filePath, O_RDONLY); in doGetPartialObject()
908 if (mfr.fd < 0) { in doGetPartialObject()
911 mfr.offset = offset; in doGetPartialObject()
912 mfr.length = length; in doGetPartialObject()
913 mfr.command = mRequest.getOperationCode(); in doGetPartialObject()
914 mfr.transaction_id = mRequest.getTransactionID(); in doGetPartialObject()
918 int ret = mHandle->sendFile(mfr); in doGetPartialObject()
927 closeObjFd(mfr.fd, filePath); in doGetPartialObject()
1234 mtp_file_range mfr; in doSendObject() local
1235 mfr.fd = open(mSendObjectFilePath, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); in doSendObject()
1236 if (mfr.fd < 0) { in doSendObject()
1240 fchown(mfr.fd, getuid(), FILE_GROUP); in doSendObject()
1243 fchmod(mfr.fd, FILE_PERM); in doSendObject()
1247 ret = write(mfr.fd, mData.getData(), initialData); in doSendObject()
1254 mfr.offset = initialData; in doSendObject()
1257 mfr.length = 0xFFFFFFFF; in doSendObject()
1259 mfr.length = mSendObjectFileSize - initialData; in doSendObject()
1262 mfr.command = 0; in doSendObject()
1263 mfr.transaction_id = 0; in doSendObject()
1266 ret = mHandle->receiveFile(mfr, mfr.length == 0 && in doSendObject()
1278 if (futimens(mfr.fd, newTime) < 0) { in doSendObject()
1283 fstat(mfr.fd, &sstat); in doSendObject()
1284 closeObjFd(mfr.fd, mSendObjectFilePath); in doSendObject()
1410 mtp_file_range mfr; in doSendPartialObject() local
1411 mfr.fd = edit->mFD; in doSendPartialObject()
1412 mfr.offset = offset; in doSendPartialObject()
1413 mfr.length = length; in doSendPartialObject()
1414 mfr.command = 0; in doSendPartialObject()
1415 mfr.transaction_id = 0; in doSendPartialObject()
1418 ret = mHandle->receiveFile(mfr, mfr.length == 0 && in doSendPartialObject()