mirror of
https://gitee.com/openharmony/filemanagement_storage_service
synced 2024-11-23 23:19:57 +00:00
update services/storage_daemon/mtpfs/src/mtpfs_main.cpp.
Signed-off-by: 李尚 <lishang21@huawei.com>
This commit is contained in:
parent
bce7a58692
commit
3d7cf1b8c4
@ -13,6 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include "mtpfs_fuse.h"
|
||||
#include "mtpfs_util.h"
|
||||
#include "storage_service_log.h"
|
||||
@ -20,10 +21,18 @@
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
if (!DelayedSingleton<MtpFileSystem>::GetInstance()->ParseOptions(argc, argv)) {
|
||||
LOGE("mtpfs wrong usage, see %{public}s -h for details.", SmtpfsBaseName(argv[0]).c_str());
|
||||
std::cout << "mtpfs wrong usage, see " << SmtpfsBaseName(argv[0]) << " -h for details.\n";
|
||||
LOGE("mtp wrong usage! See ` %{public}s -h' for details", SmtpfsBaseName(argv[0]).c_str());
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool success = DelayedSingleton<MtpFileSystem>::GetInstance()->Exec();
|
||||
return !success;
|
||||
if (!success) {
|
||||
LOGE("Exec mtpfs.bin to mount mtp device failed.");
|
||||
std::cout << "Exec mtpfs to mount mtp device failed.\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
LOGI("Exec mtpfs.bin to mount mtp device success.");
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user