--- In "sccjazz1" <> wrote:
> 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.
How about displaying the value of errno
to see what other information might be
available? errno should be one of the
following problems:
EACCES
The requested access to the file is not allowed, or search permission
is denied for one of the directories in the path prefix of pathname,
or the file did not exist yet and write access to the parent
directory is not allowed. (See also path_resolution(2).)
EEXIST
pathname already exists and O_CREAT and O_EXCL were used.
EFAULT
pathname points outside your accessible address space.
EISDIR
pathname refers to a directory and the access requested involved
writing (that is, O_WRONLY or O_RDWR is set).
ELOOP
Too many symbolic links were encountered in resolving pathname, or
O_NOFOLLOW was specified but pathname was a symbolic link.
EMFILE
The process already has the maximum number of files open.
ENAMETOOLONG
pathname was too long.
ENFILE
The system limit on the total number of open files has been reached.
ENODEV
pathname refers to a device special file and no corresponding device
exists. (This is a Linux kernel bug; in this situation ENXIO must be
returned.)
ENOENT
O_CREAT is not set and the named file does not exist. Or, a directory
component in pathname does not exist or is a dangling symbolic link.
ENOMEM
Insufficient kernel memory was available.
ENOSPC
pathname was to be created but the device containing pathname has no
room for the new file.
ENOTDIR
A component used as a directory in pathname is not, in fact, a
directory, or O_DIRECTORY was specified and pathname was not a
directory.
ENXIO
O_NONBLOCK | O_WRONLY is set, the named file is a FIFO and no process
has the file open for reading. Or, the file is a device special file
and no corresponding device exists.
EOVERFLOW
pathname refers to a regular file, too large to be opened; see
O_LARGEFILE above.
EPERM
The O_NOATIME flag was specified, but the effective user ID of the
caller did not match the owner of the file and the caller was not
privileged (CAP_FOWNER).
EROFS
pathname refers to a file on a read-only filesystem and write access
was requested.
ETXTBSY
pathname refers to an executable image which is currently being
executed and write access was requested.
EWOULDBLOCK
The O_NONBLOCK flag was specified, and an incompatible lease was held
on the file (see fcntl(2)).
------------------------------------
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/
|