Lines Matching +full:version +full:- +full:major
1 // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
15 #include <linux/version.h>
26 * Ubuntu 5.4.0-12.15-generic 5.4.8
34 __u32 major, minor, patch; in get_ubuntu_kernel_version() local
45 ret = fscanf(f, "%*s %*s %u.%u.%u\n", &major, &minor, &patch); in get_ubuntu_kernel_version()
50 return KERNEL_VERSION(major, minor, patch); in get_ubuntu_kernel_version()
54 * Instead, it is provided in info.version. An example content of
57 * utsname::release 4.19.0-22-amd64
58 * utsname::version #1 SMP Debian 4.19.260-1 (2022-09-29)
65 __u32 major, minor, patch; in get_debian_kernel_version() local
68 p = strstr(info->version, "Debian "); in get_debian_kernel_version()
74 if (sscanf(p, "Debian %u.%u.%u", &major, &minor, &patch) != 3) in get_debian_kernel_version()
77 return KERNEL_VERSION(major, minor, patch); in get_debian_kernel_version()
82 __u32 major, minor, patch, version; in get_kernel_version() local
86 version = get_ubuntu_kernel_version(); in get_kernel_version()
87 if (version != 0) in get_kernel_version()
88 return version; in get_kernel_version()
93 version = get_debian_kernel_version(&info); in get_kernel_version()
94 if (version != 0) in get_kernel_version()
95 return version; in get_kernel_version()
97 if (sscanf(info.release, "%u.%u.%u", &major, &minor, &patch) != 3) in get_kernel_version()
100 return KERNEL_VERSION(major, minor, patch); in get_kernel_version()
143 exp_err = -EINVAL; in probe_prog_load()
152 exp_err = -EINVAL; in probe_prog_load()
159 exp_err = -524; /* -ENOTSUPP */ in probe_prog_load()
188 return -EOPNOTSUPP; in probe_prog_load()
192 err = -errno; in probe_prog_load()
215 return libbpf_err(-EINVAL); in libbpf_probe_bpf_prog_type()
227 .version = BTF_VERSION, in libbpf__load_raw_btf()
243 return -ENOMEM; in libbpf__load_raw_btf()
287 int fd = -1, btf_fd = -1, fd_inner = -1, exp_err = 0, err = 0; in probe_map_create()
332 /* we'll get -ENOTSUPP for invalid BTF type ID for struct_ops */ in probe_map_create()
334 opts.value_type_btf_obj_fd = -1; in probe_map_create()
335 exp_err = -524; /* -ENOTSUPP */ in probe_map_create()
369 return -EOPNOTSUPP; in probe_map_create()
389 err = -errno; in probe_map_create()
410 return libbpf_err(-EINVAL); in libbpf_probe_bpf_map_type()
428 return libbpf_err(-EINVAL); in libbpf_probe_bpf_helper()
431 * support, so bail out with -EOPNOTSUPP error in libbpf_probe_bpf_helper()
438 return -EOPNOTSUPP; in libbpf_probe_bpf_helper()