mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 22:03:17 +01:00
Extract the duplicated generic netlink boilerplate (netlink_open,
send_request, get_family_id, and NLA walker macros) from cgroupstats.c and
taskstats_fill_stats_tgid.c into a shared netlink_helper.{h,c}.
Link: https://lore.kernel.org/a2adf27308b5cd90d50b59e8519b87da49486bee.1783876192.git.cyyzero16@gmail.com
Signed-off-by: Yiyang Chen <[email protected]>
Suggested-by: Andrew Morton <[email protected]>
Acked-by: Balbir Singh <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
20 lines
569 B
Makefile
20 lines
569 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
TEST_GEN_PROGS := acct_syscall
|
|
TEST_GEN_PROGS += taskstats_fill_stats_tgid
|
|
TEST_GEN_PROGS += cgroupstats
|
|
|
|
NETLINK_HELPER_PROGS := cgroupstats taskstats_fill_stats_tgid
|
|
|
|
CFLAGS += -Wall
|
|
LDLIBS += -lpthread
|
|
|
|
include ../lib.mk
|
|
|
|
$(NETLINK_HELPER_PROGS): %: %.c netlink_helper.c netlink_helper.h
|
|
$(call msg,CC,,$@)
|
|
$(Q)$(LINK.c) $< netlink_helper.c $(LDLIBS) -o $@
|
|
|
|
$(addprefix $(OUTPUT)/,$(NETLINK_HELPER_PROGS)): $(OUTPUT)/%: %.c netlink_helper.c netlink_helper.h
|
|
$(call msg,CC,,$@)
|
|
$(Q)$(LINK.c) $< netlink_helper.c $(LDLIBS) -o $@
|