* [Bluez-devel] linkkeys on jffs2
@ 2006-01-17 8:42 andrew
2006-01-17 10:53 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: andrew @ 2006-01-17 8:42 UTC (permalink / raw)
To: bluez-devel
Hello.
Got a problem with hcid storing link keys on jffs2 file system.
Hcid is able to store only one link key, all subsequent keys doesn't
appear in linkkeys file.
After looking into sources I find out in common/textfile.c call of mmap()
with MAP_SHARED flag which is not suported on jffs2.
As mmap is used only for seeking keys in maped memory not for storing int=
o
file seems it's good idea to use MAP_PRIVATE flag. In this case there are
no error on jffs2
Here the patch:
--- bluez-utils-2.24-orig/common/textfile.c 2005-11-30
13:15:30.000000000 +0900
+++ bluez-utils-2.24/common/textfile.c 2006-01-17 17:39:16.000000000 +09=
00
@@ -148,7 +148,7 @@
goto unlock;
}
- map =3D mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED |
MAP_LOCKED, fd, 0);
+ map =3D mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE |
MAP_LOCKED, fd, 0);
if (!map || map =3D=3D MAP_FAILED) {
err =3D errno;
goto unlock;
Andrey Denisjuk
Chita, Russia
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Bluez-devel] linkkeys on jffs2
2006-01-17 8:42 [Bluez-devel] linkkeys on jffs2 andrew
@ 2006-01-17 10:53 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2006-01-17 10:53 UTC (permalink / raw)
To: bluez-devel
Hi Andrey,
> Got a problem with hcid storing link keys on jffs2 file system.
> Hcid is able to store only one link key, all subsequent keys doesn't
> appear in linkkeys file.
> After looking into sources I find out in common/textfile.c call of mmap()
> with MAP_SHARED flag which is not suported on jffs2.
> As mmap is used only for seeking keys in maped memory not for storing into
> file seems it's good idea to use MAP_PRIVATE flag. In this case there are
> no error on jffs2
if you inline the patch, make sure your mail client doesn't do line
breaks in that area. Otherwise attach it.
However the patch is in the CVS now. Thanks.
Regards
Marcel
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-01-17 10:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-17 8:42 [Bluez-devel] linkkeys on jffs2 andrew
2006-01-17 10:53 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).