public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Marek Lindner <lindner_marek@yahoo.de>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH] batctl: avoid parsing bat-hosts multiple times
Date: Thu, 4 Mar 2010 20:49:25 +0800	[thread overview]
Message-ID: <201003042049.25362.lindner_marek@yahoo.de> (raw)
In-Reply-To: <4B8FA639.5000502@tiwoc.de>

On Thursday 04 March 2010 20:23:21 Daniel Seither wrote:
> Currently, running batctl from the home directory leads to warnings
> ("Warning - mac already known") if ~/bat-hosts exists. This is caused by
> batctl parsing both "~/bat-hosts" and "bat-hosts" which happen to be the
> same file when the working directory is ~
> 
> This patch adds duplicate file name detection to bat_hosts_init() to
> avoid these warnings.

I tested your patch and it works very well. That is a nice catch! I did not 
stumble over this problem before.
However, I wonder whether it would be better to let realpath() allocate the 
normalized file path buffer instead of using the static normalized array, simply 
to save some disk space. What do you think ?

Cheers,
Marek

  reply	other threads:[~2010-03-04 12:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-04 12:23 [B.A.T.M.A.N.] [PATCH] batctl: avoid parsing bat-hosts multiple times Daniel Seither
2010-03-04 12:49 ` Marek Lindner [this message]
2010-03-04 13:48   ` Daniel Seither

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=201003042049.25362.lindner_marek@yahoo.de \
    --to=lindner_marek@yahoo.de \
    --cc=b.a.t.m.a.n@lists.open-mesh.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox