summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libc (unfollow)
Commit message (Collapse)AuthorFilesLines
2001-10-112001-10-11 Mike Siers <mikes@poliac.com>Joel Sherrill1-6/+22
* libc/termios.c: Fixed a memory leak in the termios software. Basically the tty open function was allocating an input raw buffer, an output raw buffer, and a cooked buffer that were not getting released. I have attached a patch for the latest snapshot. The patch also has a fix to ensure the tty link list is updated correctly when a tty is closed.
2001-10-102001-10-10 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-1/+1
* libc/printk.c (printNum): Properly handle a maxwidth of 0 as reported by Nick Hennenfent <NICK.HENNENFENT@ROCHE.COM>.
2001-09-242001-09-22 Ralf Corsepius <corsepiu@faw.uni-ulm.de>Joel Sherrill1-1/+2
* libc/Makefile.am: Revamp INCLUDES handling to make automake-1.5 happy.
2001-09-212001-09-14 Eric Norum <eric.norum@usask.ca>Joel Sherrill1-7/+2
* libc/gxx_wrappers.c: Modifications to make gcc 3.x happy.
2001-08-172001-08-17 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-0/+17
* 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-172001-08-16 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-3/+2
* libc/lseek.c: Modified after discussion with Eugeny S. Mints <jack@oktet.ru> to correct the behavior. There were two mistakes. First, iop->offset was incorrectly set for SEEK_END. Second, iop->offset should be left unmodified if there are errors. This modification attempts to fix both situations.
2001-08-162001-08-16 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-6/+26
* libc/lseek.c: Modified after discussion with Eugeny S. Mints <jack@oktet.ru> to correct the behavior. There were two mistakes. First, iop->offset was incorrectly set for SEEK_END. Second, iop->offset should be left unmodified if there are errors. This modification attempts to fix both situations.
2001-08-162001-08-16 Mike Siers <mikes@poliac.com>Joel Sherrill1-0/+42
* libc/termios.c: Fix a bug in the termios implementation in the following scenario: The General Terminal Interface document that me states that if VMIN = 0 and VTIME = 0, then read() should return the minimum of two values: a) number of bytes available b) number of bytes requested (I assume from the read call) The current implementation of the fillBufferQueue() in termios.c is always return 1 character with these setting values. I know the termios buffer has more than one character available and my read() call is requesting 1024 bytes.
2001-08-162001-08-16 Mike Siers <mikes@poliac.com>Joel Sherrill1-8/+11
* libc/termios.c: Fix a bug in the termios implementation in the following scenario: The General Terminal Interface document that me states that if VMIN = 0 and VTIME = 0, then read() should return the minimum of two values: a) number of bytes available b) number of bytes requested (I assume from the read call) The current implementation of the fillBufferQueue() in termios.c is always return 1 character with these setting values. I know the termios buffer has more than one character available and my read() call is requesting 1024 bytes.
2001-08-092001-08-09 Fernando-Ruiz Casas <correo@fernando-ruiz.com>Joel Sherrill2-2/+34
* libc/getgrent.c, libc/getpwent.c: the 'ls' and more related command previous failed after a chroot(). (unknown user & group)
2001-08-032001-08-03 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-0/+8
* libc/libio_sockets.c (rtems_bsdnet_fdToSocket): Per bug report from Gene Smith <Gene.Smith@sea.siemens.com>, enhanced the error checking to account for a socket being closed.
2001-05-252001-05-25 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-4/+2
* libc/base_fs.c: Deleted chmod() now that IMFS creates the root node with the desired permissions. chmod() is also not supported by the miniIMFS so this is not allowable.
2001-05-242000-05-24 Fernando Ruiz Casas <fernando.ruiz@ctv.es>Joel Sherrill3-9/+15
* libc/ttyname.c (ttyname_r): Removed duplicate call to closedir(). * libc/getpwent.c: Create a more robust /etc/passwd and /etc/group. * libc/base_fs.c: Change permissions of files and directories. Now uses octal constants.
2001-05-112001-05-11 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-1/+1
* libc/write.c: Change type of rc to match return type from underlying function per report from Eric Norum.
2001-04-242001-04-24 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2-1/+2
* libc/libio.c (rtems_libio_allocate): Make sure size and offset fields are cleared on each file open. Before this field was cleared, this resulted in the value from the last time that IOP was used being still in place. Discovered by Andrew Bythell <abythell@nortelnetworks.com>. * libc/open.c: Remove redundant setting of iop->offset.
2001-04-202001-04-20 Correo Fernando-ruiz <correo@fernando-ruiz.com>Joel Sherrill2-21/+54
* 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-01-262001-01-26 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-2/+2
* libc/chroot.c: Fixed naming problems. Names were changed when the code this depends on was merged.
2001-01-262001-01-25 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2-1/+60
* cpu.c, rtems/score/cpu.h: Bug report from Peter Mueller <peter.o.mueller@gmx.de> because of not correcting for the ISR vector table now being allocated from the workspace.
2001-01-252001-01-25 Fernando Ruiz <fernando.ruiz@ctv.es>Joel Sherrill4-6/+40
* 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-242001-01-24 Ralf Corsepius <corsepiu@faw.uni-ulm.de>Joel Sherrill1-0/+4
* configure.in: Add src/config.h * src/Makefile.am: Add INCLUDES += -I. to pickup config.h * src/.cvsignore: Add config.h and stamp-h * src/*.c: Add config.h support.
2001-01-082001-01-08 Ralf Corsepius <corsepiu@faw.uni-ulm.de>Joel Sherrill91-2/+358
* configure.in: Add libc/config.h * libc/Makefile.am: Add INCLUDES += -I. to pickup config.h * libc/.cvsignore: Add config.h and stamp-h * libc/*.c: Add config.h support.
2000-12-062000-12-06 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2-2/+1
* libc/mallocfreespace.c: Name of routine is rtems_region_get_information() NOT region_get_information(). * libc/unmount.c: Removed unused variable.
2000-11-302000-11-30 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2-2/+2
* include/rtems/Makefile.am: Added termiostypes.h. * libc/Makefile.am: Removed termiostypes.h. * libc/termios.c: Changed include of "termiostypes.h" to <rtems/termiostypes.h> since that is an RTEMS specific header file.
2000-11-282000-11-28 Sergei Organov <osv@javad.ru>Joel Sherrill1-1/+4
* libc/getcwd.c: Ensure _closedir(dir) is called even on error exit from the routine.
2000-11-252000-11-25 Antti P Miettinen <antti.p.miettinen@nokia.com>Joel Sherrill2-156/+440
* libc/termios.c, libc/termiostypes.h: Task driver driver model and line discipline support from Thomas Doerfler <Thomas.Doerfler@imd-systems.de>.
2000-11-202000-11-20 Dmitry Kargapolov <dk@gentex.ru>Joel Sherrill1-3/+9
* libc/mount.c: Make sure there is space allocated for a device name in the mount table entry.
2000-11-172000-11-17 Jennifer Averret <jennifer@OARcorp.com>Jennifer Averett2-78/+53
* libc/mount.c (search_mt_for_mount_point): Deleted routine. * libc/mount.c (Is_node_fs_root): Replacement for above that accounts for the imaginary root node being returned by the filesystem evaluation routine. * libc/unmount.c (unmount): Account for imaginary root node being returned and improved variable names to clarify code. * libc/unmount.c (file_systems_below_this_mountpoint): Body of routine replaced to account for imaginary root node being returned.
2000-11-102000-11-10 Ralf Corsepius <corsepiu@faw.uni-ulm.de>Joel Sherrill1-0/+2
* libc/libio.c: Special treatment of O_NDELAY for Cygwin.
2000-11-012000-11-01 Joel Sherrill <joel@OARcorp.com>Joel Sherrill54-1056/+49
* 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-10-252000-10-24 Joel Sherrill <joel@OARcorp.com>Joel Sherrill6-140/+6
* 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-182000-10-18 Chris Johns <ccj@acm.org>Joel Sherrill35-4628/+3
* libfs created. * libc/deviceio.c, libc/imfs_getchild.c, libc/imfs_readlink.c, libc/imfs.h, libc/imfs_gtkn.c, libc/imfs_rmnod.c, libc/imfs_chown.c, libc/imfs_handlers_device.c, libc/imfs_stat.c, libc/imfs_creat.c, libc/imfs_handlers_directory.c, libc/imfs_symlink.c, libc/imfs_debug.c, libc/imfs_handlers_link.c, libc/imfs_unixstub.c, libc/imfs_directory.c, libc/imfs_handlers_memfile.c, libc/imfs_unlink.c, libc/imfs_eval.c, libc/imfs_init.c, libc/imfs_unmount.c, libc/imfs_fchmod.c, libc/imfs_initsupp.c, libc/imfs_utime.c, libc/imfs_fcntl.c, libc/imfs_link.c, libc/memfile.c, libc/imfs_fdatasync.c, libc/imfs_mknod.c, libc/miniimfs_init.c, libc/imfs_free.c, libc/imfs_mount.c, libc/imfs_fsunmount.c, libc/imfs_ntype.c: Moved to libfs/src/imfs. * Makefile.am: Modified to reflect above.
2000-10-182000-10-18 Joel Sherrill <joel@OARcorp.com>Joel Sherrill3-1/+42
* 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-182000-10-18 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-4/+6
* libc/fcntl.c: Do not require every filesystem to have an fcntl() handler. Most fcntl() operations can be performed with no filesystem support. * ChangeLog: Corrected comment.
2000-09-282000-09-28 Joel Sherrill <joel@OARcorp.com>Joel Sherrill33-119/+119
* 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-222000-09-22 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-1/+1
* libc/newlibc.c: Removed _A29K specific ifdef.
2000-09-052000-09-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>Joel Sherrill1-4/+5
* libc/Makefile.am: Include compile.am
2000-09-052000-09-05 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-0/+1
* libio.c: Added O_NONBLOCK to list of flags.
2000-08-302000-08-30 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-1/+1
* Many files: Moved posix/include/rtems/posix/seterr.h to score/include/rtems/seterr.h so it would be available within all APIs.
2000-08-252000-08-25 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill1-1/+2
* libc/fs_null_handlers.c: Added missing rmnod entry.
2000-08-252000-08-25 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill4-78/+94
* libc/isatty.c, libc/imfs_handlers_directory.c, libc/creat.c, libc/imfs_directory.c: Fixed style issues.
2000-08-112000-08-11 Chris Johns <ccj@acm.org>Joel Sherrill11-7/+58
* 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-03IEEEJoel Sherrill1-1/+1
==== -4 = {d = -4, i = {0xc0100000, 0x0}} s=1 e=0x80 m=0x100000 (0x0900000) -3 = {d = -3, i = {0xc0080000, 0x0}} s=1 e=0x80 m=0x080000 (0x0880000) -2 = {d = -2, i = {0xc0000000, 0x0}} s=1 e=0x80 m=0x000000 (0x0800000) -1 = {d = -1, i = {0xbff00000, 0x0}} s=1 e=0x7f m=0x000000 (0x0800000) 0 = {d = 0, i = {0x00000000, 0x0}} s=0 e=0 m=0x000000 (0x0800000) 1 = {d = 1, i = {0x3ff00000, 0x0}} s=0 e=0x7f m=0x000000 (0x0800000) 2 = {d = 2, i = {0x40000000, 0x0}} s=0 e=0 m=0x000000 (0x0800000) 3 = {d = 3, i = {0x40080000, 0x0}} s=0 e=0 m=0x080000 (0x0880000) C4X === -4 = {d = -4, i = {0x01800000, 0x0}} s=1 e=1 m=0x800000 (0x1000000) -3 = {d = -3, i = {0x01c00000, 0x0}} s=1 e=1 m=0xa00000 (0x1400000) -2 = {d = -2, i = {0x00800000, 0x0}} s=1 e=0 m=0x800000 (0x1000000) -1 = {d = -1, i = {0xff800000, 0x0}} s=1 e=0xff m=0x000000 (0x1000000) 0 = {d = 0, i = {0x80000000, 0x0}} s=0 e=0 m=0x000000 (0x0800000) 1 = {d = 1, i = {0x00000000, 0x0}} s=0 e=0x7f m=0x000000 (0x0800000) 2 = {d = 2, i = {0x01000000, 0x0}} s=0 e=1 m=0x400000 (0x0800000) 3 = {d = 3, i = {0x01400000, 0x0}} s=0 e=1 m=0x600000 (0x0c00000) 4 = {d = 4, i = {0x02000000, 0x0}} s=0 e=2 m=0xXXXXXX (0x0000000) 0x1010 0000 0101 0000 0010 1002
2000-08-01Patch from Eric Norum <eric@cls.usask.ca> to avoid lockup underJoel Sherrill1-9/+9
the correct circumstances of DMA buffer size, serial line interrupts, and ethernet interrupts the termios osend routine would lock up waiting for the raw output buffer semaphore.
2000-07-26Port of RTEMS to the Texas Instruments C3x/C4x DSP families includingJoel Sherrill1-2/+2
a BSP (c4xsim) supporting the simulator included with gdb. This port was done by Joel Sherrill and Jennifer Averett of OAR Corporation. Also included with this port is a space/time optimization to eliminate FP context switch management on CPUs without hardware or software FP. An issue with this port was that sizeof(unsigned32) = sizeof(unsigned8) on this CPU. This required addressing alignment checks and assumptions as well as fixing code that assumed sizeof(unsigned32) == 4.
2000-07-02Fixed stat_ino should be st_ino.Joel Sherrill1-1/+1
2000-06-30Patch from Chris Johns <cjohns@cybertec.com.au> so the directoryJoel Sherrill1-1/+1
read function in the IMFS properly returns the inode number.
2000-06-30Patch from Chris Johns <cjohns@cybertec.com.au> to add support forJoel Sherrill2-13/+17
stat()'ing a symbolic link. This is needed to support the port of the BSD commands like ls to RTEMS.
2000-06-30Patch from Chris Johns <cjohns@cybertec.com.au> to add fchdir()Joel Sherrill3-1/+73
functionality to libc and update TODO.
2000-06-29Patch from Chris Johns <cjohns@cybertec.com.au> to make sure theJoel Sherrill1-1/+2
ttyHead back link is set.
2000-06-26Patch from Chris Johns <cjohns@cybertec.com.au> andJoel Sherrill1-0/+3
Jennifer Averett <jennifer.averett@oarcorp.com> to fix appends (O_APPEND at open time) on in-memory files. A call such as: fd = open (file, O_APPEND | O_WRONLY); did not append to the end of the file.