From: Olaf Hering <olaf@aepfle•de>
To: Paul Mackeras <paulus@samba•org>, linuxppc-dev@ozlabs•org
Subject: [PATCH] fix modalias content in sysfs for macio devices
Date: Mon, 2 Apr 2007 14:33:27 +0200 [thread overview]
Message-ID: <20070402123327.GA11394@aepfle.de> (raw)
Currently the buf pointer is advanced too far during each iteration.
Also terminate the string with a newline.
Signed-off-by: Olaf Hering <olaf@aepfle•de>
---
drivers/macintosh/macio_sysfs.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Index: b/drivers/macintosh/macio_sysfs.c
===================================================================
--- a/drivers/macintosh/macio_sysfs.c
+++ b/drivers/macintosh/macio_sysfs.c
@@ -53,12 +53,14 @@ static ssize_t modalias_show (struct dev
buf += length;
while (cplen > 0) {
int l;
- length += sprintf (buf, "C%s", compat);
- buf += length;
+ l = sprintf (buf, "C%s", compat);
+ length += l;
+ buf += l;
l = strlen (compat) + 1;
compat += l;
cplen -= l;
}
+ length += sprintf(buf, "\n");
return length;
}
reply other threads:[~2007-04-02 12:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20070402123327.GA11394@aepfle.de \
--to=olaf@aepfle$(echo .)de \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=paulus@samba$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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