• Greg Kroah-Hartman's avatar
    License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
    Greg Kroah-Hartman authored
    Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.
    
    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.
    
    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier.  The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.
    
    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.
    
    How this work was done:
    
    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
     - file had no licensing information it it.
     - file was a */uapi/* one with no licensing information in it,
     - file was a */uapi/* one with existing licensing information,
    
    Further patches will be generated in subsequent months to fix up cases
    where non-standard...
    b2441318
cache.h 737 Bytes
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PERF_CACHE_H
#define __PERF_CACHE_H

#include "strbuf.h"
#include <subcmd/pager.h>
#include "../ui/ui.h"

#include <linux/compiler.h>
#include <linux/string.h>

#define CMD_EXEC_PATH "--exec-path"
#define CMD_DEBUGFS_DIR "--debugfs-dir="

#define EXEC_PATH_ENVIRONMENT "PERF_EXEC_PATH"
#define PERF_DEBUGFS_ENVIRONMENT "PERF_DEBUGFS_DIR"
#define PERF_TRACEFS_ENVIRONMENT "PERF_TRACEFS_DIR"
#define PERF_PAGER_ENVIRONMENT "PERF_PAGER"

int split_cmdline(char *cmdline, const char ***argv);

#define alloc_nr(x) (((x)+16)*3/2)

static inline int is_absolute_path(const char *path)
{
	return path[0] == '/';
}

char *mkpath(const char *fmt, ...) __printf(1, 2);

#endif /* __PERF_CACHE_H */