From: Chris Lalancette Date: Mon, 21 Dec 2009 19:14:46 +0000 (-0500) Subject: Add a rule to check for uses of readlink. X-Git-Tag: v0.7.6~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54c973d52b1dffd7714fa60453052f4decabe192;p=thirdparty%2Flibvirt.git Add a rule to check for uses of readlink. Signed-off-by: Chris Lalancette --- 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' \