Commit Graph

831 Commits

Author SHA1 Message Date
Joel Sherrill
69b1322b02 2010-03-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/sleep_noposix.c: Fix warning and bug.
2010-03-22 13:38:04 +00:00
Joel Sherrill
e137f0e944 2010-03-11 Ken Peters <kptrs@yahoo.com>
PR 1456/cpukit
	* libcsupport/src/ttyname.c: ttyname_r() when called directly (not via
	ttyname()) does not prefix the caller provided buffer with the
	predefined _PATH_DEV string (/dev/). Thus the directory search fails
	and no tty name is returned to the caller.
2010-03-11 19:14:41 +00:00
Chris Johns
8ec7abb551 010-03-04 Chris Johns <chrisj@rtems.org>
* libcsupport/include/rtems/libio.h, libcsupport/src/_rename_r.c:
        Add a rename file op and have rename use it.

        * libfs/Makefile.am, libfs/src/dosfs/msdos_rename.c,
        libfs/src/imfs/imfs_rename.c: New files to support the rename file
        op.

        * libfs/src/imfs/imfs.h: Add rename interface.

        * libfs/src/imfs/imfs_init.c: Add rename handler.

        * libfs/src/imfs/miniimfs_init.c: Fix up ops struct.

        * libfs/src/dosfs/msdos.h: Add msdos_rename and remove
        msdos_file_link.

        * libfs/src/dosfs/msdos_create.c: Remove the link call.

        * libfs/src/dosfs/msdos_eval.c: Fix a path parsing bug.

        * libfs/src/dosfs/msdos_init.c: Add rename handler and clean up
        the struct naming.

        * libfs/src/rfs/rtems-rfs-link.c, libfs/src/rfs/rtems-rfs-link.h:
        Change the link call to allow linking of directories if told to
        and change the unlink to handle unlink directories that are not
        empty so rename can be supported.

        * libfs/src/rfs/rtems-rfs-rtems-dir.c: Fix the link/unlink calls.

        * libfs/src/rfs/rtems-rfs-rtems.c: Add a rename handler. Fix the
        link/unlink calls.

        * libfs/src/dosfs/msdos_dir.c, libfs/src/dosfs/msdos_format.c,
        libfs/src/dosfs/msdos_misc.c, httpd/asp.c,
        libfs/src/nfsclient/src/nfs.c: Work around a newlib warning when
        using the is*() family of calls.
2010-03-04 06:36:51 +00:00
Chris Johns
b3b8add4b4 2010-02-16 Chris Johns <chrisj@rtems.org>
* libcsupport/src/open.c: Tighten the open handler check.

2010-02-16      Sebastian Huber <sebastian.huber@embedded-brains.de>

        * libcsupport/src/rmdir.c, libcsupport/src/unlink.c: Free the
        allocated pathloc.
2010-02-16 01:47:46 +00:00
Joel Sherrill
e00381a574 2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>
Coverity Id 28
	* libcsupport/src/termios.c: Set then unconditionally to avoid
	potential paths where it might be used uninitialized. Recommended by
	Eric Norum.
2010-01-19 23:03:24 +00:00
Joel Sherrill
44be50c22f 2009-12-28 Shrikant Gaikwad <n3oo3n@gmail.com>
* cpukit/libfs/src/pipe/pipe.c Restructured code to remove the
	goto statements.
2009-12-28 16:36:08 +00:00
Joel Sherrill
27643e0336 2009-12-17 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/termios.c, libfs/src/dosfs/msdos_format.c,
	libfs/src/nfsclient/src/nfs.c, libfs/src/pipe/fifo.c,
	libnetworking/lib/rtems_bsdnet_ntp.c, libnetworking/lib/tftpDriver.c,
	libnetworking/rtems/rtems_glue.c, libnetworking/rtems/rtems_select.c:
	Eliminate uses of deprecated rtems_clock_get() and replace with
	properly typed routine.
2009-12-17 20:26:09 +00:00
Ralf Corsepius
b2cc1650be 2009-12-10 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/include/rtems/libio.h: Change termios-write to ssize_t
	write(...., size_t).
2009-12-10 14:10:57 +00:00
Glenn Humphrey
dca9a825e4 2009-12-02 Glenn Humphrey <glenn.humphrey@OARcorp.com>
* libcsupport/src/__times.c, libmisc/cpuuse/cpuusagedata.c,
	libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c,
	rtems/include/rtems/rtems/types.h, rtems/src/ratemongetstatistics.c,
	rtems/src/ratemonreportstatistics.c, score/src/threaddispatch.c,
	score/src/threadinitialize.c, score/src/threadtickletimeslice.c:
	Updated copyright line.
2009-12-02 18:22:19 +00:00
Glenn Humphrey
c6f7e060ea 2009-12-02 Glenn Humphrey <glenn.humphrey@OARcorp.com>
* configure.ac, libcsupport/src/__times.c,
	libmisc/cpuuse/cpuusagedata.c, libmisc/cpuuse/cpuusagereport.c,
	libmisc/cpuuse/cpuusagereset.c, rtems/include/rtems/rtems/ratemon.h,
	rtems/include/rtems/rtems/types.h, rtems/src/ratemongetstatistics.c,
	rtems/src/ratemongetstatus.c, rtems/src/ratemonperiod.c,
	rtems/src/ratemonreportstatistics.c,
	score/include/rtems/score/thread.h, score/src/threaddispatch.c,
	score/src/threadinitialize.c, score/src/threadtickletimeslice.c:
	Changed the configuration of statistics granularity to use just one
	define.
2009-12-02 18:15:16 +00:00
Joel Sherrill
1eb97ad840 2009-12-01 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/Makefile.am: Split no_posix.c so using sleep() does not
	pull in kill() stubs.
	* libcsupport/src/kill_noposix.c, libcsupport/src/sleep_noposix.c:
	New files.
	* libcsupport/src/no_posix.c: Removed.
2009-12-01 14:22:58 +00:00
Thomas Doerfler
0b0485ae7f Fixed usage of va_arg(). 2009-12-01 10:12:55 +00:00
Thomas Doerfler
42836e3f85 Obtain output semaphore before drain output during close to prevent an infinite output drain loop 2009-11-30 13:23:58 +00:00
Thomas Doerfler
9224a751b1 Changed base implementation of protected heap allocations to use _Heap_Allocate_aligned_with_boundary(). 2009-11-30 13:06:21 +00:00
Thomas Doerfler
2feeb261d0 Fixed output of unsigned integers.
Changed type of boolean variables to bool.  Use unsigned integer type
for radix and width parameters.
2009-11-30 12:47:44 +00:00
Ralf Corsepius
18daff9b95 Whitespace removal. 2009-11-29 13:35:32 +00:00
Ralf Corsepius
33c3b54d57 Whitespace removal. 2009-11-29 11:57:23 +00:00
Ralf Corsepius
e447c7d242 Whitespace removal. 2009-11-28 06:15:55 +00:00
Ralf Corsepius
88db141a5d 2009-11-19 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/src/malloc_boundary.c: Avoid implicit type cast
	(https://www.rtems.org/bugzilla/show_bug.cgi?id=1472#c1).
2009-11-19 13:51:40 +00:00
Joel Sherrill
0c116189aa 2009-11-11 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libcsupport/Makefile.am, libcsupport/include/rtems/malloc.h,
	libcsupport/src/rtems_malloc.c: New function rtems_malloc().
2009-11-11 20:36:44 +00:00
Joel Sherrill
eecf752dc3 2009-11-09 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/open_dev_console.c: Use constant numbers to avoid
	overflow when shifting on 16-bit targets.
2009-11-09 15:19:57 +00:00
Ralf Corsepius
c38407e6be 2009-10-22 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/include/rtems/error.h: Use ordinal constants for
	RTEMS_ERROR_ERRNO, RTEMS_ERROR_PANIC, RTEMS_ERROR_ABORT to avoid
	implicit constant conversion overflows on 16bit-int targets.
2009-10-22 11:20:44 +00:00
Ralf Corsepius
4de1c9b731 2009-10-14 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/src/no_libc.c: Remove.
	* libcsupport/Makefile.am: Remove no_libc.c.
2009-10-14 16:30:39 +00:00
Ralf Corsepius
f0ae08cf87 2009-10-14 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/src/newlibc_reent.c: Eliminate RTEMS_UNIX.
2009-10-14 16:27:54 +00:00
Ralf Corsepius
435cf5a26b 2009-10-14 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/src/newlibc_exit.c: Eliminate RTEMS_UNIX.
2009-10-14 16:26:22 +00:00
Ralf Corsepius
9839023a9b 2009-10-14 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/src/base_fs.c: Eliminate RTEMS_UNIX.
2009-10-14 16:21:28 +00:00
Ralf Corsepius
c906b1ac9b 2009-10-14 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/src/stat.c: Eliminate RTEMS_UNIX.
2009-10-14 16:19:47 +00:00
Ralf Corsepius
e717495dd2 2009-10-14 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/include/rtems/libcsupport.h: Remove RTEMS_UNIX, hpux.
	Fix extern "C" {}.
2009-10-14 16:13:05 +00:00
Ralf Corsepius
2216aa4b80 Remove libcsupport/src/unixlibc.c, libcsupport/src/unixlibc_io.c, libcsupport/src/hosterr.c. 2009-10-14 13:42:16 +00:00
Ralf Corsepius
22eda66fa5 Remove. 2009-10-14 13:41:42 +00:00
Ralf Corsepius
68b0a2a8cf Reflect having introduced rtems_error_code_t. 2009-10-12 16:17:37 +00:00
Ralf Corsepius
8ed3d52ee7 Introduce rtems_error_code_t.
Minor portability code-massaging.
2009-10-12 16:17:19 +00:00
Chris Johns
eb649786c8 2009-10-08 Chris Johns <chrisj@rtems.org>
* Makefile.am, preinstall.am: Added statvfs.h.
        * libcsupport/Makefile.am: Add statvfs.c.
        * libcsupport/include/sys/statvfs.h, libcsupport/src/statvfs.c:
        New.
        * libcsupport/include/rtems/libio.h: Add a file system handler for
        the statvfs call.
        * libfs/src/devfs/devfs_init.c, libfs/src/dosfs/msdos_init.c,
        libfs/src/imfs/imfs_init.c, libfs/src/nfsclient/src/nfs.c: Set the
        statvfs handler to NULL.
        * include/rtems/fs.h: Add a second node access field for the RFS
        file system to hold a directory offset while the existing field
        holds the inode number. This save a rescan of the directory when
        working with directories.
        * libblock/include/rtems/bdbuf.h: Added references and user fields
        to the buffer descriptor.
        * libblock/src/bdbuf.c: Added dynamic buffer support for different
        block sizes. Fixed a number of bugs.
        * libblock/src/blkdev.c: Release the disk device on an error.
        * libblock/src/diskdevs.c: Set the block size to the media block
        size during initialisation of the disk device.
        * libblock/src/flashdisk.c, libblock/src/nvdisk.c,
        libblock/src/ramdisk.c: Updated the drivers to handle variable
        block sizes.
        * libfs/src/dosfs/fat.c, libfs/src/dosfs/fat.h: Release any
        buffers when an error occurs. The FAT buffer layer hangs onto a
        single buffer while mounted. This should be fixed.
        * sapi/inline/rtems/chain.inl: Added rtems_chain_set_off_chain,
        rtems_chain_is_node_off_chain, and rtems_chain_previous.
        * score/inline/rtems/score/chain.inl: Added _Chain_Set_off_chain,
        and _Chain_Is_node_off_chain.
        * libmisc/shell/main_ln.c, libmisc/shell/main_mknod.c,
        libmisc/shell/mknod-pack_dev.c, libmisc/shell/mknod-pack_dev.h:
        New shell commands.
        * libmisc/Makefile.am, libmisc/shell/shellconfig.h: Added ln and
        mknod commands.
        * libmisc/shell/hexdump-display.c: Fixed the reopen bug which
        showed up as a free with a bad pointer.
        * libmisc/shell/main_mount.c: List the user adding file system
        when listing the available file systems to mount.
        * libmisc/shell/utils-cp.c: Remove the fixed static copy buffer
        and use a large dynamic buffer.
        * score/inline/rtems/score/address.inl, score/src/coremsgsubmit.c,
        score/src/objectallocate.c, score/src/objectfree.c: Remove
        warnings.
2009-10-08 07:07:36 +00:00
Ralf Corsepius
346725cc9e Rework autoconf defines. 2009-09-30 08:20:32 +00:00
Ralf Corsepius
00da59e4f2 2009-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/src/_rename_r.c: Rework autoconf defines.
	Remove unused includes.
2009-09-30 06:51:15 +00:00
Ralf Corsepius
cc9b81ea45 2009-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/src/__gettod.c: Rework autoconf defines.
	Eliminate RTEMS_UNIX.
2009-09-30 06:45:38 +00:00
Ralf Corsepius
a13c3df9fa Rework autoconf defines. 2009-09-30 06:15:39 +00:00
Ralf Corsepius
1613c7e01f Remove unused includes. 2009-09-30 05:57:20 +00:00
Ralf Corsepius
80b381b598 Eliminate RTEMS_UNIX. 2009-09-30 05:51:18 +00:00
Ralf Corsepius
96c56e239e Rework autoconf defines. 2009-09-30 05:15:00 +00:00
Ralf Corsepius
dfa6882c5b Comment out checkMallocArena (unused). 2009-09-30 05:12:35 +00:00
Ralf Corsepius
c92b69c340 2009-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/src/__assert.c: Rework autoconf defines.
2009-09-30 05:05:30 +00:00
Ralf Corsepius
e2e3ab8f89 2009-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/src/__brk.c: Eliminate RTEMS_UNIX.
	Remove unused includes.
2009-09-30 04:51:56 +00:00
Ralf Corsepius
b300e72dd9 Remove unused includes. 2009-09-30 04:46:31 +00:00
Ralf Corsepius
0501d72b9d Remove stray whitespace. 2009-09-30 04:43:35 +00:00
Ralf Corsepius
363c7d83e7 Remove #include <inttypes.h>. 2009-09-30 04:39:46 +00:00
Ralf Corsepius
e1233892ad 2009-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/src/termios_setinitialbaud.c:
	Include rtems/termiostypes.h.
	Rename termios_set_initial_baud into rtems_termios_set_initial_baud.
2009-09-30 02:56:20 +00:00
Ralf Corsepius
dc9e135b5b 2009-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/src/termios_num2baud.c:
	Include rtems/termiostypes.h.
	Rename termios_number_to_baud into rtems_number_to_baud.
2009-09-30 02:55:06 +00:00
Ralf Corsepius
1e4eeb314e 2009-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/src/termios_baud2num.c:
	Include rtems/termiostypes.h.
	Rename termios_baud_to_number into rtems_termios_baud_to_number.
2009-09-30 02:54:01 +00:00
Ralf Corsepius
add4185e1f 2009-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/src/termios_baud2index.c:
	Include rtems/termiostypes.h.
	Rename termios_baud_to_index into rtems_termios_baud_to_index.
2009-09-30 02:53:05 +00:00