mirror of
https://github.com/netdata/libbpf.git
synced 2026-04-03 23:29:06 +08:00
libbpf: Mark bpf_object__open_xattr() deprecated
Mark bpf_object__open_xattr() as deprecated, use bpf_object__open_file() instead. [0] Closes: https://github.com/libbpf/libbpf/issues/287 Signed-off-by: Christy Lee <christylee@fb.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20220125010917.679975-1-christylee@fb.com
This commit is contained in:
committed by
Andrii Nakryiko
parent
1af0f62fac
commit
c0c3f46ca6
@@ -9460,7 +9460,7 @@ static int bpf_prog_load_xattr2(const struct bpf_prog_load_attr *attr,
|
|||||||
open_attr.file = attr->file;
|
open_attr.file = attr->file;
|
||||||
open_attr.prog_type = attr->prog_type;
|
open_attr.prog_type = attr->prog_type;
|
||||||
|
|
||||||
obj = bpf_object__open_xattr(&open_attr);
|
obj = __bpf_object__open_xattr(&open_attr, 0);
|
||||||
err = libbpf_get_error(obj);
|
err = libbpf_get_error(obj);
|
||||||
if (err)
|
if (err)
|
||||||
return libbpf_err(-ENOENT);
|
return libbpf_err(-ENOENT);
|
||||||
|
|||||||
@@ -184,6 +184,7 @@ LIBBPF_DEPRECATED_SINCE(0, 8, "use bpf_object__open_mem() instead")
|
|||||||
LIBBPF_API struct bpf_object *
|
LIBBPF_API struct bpf_object *
|
||||||
bpf_object__open_buffer(const void *obj_buf, size_t obj_buf_sz,
|
bpf_object__open_buffer(const void *obj_buf, size_t obj_buf_sz,
|
||||||
const char *name);
|
const char *name);
|
||||||
|
LIBBPF_DEPRECATED_SINCE(0, 7, "use bpf_object__open_file() instead")
|
||||||
LIBBPF_API struct bpf_object *
|
LIBBPF_API struct bpf_object *
|
||||||
bpf_object__open_xattr(struct bpf_object_open_attr *attr);
|
bpf_object__open_xattr(struct bpf_object_open_attr *attr);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user