|
int | isDIR (char *dpath) |
| Check if given path is a directory. More...
|
|
int | isEMPTYFILE (char *fpath) |
| Check if given file is empty. More...
|
|
int | isBLOCK (char *bpath) |
| Check if given path is a Block device. More...
|
|
int | isCHAR (char *cpath) |
| Check if given path is a character device. More...
|
|
int | isPIPE (char *ppath) |
| Check if given path is a pipe. More...
|
|
int | isSYMLINK (char *spath) |
| Check if given path is a symbolic link. More...
|
|
int | isINODE (char *ipath, int typ) |
| Check for a inode against a flag. More...
|
|
char * | newReloTarget (char *basename) |
| Check if a relocation target is accessible. More...
|
|
char * | findBol (char *s, char *upperLimit) |
| Find Begin of Line in a string. More...
|
|
char * | findEol (char *s) |
| Find first ROL in a string. More...
|
|
void | renameInode (char *oldpath, char *newpath) |
| Rename an inode at oldpath to newpath. More...
|
|
void | chmodInode (char *pathname, int mode) |
| Change inode mode bits. More...
|
|
FILE * | fopenFile (char *pathname, char *mode) |
| Open a file and return the file pointer. More...
|
|
FILE * | popenProc (char *command, char *mode) |
| Open a process pipe using popen() More...
|
|
char * | wordCount (char *textp) |
| VERY simple line count, does NOT have to be perfect! More...
|
|
char * | copyString (char *s, char *label) |
| Create a copy of a string. More...
|
|
char * | pathBasename (char *path) |
| Get the basename from a file path. More...
|
|
char * | getInstances (char *textp, int size, int nBefore, int nAfter, char *regex, int recordOffsets) |
| Get occurrence of a regex in a given string pointer.
|
|
char * | curDate () |
| Get the current date. More...
|
|
void | makeSymlink (char *path) |
| Create symbolic links for a given path in current directory. More...
|
|
void | printRegexMatch (int n, int cached) |
| CDB – Need to review this code, particularly for the use of an external file (Nomos.strings.txt). Despite the fact that variable is named debugStr, the file appears to be used for more than just debugging. More...
|
|
void | ReplaceNulls (char *Buffer, int BufferSize) |
| Replace all nulls in Buffer with blanks. More...
|
|
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 buffer. We need something creative, else we'll need to just calloc() the size of the file (plus one) and read() the whole thing into memory.
|
|
void | mmapOpenListing () |
|
void | munmapFile (void *ptr) |
|
int | bufferLineCount (char *p, int len) |
| Finds the length of first line in a buffer. More...
|
|
void | appendFile (char *pathname, char *str) |
| Append a string at the end of the file. More...
|
|
int | mySystem (const char *fmt,...) |
| Run a system command. More...
|
|
int | isFILE (char *pathname) |
| Check if an inode is a file. More...
|
|
int | addEntry (char *pathname, int forceFlag, const char *fmt,...) |
| adds a line to the specified pathname More...
|
|
void | Msg (const char *fmt,...) |
| DO NOT automatically add
to a string passed to Msg(); in parseDistro, we sometimes want to dump a partial line.
|
|
void | Assert (int fatalFlag, const char *fmt,...) |
| Raise an assert. More...
|
|
void | traceFunc (char *fmtStr,...) |
|
misc utilites
- Version
- "$Id: util.c 4032 2011-04-05 22:16:20Z bobgo $"
Definition in file util.c.