From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7e32386ac8078f13 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!news.zanker.org!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!lightspeed.eweka.nl!newsfeed.multikabel.nl!news.tele.dk!news.tele.dk!small.news.tele.dk!not-for-mail Sender: malo@0x5358c0df.boanxx18.adsl-dhcp.tele.dk Newsgroups: comp.lang.ada Subject: Re: POSIX.Memory_Mapping.Map_Memory References: <1107014307.952357.216870@f14g2000cwb.googlegroups.com> <1107016260.265640.138990@z14g2000cwz.googlegroups.com> <1107053159.644479.173850@z14g2000cwz.googlegroups.com> <1107101156.021780.150590@c13g2000cwb.googlegroups.com> From: Mark Lorenzen Date: 30 Jan 2005 17:22:36 +0100 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: TDC Totalloesninger NNTP-Posting-Host: 83.88.192.223 X-Trace: 1107102156 dtext02.news.tele.dk 172 83.88.192.223:56549 X-Complaints-To: abuse@post.tele.dk Xref: g2news1.google.com comp.lang.ada:8081 Date: 2005-01-30T17:22:36+01:00 List-Id: "Adrian Hoe" writes: > Mark Lorenzen wrote: > > > > > Note that mmap wil NEVER return 0, so the check should be "if (buf == > > MAP_FAILED)". > > > > > > I corrected the above mentioned problem and successfully opened and > > mapped a file. Strange. > > > > Did you managed to open and map /dev/video0 after you change the line > to if (buf == MAP_FAILED)? I do not have that device special file. I opened and mapped a regular file that i have read/write access to. > > Or could it be a problem with distro? Which Linux distro are you using? > -- > Adrian Hoe - Mark Lorenzen