diff options
Diffstat (limited to 'tools/perf/util/target.h')
-rw-r--r-- | tools/perf/util/target.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/tools/perf/util/target.h b/tools/perf/util/target.h index 218291f921ed..eb0d2101154a 100644 --- a/tools/perf/util/target.h +++ b/tools/perf/util/target.h | |||
@@ -13,6 +13,29 @@ struct perf_target { | |||
13 | bool system_wide; | 13 | bool system_wide; |
14 | }; | 14 | }; |
15 | 15 | ||
16 | void perf_target__validate(struct perf_target *target); | 16 | enum perf_target_errno { |
17 | PERF_ERRNO_TARGET__SUCCESS = 0, | ||
18 | |||
19 | /* | ||
20 | * Choose an arbitrary negative big number not to clash with standard | ||
21 | * errno since SUS requires the errno has distinct positive values. | ||
22 | * See 'Issue 6' in the link below. | ||
23 | * | ||
24 | * http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html | ||
25 | */ | ||
26 | __PERF_ERRNO_TARGET__START = -10000, | ||
27 | |||
28 | |||
29 | /* for perf_target__validate() */ | ||
30 | PERF_ERRNO_TARGET__PID_OVERRIDE_CPU = __PERF_ERRNO_TARGET__START, | ||
31 | PERF_ERRNO_TARGET__PID_OVERRIDE_UID, | ||
32 | PERF_ERRNO_TARGET__UID_OVERRIDE_CPU, | ||
33 | PERF_ERRNO_TARGET__PID_OVERRIDE_SYSTEM, | ||
34 | PERF_ERRNO_TARGET__UID_OVERRIDE_SYSTEM, | ||
35 | |||
36 | __PERF_ERRNO_TARGET__END, | ||
37 | }; | ||
38 | |||
39 | enum perf_target_errno perf_target__validate(struct perf_target *target); | ||
17 | 40 | ||
18 | #endif /* _PERF_TARGET_H */ | 41 | #endif /* _PERF_TARGET_H */ |