All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pēteris Kļaviņš" <klavins@netspace.net.au>
To: netfilter-devel@vger.kernel.org
Subject: Re: [RFC] netfilter: Rename ipt_ECN.h to ipt_ecn_target.h (and   similar) to avoid file name clash
Date: Sat, 16 Aug 2008 22:19:33 +0200	[thread overview]
Message-ID: <g87cp8$bfa$1@ger.gmane.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0808162127200.21025@blackhole.kfki.hu>

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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2008-08-16 20:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-15 22:03 [RFC] netfilter: Rename ipt_ECN.h to ipt_ecn_target.h (and similar) to avoid file name clash Pēteris Kļaviņš
2008-08-16 14:04 ` Jan Engelhardt
2008-08-16 15:32   ` Pēteris Kļaviņš
2008-08-16 19:14   ` Jozsef Kadlecsik
2008-08-16 19:22     ` Jan Engelhardt
2008-08-16 19:52       ` Jozsef Kadlecsik
2008-08-16 20:19         ` Pēteris Kļaviņš [this message]
2008-08-17 22:04           ` Jozsef Kadlecsik
2008-08-17 22:18             ` Jan Engelhardt
2008-08-18 11:17     ` Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='g87cp8$bfa$1@ger.gmane.org' \
    --to=klavins@netspace.net.au \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.