From 54c973d52b1dffd7714fa60453052f4decabe192 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Mon, 21 Dec 2009 14:14:46 -0500 Subject: [PATCH] Add a rule to check for uses of readlink. Signed-off-by: Chris Lalancette --- .x-sc_prohibit_readlink | 2 ++ cfg.mk | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 .x-sc_prohibit_readlink diff --git a/.x-sc_prohibit_readlink b/.x-sc_prohibit_readlink new file mode 100644 index 0000000000..e7acb03379 --- /dev/null +++ b/.x-sc_prohibit_readlink @@ -0,0 +1,2 @@ +^src/util/util\.c$ +^ChangeLog-old$ diff --git a/cfg.mk b/cfg.mk index 0f2d2a63d4..5013e4b179 100644 --- a/cfg.mk +++ b/cfg.mk @@ -94,6 +94,11 @@ sc_prohibit_strncpy: msg='use virStrncpy, not strncpy' \ $(_prohibit_regexp) +sc_prohibit_readlink: + @re='readlink *\(' \ + msg='use virFileResolveLink, not readlink' \ + $(_prohibit_regexp) + sc_prohibit_gethostname: @re='gethostname *\(' \ msg='use virGetHostname, not gethostname' \