Re: [RFC] netfilter: Rename ipt_ECN.h to ipt_ecn_target.h (and similar) to avoid file name clash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jozsef Kadlecsik wrote:
On Sat, 16 Aug 2008, Jan Engelhardt wrote:

On Saturday 2008-08-16 15:14, Jozsef Kadlecsik wrote:
On Sat, 16 Aug 2008, Jan Engelhardt wrote:
On Friday 2008-08-15 18:03, P˙˙teris K˙˙avi˙˙š wrote:

The changes are proposed in order to avoid file name clashes on
filesystems that do not allow two files to have names that differ
only in the case of their letters:

include/linux/netfilter/xt_CONNMARK.h => xt_connmark_target.h
[...]

As I see it, this will already be addressed by merging complementary
code into one source file (e.g. MARK, mark, CONNMARK, connmark
all into a big new xt_mark.c), to reduce (a) amount of files
and (b) build time.
[...]

That is half of the story: we encode the functionality (match/target) in the case of the (file)name and there are targets which have got no match counterpart and thus no natural lowercase filename to merge into it. So the directory tree still will be broken on case-insensitive filesystems.
We have not decided on filenames yet, just that matches/targets that
are commonly used together should go into a single file for the two
above-mentioned reasons, and lower-casing does not appear in (a) or (b).

You wrote: "by merging into ... a big new xt_mark.c". Pteris also suggested fully lowercased names, e.g. xt_connmark_target.h. Or are you just pulling my leg by pointing to the possibility to >capitalize< all the filenames in netfilter, to achieve case-insensitive filenames?

My suggested names were taken from within the files themselves. Note that the standard #ifdef multiple inclusion guards in the existing files could not follow normal practice and had to be modified in some way, because by tradition they are simply uppercase transformations of the filename itself (but that would end up in a clash!), and so the xt_CONNMARK.h include guard is "_XT_CONNMARK_H_target". By natural extension, my proposal was to rename the existing uppercase file to xt_connmark_target.h. However, for the typical case-insensitive filesystems out there, it is fine for the file to be called xt_CONNMARK_target.h, and I have no objection to that, so long as that doesn't clash with another filename differing only in the case of the letters:

$ ls | grep -i xt_connmark | while read i; do grep _H $i /dev/null; done
xt_CONNMARK.h:#ifndef _XT_CONNMARK_H_target
xt_CONNMARK.h:#define _XT_CONNMARK_H_target
xt_CONNMARK.h:#endif /*_XT_CONNMARK_H_target*/
xt_connmark.h:#ifndef _XT_CONNMARK_H
xt_connmark.h:#define _XT_CONNMARK_H
xt_connmark.h:#endif /*_XT_CONNMARK_H*/

--
 Peter Klavins

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux