comp.lang.ada
 help / color / mirror / Atom feed
From: Mark Lorenzen <mark.lorenzen@ofir.dk>
Subject: Re: POSIX.Memory_Mapping.Map_Memory
Date: 29 Jan 2005 17:20:27 +0100
Date: 2005-01-29T17:20:27+01:00	[thread overview]
Message-ID: <m3k6pwky0k.fsf@0x50a5b1db.boanxx18.adsl-dhcp.tele.dk> (raw)
In-Reply-To: 1107014307.952357.216870@f14g2000cwb.googlegroups.com

"Adrian Hoe" <byhoe@greenlime.com> writes:

> Hi,
> 
> I am working on video_device with Video_4_Linux based on the work of
> Anders Gidenstam. According to latest V4L documentation, capturing with
> Read has been deprecated and the only method now is by the use of mmap.
> 
> I open a device and read the device with the following procedures, Open
> and Map_Image as below. In Procedure Map_Image, I make a call to
> Map_Memory (POSIX.Memory_Mapping) and raise an exception:
> 
> POSIX.POSIX_ERROR : PERMISSION_DENIED
> 
> -----------------------------------------------------------------------

[cut]

> Device.Fd := Open (To_POSIX_String (File_Name),
> Read_Only);

You open the device in read-only.

[cut]

> 
> -- Permission Denied exception was raised here at the line below!!!
> Map := Map_Memory (System.Storage_Elements.Storage_Offset
> (Buf_Size),
> POSIX.Memory_Mapping.Allow_Read +
> POSIX.Memory_Mapping.Allow_Write,
> POSIX.Memory_Mapping.Map_Shared,
> Device.Fd,
> 0);

But you try to map it in read/write mode.

Maybe thats the case of the exception. Do you have to be root in order
to open the device at all?

[cut]

> Adrian Hoe

- Mark Lorenzen



  reply	other threads:[~2005-01-29 16:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-29 15:58 POSIX.Memory_Mapping.Map_Memory Adrian Hoe
2005-01-29 16:20 ` Mark Lorenzen [this message]
2005-01-29 16:31   ` POSIX.Memory_Mapping.Map_Memory Adrian Hoe
2005-01-29 18:44     ` POSIX.Memory_Mapping.Map_Memory Mark Lorenzen
2005-01-30  2:45       ` POSIX.Memory_Mapping.Map_Memory Adrian Hoe
2005-01-30  2:48         ` POSIX.Memory_Mapping.Map_Memory Adrian Hoe
2005-01-30 15:39         ` POSIX.Memory_Mapping.Map_Memory Mark Lorenzen
2005-01-30 16:02           ` POSIX.Memory_Mapping.Map_Memory Adrian Hoe
2005-01-30 16:19             ` POSIX.Memory_Mapping.Map_Memory Mark Lorenzen
2005-01-30 16:36               ` POSIX.Memory_Mapping.Map_Memory Mark Lorenzen
2005-01-30 18:51                 ` POSIX.Memory_Mapping.Map_Memory Florian Weimer
2005-02-27  6:59                   ` POSIX.Memory_Mapping.Map_Memory Adrian Hoe
2005-02-27 13:03                     ` POSIX.Memory_Mapping.Map_Memory Mark Lorenzen
2005-01-30 16:05           ` POSIX.Memory_Mapping.Map_Memory Adrian Hoe
2005-01-30 16:22             ` POSIX.Memory_Mapping.Map_Memory Mark Lorenzen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox