All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Vadim Kochan <vadim4j@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute2 2/2] tc class: Ignore if default class name file does not exist
Date: Tue, 17 Mar 2015 19:37:15 +0100	[thread overview]
Message-ID: <5508745B.3060007@iogearbox.net> (raw)
In-Reply-To: <20150317182137.GA1056@angus-think.lan>

On 03/17/2015 07:21 PM, Vadim Kochan wrote:
> On Tue, Mar 17, 2015 at 06:34:06PM +0100, Daniel Borkmann wrote:
>> On 03/17/2015 05:52 PM, Vadim Kochan wrote:
>> ...
>>> Changed default class name file cls_names -> tc_cls.
>>
>> Why that?
>
> tc_cls seems better and shorter.
>
>>> Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
>>> ---
>>>   tc/tc_util.c | 19 +++++++++++++++----
>>>   1 file changed, 15 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/tc/tc_util.c b/tc/tc_util.c
>>> index feae439..5213e9e 100644
>>> --- a/tc/tc_util.c
>>> +++ b/tc/tc_util.c
>> ...
>>>   static struct db_names *cls_names = NULL;
>>>
>>> -#define NAMES_DB "/etc/iproute2/cls_names"
>>> +#define NAMES_DB "/etc/iproute2/tc_cls"
>>>
>>>   int cls_names_init(char *path)
>>>   {
>>> -	cls_names = db_names_alloc(path ?: NAMES_DB);
>>> -	if (!cls_names) {
>>> -		fprintf(stderr, "Error while opening class names file\n");
>>> +	int ret = -1;
>>> +
>>> +	cls_names = db_names_alloc();
>>> +	if (!cls_names)
>>> +		return -1;
>>> +
>>> +	ret = db_names_load(cls_names, path ?: NAMES_DB);
>>> +	if (ret == -ENOENT && path) {
>>> +		fprintf(stderr, "Can't open class names file: %s\n", path);
>>
>> That would mean that existing users having a /etc/iproute2/cls_names
>> file would suddenly not see class names anymore?
>
> Hm, but that was added few days ago.

Ok, my bad, sorry for the noise.

  reply	other threads:[~2015-03-17 18:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17 16:52 [PATCH iproute2 0/2] tc class names: Ignore if default file does not exist Vadim Kochan
2015-03-17 16:52 ` [PATCH iproute2 1/2] lib names: Split to db_names_alloc and db_names_load Vadim Kochan
2015-03-17 16:52 ` [PATCH iproute2 2/2] tc class: Ignore if default class name file does not exist Vadim Kochan
2015-03-17 17:34   ` Daniel Borkmann
2015-03-17 18:21     ` Vadim Kochan
2015-03-17 18:37       ` Daniel Borkmann [this message]
2015-03-17 19:48   ` Sergei Shtylyov

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=5508745B.3060007@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=netdev@vger.kernel.org \
    --cc=vadim4j@gmail.com \
    /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.