Files
Zygisk-Assistant/module/jni/mount_parser.hpp
snake-4 c1070182a2 Added usermode unmounter and mounts parser
+ Added a mounts parser implementation using mntent API.
+ Added logging functions.
+ Added usermode unmounter which calls unshare pre app-specialization.
* Updated module.prop.
2024-03-25 21:36:47 +01:00

30 lines
709 B
C++

#include <string>
#include <vector>
#include <unordered_map>
#include <mntent.h>
class mount_entry_t
{
public:
mount_entry_t(::mntent *entry);
const std::string &getFsName() const;
const std::string &getMountPoint() const;
const std::string &getType() const;
const std::unordered_map<std::string, std::string> &getOptions() const;
int getDumpFrequency() const;
int getPassNumber() const;
private:
void parseMountOptions(const std::string &input);
std::string fsname;
std::string dir;
std::string type;
std::unordered_map<std::string, std::string> opts_map;
int freq;
int passno;
};
std::vector<mount_entry_t> parseMountsFromPath(const char *path);