Commit Graph

94 Commits

Author SHA1 Message Date
Chris Johns
1f5d2baf06 Patch by Chris Johns <cjohns@cybertec.com.au> adding the rtems_termios_bufsize call. 2003-07-02 14:20:36 +00:00
Ralf Corsepius
fe661e4169 2003-05-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
PR 409:
	* include/stdint.h: Include rtems/stdint.h
2003-05-27 16:33:01 +00:00
Joel Sherrill
2a09fb6ebf 2003-02-06 Joel Sherrill <joel@OARcorp.com>
* include/sys/ioccom.h: Include <sys/types.h> not <machine/types.h> so
	Linux port builds.
2003-02-06 15:01:59 +00:00
Joel Sherrill
787449a9c8 2003-02-05 Joel Sherrill <joel@OARcorp.com>
* include/sys/ioccom.h: Fix so not using internal RTEMS types in libc
	code.
2003-02-05 21:12:03 +00:00
Joel Sherrill
0b178f0436 2003-01-10 Joel Sherrill <joel@OARcorp.com>
* include/rtems/libio.h: Rename __dev_t to __rtems_dev_t to avoid
	conflict with GNU/Linux header files.
2003-01-10 15:02:52 +00:00
Joel Sherrill
7e476f0279 2002-12-02 Joel Sherrill <joel@OARcorp.com>
* include/rtems/libio.h: Internally use a union of an unsigned64
	and major/minor device so we don't get into trouble shifting.
	The h8300 seemed to be impossible to remove warnings otherwise.
	Eventually the structure definition of a dev_t might be better anyway.
	* include/sys/ioccom.h: Added casts to remove warnings on 16 bit
	targets.
2002-12-02 19:13:26 +00:00
Joel Sherrill
a1f10111da 2002-10-28 Joel Sherrill <joel@OARcorp.com>
* include/rtems/libio.h: Change rtems_filesystem_node_types_t from
	enumeration to int to eliminate warnings when values are overridden.
2002-10-28 14:04:03 +00:00
Joel Sherrill
5d0b2f75eb 2002-09-14 Joel Sherrill <joel@OARcorp.com>
* include/rtems/libio.h: Change rtems_filesystem_read_t and
	rtems_filesystem_write_t to return ssize_t to match read(2)
	and write(2) respectively.
2002-09-14 21:07:02 +00:00
Joel Sherrill
5af0cf2fb2 2002-07-30 Joel Sherrill <joel@OARcorp.com>
* include/sys/utime.h: Removed as file is now part of the RTEMS
	newlib support.
	* Makefile.am: Reflect above.
	* include/rtems/termiostypes.h: Avoid use of __P.
2002-07-30 23:26:18 +00:00
Joel Sherrill
485e80fa03 2002-04-16 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* include/Makefile.am: Add stdint.h and inttypes.h.
	  (reported by Mike Siers <mikes@poliac.com>)
	* include/stdint.h: New file.
	* include/inttypes.h: New file.
2002-04-16 13:23:40 +00:00
Joel Sherrill
eaeb467139 2001-03-20 Joel Sherrill <joel@OARcorp.com>
* PR143
	* lib/include/rtems/termiostypes.h: Removed unneeded volatile on
	"theBuf" since no byte is read more than once anyway.
2002-03-20 17:59:12 +00:00
Joel Sherrill
d09ad1f0e0 2002-02-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* include/rtems/libio.h: Add #include <rtems/fs.h>.
	Reflect changes due to using rtems/fs.h.
	* include/rtems/libio_.h: Reworked.
2002-01-16 22:54:59 +00:00
Joel Sherrill
a02224e0e6 2002-01-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* include/rtems/libio_.h: Remove set_errno_and_return_minus_one.
	* libc/cfsetispeed.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/cfsetospeed.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/chdir.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/chmod.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/chown.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/chroot.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/closedir.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/eval.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/fchdir.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/fchmod.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/fdatasync.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/fpathconf.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/fstat.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/fsync.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/ftruncate.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/getdents.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/ioctl.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/link.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/lseek.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/mknod.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/open.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/read.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/readlink.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/rmdir.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/stat.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/symlink.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/tcsetattr.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/telldir.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/ttyname.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/ttyname_r.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/unlink.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/unmount.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/utime.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/write.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
2002-01-04 18:29:37 +00:00
Joel Sherrill
1af7963479 2001-10-25 Jennifer Averett <jennifer@OARcorp.com>
* libc/libio.c: Initialize more fields to NULL/0 during initialiation.
	* include/rtems/libio_.h: Fix freenode macro so it works for sockets
	which do not have the full set of filesystem operations and are
	initialized via something other than open().
2001-10-25 17:38:55 +00:00
Joel Sherrill
9f6c06322a 2001-10-12 Joel Sherrill <joel@OARcorp.com>
* include/chain.h: Fixed typo.
2001-10-12 21:10:49 +00:00
Joel Sherrill
d6c20ff373 2001-08-17 Joel Sherrill <joel@OARcorp.com>
* include/rtems/libio_.h: Added ifdef to ensure that LOGIN_NAME_MAX
	is defined on GNU/Linux (RedHat 6.2 distribution).
	* libc/unixlibc.c: Added stubs for rtems_io_register_name() and
	rtems_io_lookup_name() so UNIX port would compile the IO manager
	sptest that registers /dev/null.
2001-08-17 21:59:28 +00:00
Joel Sherrill
f7691e3b7b 2001-08-16 Mike Siers <mikes@poliac.com>
* include/rtems/termiostypes.h, include/sys/ioccom.h:
	Update of PPPD to 2.3.11 from 2.3.5 touched these files.
2001-08-16 20:45:26 +00:00
Joel Sherrill
87fb080d75 2000-05-24 Fernando Ruiz Casas <fernando.ruiz@ctv.es>
* include/rtems/libio_.h: Added login name, uid, gid, euid, and egid
	so they can be part of the private environment.
2001-05-24 22:04:03 +00:00
Joel Sherrill
d8a9155512 2001-04-20 Correo Fernando-ruiz <correo@fernando-ruiz.com>
* include/rtems/libio_.h, libc/chroot.c, libc/privateenv.c:
	Private environment and chroot() enhancements and fixes.  Comments:
	  + privateenv has been modified to let at chroot() to be more
	    POSIX like Sergei Organov recommended.
	  + A task owner lets that rtems_set_private_env() will be
	    called twice or more times.
	  + chroot() can be called without a previous
	    rtems_set_private_env(); (transpanrently)
	  + The second call of rtems_set_private_env() makes a internal
	    chroot("/") into global imfs_root.
	  + chroot() runs like chdir() without a previous chdir("/") with
	    the global root.
	  + The current directory can be in a wrong place like Linux and
	    many other Unices.
2001-04-20 21:11:25 +00:00
Joel Sherrill
d6a2d7eeb1 2001-04-16 Joel Sherrill <joel@OARcorp.com>
* include/rtc.h: New file.
	* include/Makefile.am: Updated to reflect above.
2001-04-16 20:22:12 +00:00
Joel Sherrill
ab6d08ffc1 2001-03-19 Joel Sherrill <joel@OARcorp.com>
* sys/utsname.h: Added C++ wrapper.
2001-03-19 13:08:20 +00:00
Joel Sherrill
2a929cc871 2001-01-25 Fernando Ruiz <fernando.ruiz@ctv.es>
* Alternate email is correo@fernando-ruiz.com
	* libc/privateenv.c: New file.
	* include/rtems/libio_.h, libc/Makefile.am, libc/base_fs.c,
	libc/unmount.c: Moved default umask, current working directory,
	root, and links followed count into a structure "user environment"
	that can then be treated as a unit.  This enable giving unique
	copies of these to individual threads or collection of threads.
2001-01-25 15:59:58 +00:00
Joel Sherrill
f5f31dd5a0 2000-11-28 Joel Sherrill <joel@OARcorp.com>
* include/sys/ttycom.h: New file -- moved from libnetworking/sys.
	* Makefile.am: Modified to reflect above.
2000-11-30 13:55:41 +00:00
Joel Sherrill
a080705682 2000-11-27 Joel Sherrill <joel@OARcorp.com>
* libc/termiostypes.h: New file -- missed in earlier commits.
2000-11-27 17:05:41 +00:00
Joel Sherrill
3ba74c733f 2000-11-01 Joel Sherrill <joel@OARcorp.com>
* include/Makefile.am, include/rtems/libio_.h, libc/Makefile.am,
	libc/assoc.c, libc/assocnamebad.c, libc/base_fs.c, libc/cfsetispeed.c,
	libc/cfsetospeed.c, libc/chdir.c, libc/chmod.c, libc/chown.c,
	libc/close.c, libc/closedir.c, libc/dup2.c, libc/error.c, libc/eval.c,
	libc/fchdir.c, libc/fchmod.c, libc/fcntl.c, libc/fdatasync.c,
	libc/fpathconf.c, libc/fstat.c, libc/fsync.c, libc/ftruncate.c,
	libc/getdents.c, libc/ioctl.c, libc/libio.c, libc/libio_sockets.c,
	libc/link.c, libc/lseek.c, libc/malloc.c, libc/mallocfreespace.c,
	libc/mknod.c, libc/mount.c, libc/newlibc.c, libc/no_libc.c,
	libc/open.c, libc/read.c, libc/readlink.c, libc/rmdir.c, libc/stat.c,
	libc/symlink.c, libc/tcsetattr.c, libc/telldir.c, libc/ttyname.c,
	libc/ttyname_r.c, libc/umask.c, libc/unlink.c, libc/unmount.c,
	libc/utime.c, libc/write.c:
	assoc.h, error.h, libio_.h, libio.h, and libcsupport.h moved
	from libc to lib/include/rtems and now must be referenced as
	<rtems/XXX.h>.
	* include/rtems/Makefile.am, include/rtems/.cvsignore: New file.
	* include/rtems/assoc.h, include/rtems/error.h,
	include/rtems/libcsupport.h, include/rtems/libio.h,
	include/rtems/libio_.h: New/moved files.
2000-11-01 21:08:14 +00:00
Joel Sherrill
7b0001f795 2000-10-24 Joel Sherrill <joel@OARcorp.com>
* libc/ioman.c: Moved to libfs.
	* libc/Makefile.am: Removed ioman.c as part of moving it to libfs.
	* libc/base_fs.c: Removed include of imfs.h and reworded comment
	to avoid being IMFS specific.
	* libc/libio.h: Removed prototype of IMFS_ops since it should
	not be in this file.
	* libc/mount.c: Removed IMFS specific configuration information.
	* libc/unmount.c: Removed include of imfs.h and reworded comment
	to avoid being IMFS specific.
2000-10-25 16:56:11 +00:00
Joel Sherrill
3815a2b73c 2000-10-18 Joel Sherrill <joel@OARcorp.com>
* libc/Makefile.am: Added mallocfreespace.c.
	* libc/mallocfreespace.c: New file based on work by Nick Simon
	<Nick.SIMON@syntegra.bt.co.uk> which he included in malloc.c.
	* libc/libcsupport.h: Added prototype for malloc_free_space().
2000-10-18 15:02:06 +00:00
Joel Sherrill
9c3fa30a11 2000-09-28 Joel Sherrill <joel@OARcorp.com>
* libc/libio.h (rtems_filesystem_file_handlers_r,
	rtems_filesystem_operations_table): Added _h to all structure
	fields to indicate they are "handlers".
	* libc/libio_.h, libc/chdir.c, libc/chmod.c, libc/chown.c,
	libc/close.c, libc/eval.c, libc/fchdir.c, libc/fchmod.c,
	libc/fcntl.c, libc/fdatasync.c, libc/fstat.c, libc/fsync.c,
	libc/ftruncate.c, libc/getdents.c, libc/imfs_eval.c,
	libc/imfs_unlink.c, libc/ioctl.c, libc/ioman.c, libc/link.c,
	libc/lseek.c, libc/mknod.c, libc/mount.c, libc/open.c, libc/read.c,
	libc/readlink.c, libc/rmdir.c, libc/stat.c, libc/symlink.c,
	libc/unlink.c, libc/unmount.c, libc/utime.c, libc/write.c:
	Modified to reflect above name change.
2000-09-28 20:19:23 +00:00
Joel Sherrill
dd19c0bb06 2000-08-11 Chris Johns <ccj@acm.org>
* libc/chmod.c: Return ENOTSUP if filesystem does not have handler.
	* libc/eval.c: Ditto.
	* libc/fcntl.c: Ditto.
	* libc/fsync.c: Ditto.
	* libc/ioctl.c: Ditto.
	* libc/ioman.c: Ditto.
	* libc/link.c: Ditto.
	* libc/memfile.c: Ditto.
	* libc/mknod.c: Ditto.
	* libc/symlink.c: Ditto.
	* libc/libio.h(rtems_filesystem_dev_major_t): New macro.
	* libc/libio.h(rtems_filesystem_dev_minor_t): New macro.
2000-08-11 20:04:27 +00:00
Joel Sherrill
730daa62bc Moved <sys/cdefs.h> from libnetworking to lib/include so non-networking
configurations could see it while including <sys/ioctl.h> and
<sys/ioccom.h>.
2000-06-14 21:13:20 +00:00
Joel Sherrill
9b05600b2c *** empty log message *** 2000-06-14 20:22:31 +00:00
Joel Sherrill
80ad143b73 Temporary hack to compile. Need to probably address definition
of all FIO constants and conflict with libnetworking code.
2000-06-13 21:42:55 +00:00
Joel Sherrill
8ef38186fa Patch from John Cotton <john.cotton@nrc.ca>, Charles-Antoine Gauthier
<charles.gauthier@iit.nrc.ca>, and Darlene A. Stewart
<Darlene.Stewart@nrc.ca> to add support for a number of very
significant things:

  + BSPs for many variations on the Motorola MBX8xx board series
  + Cache Manager including initial support for m68040
    and PowerPC
  + Rework of mpc8xx libcpu code so all mpc8xx CPUs now use
    same code base.
  + Rework of eth_comm BSP to utiltize above.

John reports this works on the 821 and 860
2000-06-12 19:57:02 +00:00
Joel Sherrill
df49c60c96 Merged from 4.5.0-beta3a 2000-06-12 15:00:15 +00:00
Joel Sherrill
e4c0744478 Patch rtems-rc-4.5.0-13-cvs.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
adds .cvsignore.
2000-04-13 14:47:15 +00:00
Joel Sherrill
08311cc3a9 Updated copyright notice. 1999-11-17 17:51:34 +00:00
Jennifer Averett
4a07d2b866 Moved the rmnod callback from the operations table to the handler table. 1999-10-29 15:19:13 +00:00
Jennifer Averett
4bde80720f Joel added a table of mount entry requests to be processed during
initialization.
1999-10-29 14:28:39 +00:00
Joel Sherrill
2fe47fff06 Added include of libio.h so this would compile when posix is disabled. 1999-10-26 21:51:07 +00:00
Joel Sherrill
657e1bf66b Added initial cut at miniIMFS which leaves out memfile and directory
readdir support.  The next step is to add a mount table and configure
either the miniIMFS or the full IMFS at the application level.
1999-10-26 20:17:13 +00:00
Joel Sherrill
51435fc7c5 Split null handlers table to own file and renamed.
Renamed IMFS handler tables to include IMFS prefix.
1999-10-12 19:26:37 +00:00
Joel Sherrill
dd0f32614c Added rtems_filesystem_freenode() macro and added calls at appropriate
places to make sure memory allocated for filesystem specifif nodes
gets freed.
1999-10-12 19:10:46 +00:00
Joel Sherrill
e2116f9003 Fixed spacing. 1999-10-12 19:09:27 +00:00
Joel Sherrill
937ab62c30 After comments D. V. Henkel-Wallace <gumby@zembu.com>, the interface to
mount() was changed to avoid the use of a string as the options.
1999-06-15 22:16:30 +00:00
Joel Sherrill
4ecc390933 RTEMS_FILESYSTEM_READ_WRITE_ONLY changed to RTEMS_FILESYSTEM_READ_WRITE
for simplicity.
1999-06-14 20:18:56 +00:00
Joel Sherrill
a432c4b710 Fix based on bug report from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
There seems to be an ugly dependency between posix-headers and
    libcsupport.

    Configuring rtems with
    ../rtems-rc-19990324-0/configure \
    --target=i386-rtems \
    --prefix=<somewhere> \
    --disable-posix

    "make RTEMS_BSP=pc386" results into:

    [...]
    /opt/rtems/bin/i386-rtems-gcc --pipe
    -B/users/rtems/src/multi/build/pc386/lib/ -specs bsp_specs -qrtems
    -I/users/rtems/src/multi/build/pc386/lib/include/networking  -g -Wall
    -ansi -fasm  -O4 -fomit-frame-pointer    -c -o o-pc386/utime.o
    ../../../../../rtems-rc-19990324-0/c/src/lib/libc/utime.c
    In file included from
    ../../../../../rtems-rc-19990324-0/c/src/lib/libc/utime.c:16:
    /opt/rtems/i386-rtems/include/utime.h:4: sys/utime.h: No such file or
    directory
    ../../../../../rtems-rc-19990324-0/c/src/lib/libc/utime.c:24: warning:
    `struct utimbuf' declared inside parameter list
    ../../../../../rtems-rc-19990324-0/c/src/lib/libc/utime.c:24: warning:
    its scope is only this definition or declaration,
    ../../../../../rtems-rc-19990324-0/c/src/lib/libc/utime.c:24: warning:
    which is probably not what you want.
    ../../../../../rtems-rc-19990324-0/c/src/lib/libc/utime.c: In function
    `utime':
    ../../../../../rtems-rc-19990324-0/c/src/lib/libc/utime.c:34:
    dereferencing pointer to incomplete type
    ../../../../../rtems-rc-19990324-0/c/src/lib/libc/utime.c:34:
    dereferencing pointer to incomplete type
    make[4]: *** [o-pc386/utime.o] Error 1
    make[3]: *** [all] Error 1
    make[2]: *** [all] Error 1
    make[1]: *** [all] Error 1
    make[1]: Leaving directory `/lfs/poseidon/users/rtems/src/multi/build/c'

    make: *** [all] Error 1

    Apparently sys/utime.h is one of the posix headers and therefore gets
    not installed (I suppose this is correct).

    IMO, this probably indicates that sys/utime.h has to be moved to another
    include subdirectory and should not be part of the posix-package.
    [AFAIK, sys/*.h are system dependent headers, so why should it be a
    posix-header? - Hmm]
1999-03-24 22:52:47 +00:00
Joel Sherrill
af0200363e Patch from Eric Norum <eric@skatter.usask.ca> that adds external
fcntl support and an external fcntl handler for sockets.
1999-03-19 21:51:58 +00:00
Joel Sherrill
23c4bbf58a Use proper include for libio.h. 1999-03-16 01:41:16 +00:00
Joel Sherrill
3ef87981eb Added F_GETFL support so the fdopen() implementation in newlib 1.8.1
would work.  At the same time, the initial implementation of F_SETFL
was added.  A support routine was added to convert internal libio
flags back to the POSIX style.  Eventually the internal representation
should be eliminated in the interest of simplicity and code reduction.
This problem was reported by Jake Janovetz <janovetz@tempest.ece.uiuc.edu>.
1999-03-06 18:09:15 +00:00
Joel Sherrill
73f6236bc0 Patch from Eric Norum <eric@skatter.usask.ca> to eliminate external
IO handlers scheme that was implemented originally just to support
sockets.  The file system IO switch is more general and works fine.
1999-03-01 22:40:08 +00:00