Linux Perf
path.c File Reference
#include "cache.h"
#include "path.h"
#include <linux/kernel.h>
#include <limits.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <unistd.h>
Include dependency graph for path.c:

Go to the source code of this file.

Functions

static char * get_pathname (void)
 
static char * cleanup_path (char *path)
 
char * mkpath (const char *fmt,...)
 
int path__join (char *bf, size_t size, const char *path1, const char *path2)
 
int path__join3 (char *bf, size_t size, const char *path1, const char *path2, const char *path3)
 
bool is_regular_file (const char *file)
 
bool is_directory (const char *base_path, const struct dirent *dent)
 

Variables

static char bad_path [] = "/bad-path/"
 

Function Documentation

◆ cleanup_path()

static char* cleanup_path ( char *  path)
static

Definition at line 36 of file path.c.

◆ get_pathname()

static char* get_pathname ( void  )
static

Definition at line 28 of file path.c.

◆ is_directory()

bool is_directory ( const char *  base_path,
const struct dirent *  dent 
)

Definition at line 83 of file path.c.

◆ is_regular_file()

bool is_regular_file ( const char *  file)

Definition at line 72 of file path.c.

◆ mkpath()

char* mkpath ( const char *  fmt,
  ... 
)

Definition at line 47 of file path.c.

Here is the call graph for this function:

◆ path__join()

int path__join ( char *  bf,
size_t  size,
const char *  path1,
const char *  path2 
)

Definition at line 61 of file path.c.

◆ path__join3()

int path__join3 ( char *  bf,
size_t  size,
const char *  path1,
const char *  path2,
const char *  path3 
)

Definition at line 66 of file path.c.

Variable Documentation

◆ bad_path

char bad_path[] = "/bad-path/"
static

Definition at line 24 of file path.c.