From: Marek Lindner <lindner_marek@yahoo.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Luis de Bethencourt <luisbg@ubuntu.com>
Subject: Re: [B.A.T.M.A.N.] [PATCH 4/4] Staging: batman-adv: fix whitespace style issues
Date: Sun, 4 Apr 2010 22:42:27 +0800 [thread overview]
Message-ID: <201004042242.27430.lindner_marek@yahoo.de> (raw)
In-Reply-To: <g2o506b70dc1004040539weff4c04akcbde4ef62dcdaeb@mail.gmail.com>
On Sunday 04 April 2010 20:39:49 Luis de Bethencourt wrote:
> Honestly, I don't understand the intention of the whitespaces you are
> talking about. Userspace applications have to split the string after
> each whitespace because there is a \n there, my fix just suggested to
> split the line before the whitespace since I see no need for it.
>
> So am I missunderstanding and there is a need for that whitespace?
> Same question asked differently: Will there be any difference in the
> print out if the line is broken before the whitespace instead of
> after?
Let's take this string as an example:
"commands: enable, disable, 0, 1 \n"
The batctl code uses strchr() to jump to each whitespace location within the
string and handle each word individually. By removing the last whitespace the
code will not handle "1" because there is not more whitespace. See
handle_sys_setting() in http://www.open-mesh.org/browser/trunk/batctl/sys.c
That is not tragic but the batctl code needs to be changed as well if the
whitespace is removed.
Regards,
Marek
next prev parent reply other threads:[~2010-04-04 14:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <batman-adv>
[not found] ` <1270341625-28764-1-git-send-email-luisbg@ubuntu.com>
2010-04-04 1:12 ` [B.A.T.M.A.N.] [PATCH 4/4] Staging: batman-adv: fix whitespace style issues Sven Eckelmann
2010-04-04 1:24 ` [B.A.T.M.A.N.] [PATCHv2-maint] " Sven Eckelmann
2010-04-04 17:09 ` Marek Lindner
2010-04-04 17:51 ` Luis de Bethencourt
2010-04-04 1:44 ` [B.A.T.M.A.N.] [PATCHv2-trunk] " Sven Eckelmann
2010-04-04 2:48 ` Marek Lindner
2010-04-04 16:33 ` [B.A.T.M.A.N.] [PATCH] batctl: Parse allowed settings for sysfs without whitespace before newline Sven Eckelmann
2010-04-06 5:33 ` Marek Lindner
2010-04-04 1:45 ` [B.A.T.M.A.N.] [PATCH 4/4] Staging: batman-adv: fix whitespace style issues Luis de Bethencourt
2010-04-04 10:46 ` Sven Eckelmann
2010-04-04 11:10 ` Luis de Bethencourt
2010-04-04 11:30 ` Sven Eckelmann
2010-04-04 12:39 ` Luis de Bethencourt
2010-04-04 14:42 ` Marek Lindner [this message]
2010-04-04 15:02 ` Luis de Bethencourt
2010-04-04 15:14 ` Sven Eckelmann
2010-04-04 15:19 ` Luis de Bethencourt
2010-04-04 13:56 ` Andrew Lunn
2010-04-04 14:56 ` Luis de Bethencourt
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=201004042242.27430.lindner_marek@yahoo.de \
--to=lindner_marek@yahoo.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=luisbg@ubuntu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox