Skip to content

Commit

Permalink
fix windows compile
Browse files Browse the repository at this point in the history
  • Loading branch information
XUranus committed Dec 30, 2023
1 parent 336c11d commit 3321ea3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 1 addition & 2 deletions cli/vbackup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static CliArgs ParseCliArgs(int argc, const char** argv)
GetOptionResult result = GetOption(
argv + 1, argc - 1,
"v:n:f:d:m:k:p:h:r:l:",
{"--volume=", "--name=", "--format=", "--data=", "--meta=", "--checkpoint="
{"--volume=", "--name=", "--format=", "--data=", "--meta=", "--checkpoint=",
"--prevmeta=", "--help", "--restore", "--loglevel="});
for (const OptionResult opt: result.opts) {
if (opt.option == "v" || opt.option == "volume") {
Expand Down Expand Up @@ -196,7 +196,6 @@ void InitLogger(const CliArgs& cliArgs)
#else
conf.logDirPath = "/tmp/LoggerTest";
#endif
Logger::GetInstance()->SetLogLevel(LoggerLevel::DEBUG);
if (!Logger::GetInstance()->Init(conf)) {
std::cerr << "Init logger failed" << std::endl;
}
Expand Down
7 changes: 6 additions & 1 deletion src/native/linux/LinuxMountUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* https://android.googlesource.com/platform/system/core/+/jb-mr1.1-dev-plus-aosp/toolbox/mount.c
*/

#ifdef __linux__

#include <cerrno>
#include <fcntl.h>
#include <sys/mount.h>
Expand Down Expand Up @@ -322,6 +324,7 @@ bool linuxmountutil::Umount(const std::string& mountTargetPath, bool force)
::umount2(mountTargetPath.c_str(), flags) != 0) {
return false;
}
return true;
}

bool linuxmountutil::IsMountPoint(const std::string& dirPath)
Expand Down Expand Up @@ -362,4 +365,6 @@ std::string linuxmountutil::GetMountDevicePath(const std::string& mountTargetPat
}
::endmntent(mountsFile);
return devicePath;
}
}

#endif

0 comments on commit 3321ea3

Please sign in to comment.