From: Marcel Holtmann <marcel@holtmann.org>
To: bluez-devel@lists.sourceforge.net
Subject: RE: [Bluez-devel] textfile.c find_key
Date: Wed, 09 Nov 2005 01:03:09 +0100 [thread overview]
Message-ID: <1131494589.5544.22.camel@blade> (raw)
In-Reply-To: <CBBBD909D2D6D211B4700090273F9E6E04C49B68@polaris.hhn.com>
[-- Attachment #1: Type: text/plain, Size: 354 bytes --]
Hi Robert,
> It might possibly be. I'm using an Arm processor with the kernel
> version 2.6.10 for use with Busybox. It's probably a safe bet that
> not many people are using an Arm processor so it could be something
> about that. I'll look around.
okay lets check for (map == NULL). The attached patch would do it the
right way.
Regards
Marcel
[-- Attachment #2: patch --]
[-- Type: text/x-patch, Size: 676 bytes --]
Index: textfile.c
===================================================================
RCS file: /cvsroot/bluez/utils/common/textfile.c,v
retrieving revision 1.9
diff -u -r1.9 textfile.c
--- textfile.c 29 Oct 2005 22:36:31 -0000 1.9
+++ textfile.c 9 Nov 2005 00:01:34 -0000
@@ -149,7 +149,7 @@
}
map = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_LOCKED, fd, 0);
- if (map == MAP_FAILED) {
+ if (!map || map == MAP_FAILED) {
err = errno;
goto unlock;
}
@@ -243,7 +243,7 @@
size = st.st_size;
map = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0);
- if (map == MAP_FAILED) {
+ if (!map || map == MAP_FAILED) {
err = errno;
goto unlock;
}
next prev parent reply other threads:[~2005-11-09 0:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-08 23:52 [Bluez-devel] textfile.c find_key Robert Wlaschin
2005-11-09 0:03 ` Marcel Holtmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-11-08 20:22 Robert Wlaschin
2005-11-08 22:13 ` Marcel Holtmann
2005-11-08 19:28 Robert Wlaschin
2005-11-08 19:55 ` Marcel Holtmann
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=1131494589.5544.22.camel@blade \
--to=marcel@holtmann.org \
--cc=bluez-devel@lists.sourceforge.net \
/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.