mirror of
https://gitee.com/openharmony/filemanagement_storage_service
synced 2024-11-23 06:59:59 +00:00
commit
73e3009a53
@ -296,12 +296,18 @@ int32_t ExternalVolumeInfo::DoSetVolDesc(std::string description)
|
||||
{
|
||||
int32_t err = 0;
|
||||
if (fsType_ == "ntfs") {
|
||||
std::vector<std::string> cmd = {
|
||||
std::vector<std::string> fixCmd = {
|
||||
"ntfsfix",
|
||||
"-d",
|
||||
devPath_
|
||||
};
|
||||
err = ForkExec(fixCmd);
|
||||
std::vector<std::string> labelCmd = {
|
||||
"ntfslabel",
|
||||
devPath_,
|
||||
description
|
||||
};
|
||||
err = ForkExec(cmd);
|
||||
err = ForkExec(labelCmd);
|
||||
} else if (fsType_ == "exfat") {
|
||||
std::vector<std::string> cmd = {
|
||||
"exfatlabel",
|
||||
|
Loading…
Reference in New Issue
Block a user