Re[2]: NVrec - V4L1 interface ( does mmap() work with bttv 0.8.16? )

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hello Justin,

Thursday, June 07, 2001, 3:35:27 AM, you wrote:

JS> Eugene Kuznetsov wrote:
>> Tested it with 0.8.16, still does not work :(( ...
>> First, as I already mentioned, it does not compile with -Werror:
>> 
>> gcc -pthread -Wall -O2 -g -Werror -o QTrec NVrec.c -ldl -lpng -lglib RTjpeg.o quicktime/libquicktime.a
>> cc1: warnings being treated as errors
>> In file included from NVrec.c:31:
>> /usr/include/linux/videodev.h:942: warning: `struct file' declared inside parameter list
>> /usr/include/linux/videodev.h:942: warning: its scope is only this definition or declaration, which is probably not what you want.
>> /usr/include/linux/videodev.h:942: warning: `struct inode' declared inside parameter list
>> make: *** [QTrec] Error 1
>> 
>> This may be caused by me doing something wrong when patching the
>> kernel.

JS> That is strange.  I am pretty sure 'struct  file' and 'struct inode'
JS> should never be visible to userland compiles. Gerd, could you please
JS> have a look at this (please let me know if this is actually a fault on
JS> my side)?

Ok, then it's my fault.

>> Next question is, why mmap() is failing? I tried to add a couple
>> of printk()'s to find out what happens, and this looks quite weird
>> for me. One of the first sanity checks in bttv_mmap() ( sources of
>> 0.8.16 ) fails. It is:
>> 
>>         if (!(vma->vm_flags & VM_SHARED))
>>             return -EINVAL;
>> 
>> But, if I correctly understood what happens during the mmap() syscall
>> ( /usr/src/linux/mm/mmap.c ), VM_SHARED flag is not set for mapping
>> areas read-only! I tried to change protection in parameters to
>> mmap(), but only to receive 'permission denied' instead of 'invalid
>> argument', even as root.

JS> Umm.. Try the attached patch - this may work...

As I already mentioned, applying this change does not help, because
then I receive 'permission denied'.


-- 
Best regards,
 Eugene
mailto:divx@xxxxxxx or sparky@xxxxxxxxxxxxxxx
[Team GADGET]  [Team Two Divided By Zero]



NetZero Platinum
No Banner Ads and Unlimited Access
Sign Up Today - Only $9.95 per month!
http://www.netzero.net





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux