mirror of
https://github.com/Ascend/ascend-docker-runtime.git
synced 2025-10-13 04:43:50 +08:00
Match-id-c4316230dc6d4215a0a107038252461f5d998e11
This commit is contained in:
23
cli/src/utils.h
Normal file
23
cli/src/utils.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef _UTILS_H
|
||||
#define _UTILS_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <limits.h>
|
||||
#include <sys/types.h>
|
||||
#include "basic.h"
|
||||
|
||||
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);
|
||||
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
|
Reference in New Issue
Block a user