ts-7000
[Top] [All Lists]

[ts-7000] Re: ts7800ctl and /dev/mem

To:
Subject: [ts-7000] Re: ts7800ctl and /dev/mem
From: "Charles" <>
Date: Thu, 31 Dec 2009 20:30:45 -0000

--- In  "naturalwatt" <> wrote:
>
> 
> I don't think anyone EXCEPT root is allowed to open /dev/mem.
> 
> --- In  "n4rve" <wordy@> wrote:
> >
> > Hi...
> > 
> > I'm just beginning to get my feet wet (OK, barely moist) with this board, 
> > so please forgive me if this is a PEBCAK (Problem Exists Between Chair And 
> > Keyboard).
> > 
> > When my 7800 first came up, I was able to use ts7800ctl -n and -F to turn 
> > the LED on and off.  This was fairly exciting, and worked both in root and 
> > my user account.
> > 
> > However, the next time I tried ts7800ctl in the user account (and every 
> > time since) I receive this error message on any option:
> > 
> > ts7800ctl: ts7800ctl.c:175: main: Assertion `devmem != -1' failed.
> > Aborted
> > 
> > This kind of error is associated with failing to close /dev/mem in a 
> > program after opening it, and sure enough, when I look at the source:
> > 
> > ftp://ftp.embeddedarm.com/tmp/7800_adc_update/ts7800ctl.c
> > 
> > I see 
> > 
> > devmem = open("/dev/mem", O_RDWR|O_SYNC);
> > 
> > just before all the case statements.  There is no close.  Clearly, however, 
> > this must be working for other people as it is often cited... so I can't 
> > imagine that's really the problem.
> > 
> > The puzzle, perhaps negating the question above, is why am I getting the 
> > abort message on every attempt to use it in user space, even though it 
> > still works fine in root (assuming I use the explicit path of 
> > /usr/local/bin/)?

'User space' refers to anything other than 'kernel space' (kernel itself, 
device drivers, etc).  So running ts7800ctl is user space, whether run by root 
or a user.

Check to see if the suid bit has been turned off on the executable file.

regards, .......... Charlie

> > 
> > Cheers, 
> > Steve
> > (who is still puzzled about the lack of sudo)
> >
>




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

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