2006-10-17: Bob Copeland dixit:
> > libkarma hasn't been finding my karma when I use it through
> > lkarmafs.
> >
> > This is because lk_mountSearch_discover() reads /proc/mounts
> > into a 1024 byte buffer, but my /proc/mounts is currently
> > 1874 bytes, and the karma entry is right at the end!
> >
> > I suppose the proper way to handle this is to dynamically
> > allocate the buffer, but I don't know how you'd get the size
> > of /proc/mounts - fstat doesn't work because it's not a real
> > file.
>
> Thanks for the report. One could write a loop along the lines
> of the following to ensure that it works with any size file.
>
> while ((size = fread(&buf[buflen-4096], 1, 4096, fp) == 4096)
> {
> buf = realloc(buf, buflen + 4096);
> buflen += 4096;
> }
>
> I'll hack up a patch today or tomorrow implementing this.
I was about to reply to Oliver's message, but I see you've been
faster. Thanks. I'm quite busy these days; so if you can,
please, go ahead with the patch.
Best,
EV.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-karma-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-karma-devel