Match-id-0342455040ca22ad7bef331d4c7e37bae4fa44bf

This commit is contained in:
BianTanggui
2020-07-04 19:12:20 +08:00
parent 70b5d7ff3e
commit d29403afa5
8 changed files with 126 additions and 92 deletions

View File

@@ -6,18 +6,21 @@
#include <sys/types.h>
#include "basic.h"
// For cgroup setup
int StrHasPrefix(const char *str, const char *prefix);
typedef char *(*ParseFileLine)(char *, const char *);
int CatFileContent(char* buffer, int bufferSize, ParseFileLine fn, const char* filepath);
bool CheckFsType(char **pLine);
bool CheckSubStr(char **pLine, const char *subsys);
bool CheckRootDir(char **pLine);
int MakeDir(const char *dir, int mode);
// For mount setup
int MkDir(const char *dir, int mode);
int MakeParentDir(const char *path, mode_t mode);
int CheckDirExists(const char *dir);
int GetParentPathStr(const char *path, char *parent, size_t bufSize);
int CreateFile(const char *path, mode_t mode);
int VerfifyPathInfo(const struct PathInfo* pathInfo);
int Mount(const char *src, const char *dst);
int IsStrEqual(const char *s1, const char *s2);
int StrHasPrefix(const char *str, const char *prefix);
#endif