ts-7000
[Top] [All Lists]

[ts-7000] Re: open("/dev/mem", O_RDWR) returns -1

To:
Subject: [ts-7000] Re: open("/dev/mem", O_RDWR) returns -1
From: "sccjazz1" <>
Date: Mon, 01 Sep 2008 01:47:35 -0000
--- In  "sccjazz1" <> wrote:
>
> I am using the button.c code, which accesses I/O pins and the two 
LEDS 
> on th3 7260 board.  I cross compiled it and can run it as root on 
my 
> TS-7260.  I have a web page with a button and form action code that 
> invokes the binary executable.  The permisions on the executable 
are 
> 777, the permisions on /dev/mem are 777.
> I can invoke a 'Hello World' executable just fine via the web page 
> button.(FYI). The executable is in the cgi-bin directory.  The 
problem 
> is the open("/dev/mem",O_RDWR) statement returns a -1.
> What do I need to do to get this to work...
> 
> Thanks,
> Steve
>

I will reply to my own post.

Try what was sugested in post # 1456, regarding setting the setuid 
bit, chmod +s button.cgi.  (button.cgi is a C executable).

Also, it may not hurt to add the O_SYNC option to the open 
statement...although it made no difference before when I tried it.

Thanks,
Myself






------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU