Lines Matching refs:mfr
793 mtp_file_range mfr; in doGetObject() local
794 mfr.fd = open(filePath, O_RDONLY); in doGetObject()
795 if (mfr.fd < 0) { in doGetObject()
798 mfr.offset = 0; in doGetObject()
799 mfr.length = fileLength; in doGetObject()
800 mfr.command = mRequest.getOperationCode(); in doGetObject()
801 mfr.transaction_id = mRequest.getTransactionID(); in doGetObject()
804 int ret = mHandle->sendFile(mfr); in doGetObject()
819 fstat(mfr.fd, &sstat); in doGetObject()
823 closeObjFd(mfr.fd, filePath); in doGetObject()
880 mtp_file_range mfr; in doGetPartialObject() local
881 mfr.fd = open(filePath, O_RDONLY); in doGetPartialObject()
882 if (mfr.fd < 0) { in doGetPartialObject()
885 mfr.offset = offset; in doGetPartialObject()
886 mfr.length = length; in doGetPartialObject()
887 mfr.command = mRequest.getOperationCode(); in doGetPartialObject()
888 mfr.transaction_id = mRequest.getTransactionID(); in doGetPartialObject()
892 int ret = mHandle->sendFile(mfr); in doGetPartialObject()
901 closeObjFd(mfr.fd, filePath); in doGetPartialObject()
1208 mtp_file_range mfr; in doSendObject() local
1209 mfr.fd = open(mSendObjectFilePath, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); in doSendObject()
1210 if (mfr.fd < 0) { in doSendObject()
1214 fchown(mfr.fd, getuid(), FILE_GROUP); in doSendObject()
1217 fchmod(mfr.fd, FILE_PERM); in doSendObject()
1221 ret = write(mfr.fd, mData.getData(), initialData); in doSendObject()
1228 mfr.offset = initialData; in doSendObject()
1231 mfr.length = 0xFFFFFFFF; in doSendObject()
1233 mfr.length = mSendObjectFileSize - initialData; in doSendObject()
1236 mfr.command = 0; in doSendObject()
1237 mfr.transaction_id = 0; in doSendObject()
1240 ret = mHandle->receiveFile(mfr, mfr.length == 0 && in doSendObject()
1252 if (futimens(mfr.fd, newTime) < 0) { in doSendObject()
1257 fstat(mfr.fd, &sstat); in doSendObject()
1258 closeObjFd(mfr.fd, mSendObjectFilePath); in doSendObject()
1384 mtp_file_range mfr; in doSendPartialObject() local
1385 mfr.fd = edit->mFD; in doSendPartialObject()
1386 mfr.offset = offset; in doSendPartialObject()
1387 mfr.length = length; in doSendPartialObject()
1388 mfr.command = 0; in doSendPartialObject()
1389 mfr.transaction_id = 0; in doSendPartialObject()
1392 ret = mHandle->receiveFile(mfr, mfr.length == 0 && in doSendPartialObject()