12 int isDIR(
char *dpath);
13 int isEMPTYDIR(
char *dpath);
19 int isINODE(
char *ipath,
int typ);
21 char *pluralName(
char *
s,
int count);
24 char *memAllocTagged(
int size,
char *name);
25 void memFreeTagged(
void *ptr,
char *note);
26 void memCacheDump(
char *
s);
29 char *
findBol(
char *
s,
char *upperLimit);
31 void changeDir(
char *pathname);
33 void unlinkFile(
char *pathname);
35 FILE *
fopenFile(
char *pathname,
char *mode);
36 FILE *
popenProc(
char *command,
char *mode);
40 char *
getInstances(
char *textp,
int size,
int nBefore,
int nAfter,
char *regex,
int recordOffsets);
44 void memStats(
char *
s);
52 void mmapOpenListing();
56 int nftwFileFilter(
char *pathname,
struct stat *st,
int onlySingleLink);
57 void makePath(
char *dirpath);
58 void makeDir(
char *dirpath);
59 void removeDir(
char *dir);
61 int iMadeThis(
char *textp);
62 int isFILE(
char *pathname);
63 int addEntry(
char *pathname,
int forceFlag,
const char *fmt, ...);
64 void Msg(
const char *fmt, ...);
65 void Log(
const char *fmt, ...);
66 void MsgLog(
const char *fmt, ...);
67 void Note(
const char *fmt, ...);
68 void Warn(
const char *fmt, ...);
69 void Assert(
int fatalFlag,
const char *fmt, ...);
70 void Error(
const char *fmt, ...);
71 void Fatal(
const char *fmt, ...);
72 void traceFunc(
char *fmtStr, ...);
Fatal($msg, $filenm, $lineno)
Write message to stdout and die.
int s
The socket that the CLI will use to communicate.
char * findBol(char *s, char *upperLimit)
Find Begin of Line in a string.
int isSYMLINK(char *spath)
Check if given path is a symbolic link.
void munmapFile(void *ptr)
FILE * fopenFile(char *pathname, char *mode)
Open a file and return the file pointer.
int isFILE(char *pathname)
Check if an inode is a file.
int isINODE(char *ipath, int typ)
Check for a inode against a flag.
int isEMPTYFILE(char *fpath)
Check if given file is empty.
void printRegexMatch(int n, int cached)
CDB – Need to review this code, particularly for the use of an external file (Nomos....
char * pathBasename(char *path)
Get the basename from a file path.
char * getInstances(char *textp, int size, int nBefore, int nAfter, char *regex, int recordOffsets)
Get occurrence of a regex in a given string pointer.
FILE * popenProc(char *command, char *mode)
Open a process pipe using popen()
int isDIR(char *dpath)
Check if given path is a directory.
char * copyString(char *s, char *label)
Create a copy of a string.
int isPIPE(char *ppath)
Check if given path is a pipe.
char * curDate()
Get the current date.
void Assert(int fatalFlag, const char *fmt,...)
Raise an assert.
char * wordCount(char *textp)
VERY simple line count, does NOT have to be perfect!
void renameInode(char *oldpath, char *newpath)
Rename an inode at oldpath to newpath.
int mySystem(const char *fmt,...)
Run a system command.
int isBLOCK(char *bpath)
Check if given path is a Block device.
int bufferLineCount(char *p, int len)
Finds the length of first line in a buffer.
void appendFile(char *pathname, char *str)
Append a string at the end of the file.
void chmodInode(char *pathname, int mode)
Change inode mode bits.
void makeSymlink(char *path)
Create symbolic links for a given path in current directory.
char * findEol(char *s)
Find first ROL in a string.
void Msg(const char *fmt,...)
DO NOT automatically add to a string passed to Msg(); in parseDistro, we sometimes want to dump a p...
int addEntry(char *pathname, int forceFlag, const char *fmt,...)
adds a line to the specified pathname
int isCHAR(char *cpath)
Check if given path is a character device.
char * mmapFile(char *pathname)
Blarg. Files that are EXACTLY a multiple of the system pagesize do not get a NULL on the end of the b...
char * newReloTarget(char *basename)
Check if a relocation target is accessible.