Commit Graph

94 Commits

Author SHA1 Message Date
Sebastian Huber
9f527308d7 libblock: Add block device statistics 2012-06-12 10:12:40 +02:00
Sebastian Huber
3b7c123c8d Filesystem: Reference counting for locations
o A new data structure rtems_filesystem_global_location_t was
   introduced to be used for
    o the mount point location in the mount table entry,
    o the file system root location in the mount table entry,
    o the root directory location in the user environment, and
    o the current directory location in the user environment.
   During the path evaluation global start locations are obtained to
   ensure that the current file system instance will be not unmounted in
   the meantime.
 o The user environment uses now reference counting and is protected
   from concurrent access.
 o The path evaluation process was completely rewritten and simplified.
   The IMFS, RFS, NFS, and DOSFS use now a generic path evaluation
   method.  Recursive calls in the path evaluation have been replaced
   with iteration to avoid stack overflows.  Only the evaluation of
   symbolic links is recursive.  No dynamic memory allocations and
   intermediate buffers are used in the high level path evaluation.  No
   global locks are held during the file system instance specific path
   evaluation process.
 o Recursive symbolic link evaluation is now limited by
   RTEMS_FILESYSTEM_SYMLOOP_MAX.  Applications can retrieve this value
   via sysconf().
 o The device file system (devFS) uses now no global variables and
   allocation from the workspace.  Node names are allocated from the
   heap.
 o The upper layer lseek() performs now some parameter checks.
 o The upper layer ftruncate() performs now some parameter checks.
 o unmask() is now restricted to the RWX flags and protected from
   concurrent access.
 o The fchmod_h and rmnod_h file system node handlers are now a file
   system operation.
 o The unlink_h operation has been removed.  All nodes are now destroyed
   with the rmnod_h operation.
 o New lock_h, unlock_h, clonenod_h, and are_nodes_equal_h file system
   operations.
 o The path evaluation and file system operations are now protected by
   per file system instance lock and unlock operations.
 o Fix and test file descriptor duplicate in fcntl().
 o New test fstests/fsnofs01.
2012-03-13 12:23:37 +01:00
Joel Sherrill
6d1a1d3ebb PR 2012 - mdump/wdump shell cmds handle length arg incorrectly; add ldump cmd
* libmisc/shell/main_mdump.c: Reworked to fix bugs in handling of the
	length argument and to provide an "ldump" command.  This file now also
	supports the "wdump" command.  In addition, an RTEMS API function called
	rtems_mdump() is provided to allow easy dumping from application code.
	* libmisc/shell/main_mwdump.c: Obsolete file.
	* libmisc/Makefile.am: Removed main_mwdump.c
	* libmisc/shell/shellconfig.h: Added "ldump" command.
	* shell/memory.t: Added documentation for the "ldump" command

Signed-off-by: Ric Claus <claus@SLAC.Stanford.edu>
2012-02-02 15:02:16 -06:00
Sebastian Huber
6c5ee7f009 2011-09-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libmisc/shell/shell-wait-for-input.c: New file.
	* libmisc/Makefile.am: Reflect change above.
	* libmisc/shell/shell.h: Declare rtems_shell_wait_for_input().
2011-09-16 09:16:32 +00:00
Sebastian Huber
158b416c72 2011-05-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libmisc/devnull/devzero.c, libmisc/devnull/devzero.h: New files.
	* libmisc/Makefile.am, Makefile.am, preinstall.am: Reflect changes
	above.
2011-05-13 13:46:43 +00:00
Joel Sherrill
3d6c1bb6b4 2011-03-14 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1762/cpukit
	* Makefile.am, preinstall.am, libmisc/Makefile.am, wrapup/Makefile.am:
	Add generic serial mouse driver and mouse parser. The parser code was
	in the pc386 BSP but was generic so cleaned up and placed here.
	Serial mouse driver itself is new.
	* libmisc/mouse/README, libmisc/mouse/mouse_parser.c,
	libmisc/mouse/mouse_parser.h, libmisc/mouse/serial_mouse.c,
	libmisc/mouse/serial_mouse.h: New files.
2011-03-14 14:56:08 +00:00
Joel Sherrill
d18d5890ab 2011-02-17 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/Makefile.am, libmisc/fb/mw_uid.c, libmisc/fb/mw_uid.h: Clean
	up. Add Doxygen style comments. Add method to print uid structure.
	* libmisc/fb/mw_print.c: New file.
2011-02-17 19:24:20 +00:00
Ralf Corsepius
5410c14a56 2011-02-01 Ralf Corsepius <ralf.corsepius@rtems.org>
* libmisc/Makefile.am: Add stringto/stringtolongdouble.c.
	* libmisc/stringto/stringtolongdouble.c: New.
2011-02-01 05:48:30 +00:00
Ralf Corsepius
5598bdd3f6 2011-02-01 Ralf Corsepius <ralf.corsepius@rtems.org>
* libmisc/Makefile.am: Remove stringto/stringto_template.h.
	* libmisc/stringto/stringto_template.h: Remove.
2011-02-01 02:39:21 +00:00
Chris Johns
29e92b090c 2010-05-31 Chris Johns <chrisj@rtems.org>
* libcsupport/Makefile.am: Add mount-mgr.c.
        * libcsupport/src/mount-mgr.c: New.
        * include/rtems/fs.h: Added rtems_filesystem_location_mount.
        * libcsupport/include/rtems/libio.h, libcsupport/src/mount.c: New
        mount interface. It is similar to Linux.
        * libcsupport/include/rtems/libio_.h: Remove the
        init_fs_mount_table call.
        * libcsupport/src/base_fs.c: Remove init_fs_mount_table_call. Use
        the new mount call. Remove setting the root node in the global
        pathloc. Mount does this now.
        * libcsupport/src/privateenv.c: Remove the hack to set the root
        mount table entry in the environment.
        * libcsupport/src/unmount.cL Free the target string.
        * libblock/src/bdpart-mount.c: New mount API.

        * libfs/src/devfs/devfs.h, libfs/src/devfs/devfs_init.c,
        libfs/src/dosfs/dosfs.h, libfs/src/dosfs/msdos.h,
        libfs/src/dosfs/msdos_init.c, libfs/src/imfs/imfs.h,
        libfs/src/imfs/imfs_eval.c, libfs/src/imfs/imfs_init.c,
        libfs/src/imfs/miniimfs_init.c,
        libfs/src/nfsclient/src/librtemsNfs.h,
        libfs/src/rfs/rtems-rfs-rtems.c, libfs/src/rfs/rtems-rfs.h,
        libnetworking/lib/ftpfs.c, libnetworking/rtems/ftpfs.h,
        libnetworking/rtems/tftp.h: New mount_h API.

        * libfs/src/devfs/devfs_eval.c: Local include of extern ops.
        * libfs/src/nfsclient/src/nfs.c: New mount API. Removed the mount
        me call and fixed the initialisation to happen when mounting.

        * libmisc/Makefile.am, libmisc/shell/shellconfig.h: Remove mount
        filesystem files.

        * libmisc/fsmount/fsmount.c, libmisc/fsmount/fsmount.h: Updated to
        the new mount table values.

        * libmisc/shell/main_mount_ftp.c,
        libmisc/shell/main_mount_msdos.c, libmisc/shell/main_mount_rfs.c,
        libmisc/shell/main_mount_tftp.c: Removed.

        * libmisc/shell/main_mount.c: Use the new mount API. Also access
        the file system table for the file system types.

        * libnetworking/lib/tftpDriver.c: Updated to the new mount
        API. Fixed to allow mounting from any mount point. Also can now
        have more than file system mounted.

        * sapi/include/confdefs.h: Add file system configuration support.
2010-05-31 13:56:37 +00:00
Ralf Corsepius
e6505cff1d Add stringto/stringto_template.h to libstringto_a_SOURCES. 2010-03-28 03:25:06 +00:00
Joel Sherrill
81ced0e040 2010-03-09 Joel Sherrill <joel.sherrilL@oarcorp.com>
* libmisc/Makefile.am: Remove duplicate file from list.
2010-03-09 21:42:15 +00:00
Chris Johns
cca94a248b 2010-02-19 Chris Johns <chrisj@rtems.org>
* libblock/src/diskdevs.c: Create the devices as block devices.

        * libmisc/shell/main_debugrfs.c, libmisc/shell/main_mkrfs.c,
        libmisc/shell/main_mount_rfs.c: New.

        * libmisc/shell/main_msdosfmt.c: Change the command to mkdos and
        alias the old name.

        * libmisc/shell/shellconfig.h, libmisc/Makefile.am: Add RFS
        support.

        * libfs/src/rfs/rtems-rfs-shell.c,
        libfs/src/rfs/rtems-rfs-shell.h: Move the format command code into
        the shell file.
2010-02-19 03:23:11 +00:00
Chris Johns
05404983e2 2009-11-18 Chris Johns <chrisj@rtems.org>
* libmisc/shell/main_getenv.c, libmisc/shell/main_setenv.c,
        libmisc/shell/main_unsetenv.c: New. The shell can now play with
        environment variables.
        * libmisc/Makefile.am, libmisc/shell/shellconfig.h: Add setenv,
        getenv, and unsetenv to the shell.
2009-11-18 00:09:21 +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
Joel Sherrill
cb09a5da6a 2009-08-21 Roxana Leontie <roxana.leontie@gmail.com>
* Makefile.am, preinstall.am, libmisc/Makefile.am: Changed the name of
	mw-fb directory into fb.  Relocated files.
	* libmisc/fb/fb.h, libmisc/fb/mw_uid.c, libmisc/fb/mw_uid.h: New files.
	* libmisc/mw-fb/fb.h, libmisc/mw-fb/mw_uid.c, libmisc/mw-fb/mw_uid.h:
	Removed.
2009-08-21 18:39:59 +00:00
Joel Sherrill
e152ecb7ec 2009-08-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, preinstall.am, libmisc/Makefile.am, wrapup/Makefile.am:
	Add new BSP Boot Command Line helper routines. Recently boot_card()
	has grown the ability to have a command line string pointer. These
	routines provide an interface to that string.
2009-08-05 19:37:55 +00:00
Chris Johns
0d15414ed6 009-08-05 Chris Johns <chrisj@rtems.org>
* libmisc/dummy/dummy-networking.c: New.
        * libmisc/dummy/dummy.c, libmisc/Makefile.am: Move
        trhe networking configuration into a separate file so
        configuration varations do not cause conflicts.
        * score/inline/rtems/score/object.inl,
        score/include/rtems/score/object.h: Remove warnings.
        * score/inline/rtems/score/object.inl: Add _Chain_First,
        _Chain_Last, _Chain_Mext, and _Chain_Previous.
        * sapi/inline/rtems/chain.inl: Add rtems_chain_first,
        rtems_chain_last, rtems_chain_mext, and rtems_chain_previous.
        * libblock/include/rtems/diskdevs.h: Remove the bdbuf pool id and
        block_size_log2. Add media_block_size.
        * libblock/src/diskdevs.c: Remove size restrictions on block
        size. Add media block size initialisation. Remove comment to clean
        up the bdbuf cache.
        * libblock/src/blkdev.c: Remove references to
        block_size_log2. Allow any block size.
        * libblock/include/rtems/bdbuf.h, libblock/src/bdbuf.c: Remove all
        references to pools and make the cache handle demand driver
        variable buffer size allocation. Added worker threads support the
        swapout task.
        * sapi/include/confdefs.h: Updated the bdbuf configutation.
2009-08-05 00:00:54 +00:00
Joel Sherrill
a20baf9b9f 2009-08-03 Roxana Leontie <roxana.leontie@gmail.com>
* Makefile.am, preinstall.am, libmisc/Makefile.am: changed the
	references to mw_fb.h into fb.h
	* libmisc/mw-fb/mw_fb.h: renamed fb.h
2009-08-03 15:10:10 +00:00
Joel Sherrill
48751ab095 2009-07-23 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/Makefile.am, libmisc/shell/main_chmod.c,
	libmisc/shell/main_mdump.c, libmisc/shell/main_medit.c,
	libmisc/shell/main_mfill.c, libmisc/shell/main_mmove.c,
	libmisc/shell/main_msdosfmt.c, libmisc/shell/main_mwdump.c,
	libmisc/shell/main_sleep.c, libmisc/shell/main_umask.c,
	libmisc/shell/shell_script.c, libmisc/stringto/stringto.h,
	libmisc/stringto/stringto_template.h: Convert return type from bool
	to rtems_status_code and add rtems_string_to_pointer. Perform
	associated clean up and changes for return type change.
	* libmisc/stringto/stringtopointer.c: New file.
2009-07-23 14:32:34 +00:00
Joel Sherrill
35d09baa84 2009-07-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/Makefile.am, libmisc/shell/main_chmod.c,
	libmisc/shell/main_mdump.c, libmisc/shell/main_medit.c,
	libmisc/shell/main_mfill.c, libmisc/shell/main_mmove.c,
	libmisc/shell/main_msdosfmt.c, libmisc/shell/main_mwdump.c,
	libmisc/shell/main_sleep.c, libmisc/shell/main_umask.c,
	libmisc/shell/shell.h, libmisc/shell/shell_script.c,
	libmisc/stringto/stringto_template.h: Convert all shell code to use
	stringto.h mehods with better error checking.
	* libmisc/shell/str2int.c: Removed.
2009-07-22 15:17:37 +00:00
Joel Sherrill
e8d59ca6af 2009-07-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, preinstall.am, libmisc/Makefile.am, wrapup/Makefile.am:
	Add the stringto family of string to number converters. These are
	error checking wrappers for the strtoXXX methods and do their best to
	return false if the conversion failed. The error checking required
	for this is tedious and error prone. Hence better to have in a family
	of helper routines.
	* libmisc/stringto/stringto.h, libmisc/stringto/stringto_template.h,
	libmisc/stringto/stringtodouble.c, libmisc/stringto/stringtofloat.c,
	libmisc/stringto/stringtoint.c, libmisc/stringto/stringtolong.c,
	libmisc/stringto/stringtolonglong.c,
	libmisc/stringto/stringtounsignedchar.c,
	libmisc/stringto/stringtounsignedint.c,
	libmisc/stringto/stringtounsignedlong.c,
	libmisc/stringto/stringtounsignedlonglong.c: New files.
2009-07-22 14:26:25 +00:00
Joel Sherrill
db862461cb 2009-07-21 Roxana Leontie <roxana.leontie@gmail.com>
* libmisc/Makefile.am, libmisc/mw-fb/mw_fb.h: mw_fb.h eliminated the
	ufb_* calls and replaced some of the ioctl structures and numbers
	with the linux framebuffer equivalents
	* libmisc/mw-fb/mw_fb.c: Removed.
2009-07-21 15:47:28 +00:00
Chris Johns
b311cbc957 2009-06-17 Chris Johns <chrisj@rtems.org>
* libmisc/shell/extern-dd.h: Delcare the conv arrays extern to
        stop PPC link errors.
        * libmisc/shell/main_time.c, libmisc/Makefile.am,
        libmisc/shell/shellconfig.h: Add a time command.
2009-06-17 05:34:33 +00:00
Chris Johns
e4a3d93ab1 2009-06-12 Chris Johns <chrisj@rtems.org>
* libmisc/shell/dd-args.c, libmisc/shell/dd-conv.c,
        libmisc/shell/dd-conv_tab.c, libmisc/shell/dd-misc.c,
        libmisc/shell/dd-position.c, libmisc/shell/dd.h,
        libmisc/shell/extern-dd.h, libmisc/shell/hexdump-conv.c,
        libmisc/shell/hexdump-display.c, libmisc/shell/hexdump-odsyntax.c,
        libmisc/shell/hexdump-parse.c, libmisc/shell/hexdump.h,
        libmisc/shell/hexsyntax.c, libmisc/shell/main_dd.c,
        libmisc/shell/main_hexdump.c: New.
        * libmisc/Makefile.am, libmisc/shell/shellconfig.h: Add dd and
        hexdump commands.
2009-06-12 05:51:43 +00:00
Joel Sherrill
22ed4172f7 2009-05-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libcsupport/include/rtc.h: New RTC driver interface.
	* libmisc/Makefile.am, libmisc/shell/shellconfig.h: Added RTC command.
	* libmisc/shell/main_rtc.c: New file.
2009-05-27 14:23:23 +00:00
Thomas Doerfler
870d0a22ff Update 2009-05-05 12:52:29 +00:00
Joel Sherrill
8a775c27fc 2009-03-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
* Makefile.am, preinstall.am, libmisc/Makefile.am,
	libmisc/shell/shell.c, libmisc/shell/shell.h, telnetd/check_passwd.c,
	telnetd/telnetd.c, telnetd/telnetd.h:
	Generalized login check.
	* libmisc/shell/login.h, libmisc/shell/login_check.c,
	libmisc/shell/login_prompt.c: New files.
	* libmisc/stackchk/check.c: Changed format for blown stack message.
	* libcsupport/src/libio_sockets.c: Removed superfluous cast.
	* libnetworking/rtems/ftpfs.h: Documentation.
2009-03-27 13:45:31 +00:00
Joel Sherrill
4e54befe7b 2009-02-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/Makefile.am, libmisc/shell/shellconfig.h: Add halt command to
	shell which results in the shutting RTEMS down.
	* libmisc/shell/main_halt.c: New file.
2009-02-19 18:54:00 +00:00
Joel Sherrill
e41eaa881a 2008-12-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libmisc/serdbg/termios_printk.c, libmisc/serdbg/termios_printk.h:
	Fixed incompatible return value.

	* libmisc/cpuuse/cpuusagereport.c: Changed output format.

	* libmisc/Makefile.am, libmisc/monitor/mon-editor.c: New file.

	* libmisc/capture/capture-cli.c, libmisc/monitor/mon-command.c,
	libmisc/monitor/mon-monitor.c, libmisc/monitor/mon-object.c,
	libmisc/monitor/mon-prmisc.c, libmisc/monitor/mon-symbols.c,
	libmisc/monitor/monitor.h, libmisc/shell/cat_file.c,
	libmisc/shell/cmds.c, libmisc/shell/internal.h,
	libmisc/shell/main_help.c, libmisc/shell/shell.c,
	libmisc/shell/shell.h, libmisc/shell/shell_cmdset.c,
	libmisc/shell/shell_getchar.c, libmisc/shell/str2int.c: Various global
	data is now read only.  Added 'const' qualifier to many pointer
	parameters.  It is no longer possible to remove monitor commands.
	Moved monitor line editor into a separate file to avoid unnecessary
	dependencies.
2008-12-18 15:25:27 +00:00
Ralf Corsepius
6706278315 Remove stray "\". 2008-12-10 23:01:51 +00:00
Joel Sherrill
f3db4ac83a 2008-08-27 Joel Sherrill <joel.sherrill@OARcorp.com>
* libmisc/Makefile.am, libmisc/shell/shell.c, libmisc/shell/shell.h:
	Split out rtems_shell_get_prompt() so it can be overridden by the
	user.
	* libmisc/shell/shell_getprompt.c: New file.
2008-08-27 12:48:41 +00:00
Chris Johns
8192e4ff61 2008-08-07 Chris Johns <chrisj@rtems.org>
* libcsupport/src/_rename_r.c: Fixed return code bug. Add a check
	to see if the 'to' path was a directory and removed the directory.

	* libmisc/Makefile.am, libmisc/shell/shellconfig.h: Added the mv command.

	* libmisc/shell/main_mv.c, libmisc/shell/pathnames-mv.h: New.
2008-08-07 02:23:11 +00:00
Chris Johns
3899a5379f 2008-07-29 Chris Johns <chrisj@rtems.org>
* libblock/Makefile.am: Removed src/show_bdbuf.c.

	* libblock/src/show_bdbuf.c: Removed.

	* libblock/include/rtems/bdbuf.h, cpukit/libblock/src/bdbuf.c:
	Rewritten the bdbuf code. Remove pre-emption disable, score
	access, fixed many bugs and increased performance.

	* libblock/include/rtems/blkdev.h: Added
	RTEMS_BLKDEV_CAPABILITIES block device request. Cleaned up
	comments. Added block and user fields to the sg buffer
	request. Move to rtems_* namespace.

	* libblock/include/rtems/diskdevs.h,
	cpukit/libblock/src/diskdevs.c: Move to rtems_* namespace. Add a
	capabilities field for drivers. Change rtems_disk_lookup to
	rtems_disk_obtain to match the release call. You do not lookup and
	release a disk, you obtain and release a disk.

	* libblock/include/rtems/ide_part_table.h,
	libblock/include/rtems/ramdisk.h, libblock/src/ide_part_table.c:
	Move to rtems_* namespace.

	* libblock/include/rtems/nvdisk.h: Formatting change.

	* libblock/src/blkdev.c: Move to rtems_* namespace. Change
	rtems_disk_lookup to rtems_disk_obtain

	* libblock/src/flashdisk.c: Move to rtems_* namespace. Use the new
	support for the block number in the scatter/grather request
	struct. This allows non-continuous buffer requests for those
	drivers that can support increasing performance.

	* libblock/src/nvdisk.c: Move to rtems_* namespace. Removed
	warnings. Added better error checking. Fixed some comments.

	* libblock/src/ramdisk.c: Move to rtems_* namespace. Added some
	trace functions to help debugging upper layers. Use the new
	support for the block number in the scatter/grather request
	struct. This allows non-continuous buffer requests for those
	drivers that can support increasing performance.

	* libfs/src/dosfs/fat.c, libfs/src/dosfs/fat.h: Use new chains
	API. Removed temporary hack and changed
	set_errno_and_return_minus_one to
	rtems_set_errno_and_return_minus_one. Move fat_buf_access from
	header and stopped it being inlined. Updated to libblock changes.

	* libfs/src/dosfs/fat_fat_operations.c,
	libfs/src/dosfs/fat_file.c, libfs/src/dosfs/msdos_create.c,
	libfs/src/dosfs/msdos_dir.c, libfs/src/dosfs/msdos_eval.c,
	libfs/src/dosfs/msdos_file.c, libfs/src/dosfs/msdos_format.c,
	libfs/src/dosfs/msdos_free.c, libfs/src/dosfs/msdos_initsupp.c,
	libfs/src/dosfs/msdos_misc.c, libfs/src/dosfs/msdos_mknod.c: Use
	new chains API. Removed temporary hack and changed
	set_errno_and_return_minus_one to
	rtems_set_errno_and_return_minus_one. Updated to libblock changes.

	* libmisc/Makefile.am: Add new ls and rm command files.

	* libmisc/shell/cmp-ls.c, libmisc/shell/extern-ls.h,
	libmisc/shell/filemode.c, libmisc/shell/print-ls.c,
	libmisc/shell/pwcache.c, libmisc/shell/utils-ls.c,
	libmisc/shell/vis.c, shell/vis.h: New.

	* libmisc/shell/extern-cp.h, libmisc/shell/main_cp.c,
	libmisc/shell/utils-cp.c: Fixed the usage call bug.

	* libmisc/shell/main_blksync.c: Updated to the new block IO ioctl
	command.

	* libmisc/shell/main_ls.c, libmisc/shell/main_rm.c: Updated to BSD
	commands with more features.

	* score/src/coremutex.c: Fix the strick order mutex code.

	* libmisc/shell/shell.c: Change shell tasks mode to be timeslice
	and no ASR.

	* sapi/include/confdefs.h: Change ata_driver_task_priority to
	rtems_ata_driver_task_priority. Add the new BD buf cache
	parameters with defaults.

	* score/src/interr.c: Do not return if the CPU halt call returns.
2008-07-29 02:21:15 +00:00
Chris Johns
ea90df234a 2008-04-03 Chris Johns <chrisj@rtems.org>
* libfs/src/nfsclient/src/librtemsNfs.h,
	libfs/src/nfsclient/src/nfs.c: Remove CEXP references. CEXP is
	external to RTEMS and even if in the cpukit it should not cross
	reference in this way.
	* libmisc/shell/shell_getchar.c: New. Taken from the monitor.
	* libmisc/Makefile.am: Add shell_getchar.c and clean up a little
	in the shell area.
	* libmisc/shell/shell.c, libmisc/shell/shell.h: Add line editting
	support.
2008-04-03 03:13:24 +00:00
Joel Sherrill
a3ddb08bec 2008-03-04 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/Makefile.am, libmisc/shell/main_cp.c,
	libmisc/shell/main_cpuuse.c, libmisc/shell/main_date.c,
	libmisc/shell/main_mallocinfo.c, libmisc/shell/main_netstats.c,
	libmisc/shell/main_perioduse.c, libmisc/shell/main_stackuse.c,
	libmisc/shell/main_wkspaceinfo.c, libmisc/shell/print_heapinfo.c,
	libmisc/shell/shell.c, libmisc/shell/shell.h,
	libmisc/shell/shell_makeargs.c, libmisc/shell/shellconfig.c,
	libmisc/shell/shellconfig.h, libmisc/shell/write_file.c: Add initial
	capability to automatically execute a script from the filesystem. Add
	echo command from NetBSD and sleep command.
	* libmisc/shell/main_echo.c, libmisc/shell/main_sleep.c,
	libmisc/shell/shell_script.c: New files.
2008-03-05 02:49:35 +00:00
Joel Sherrill
45443d125c 2008-02-28 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/Makefile.am: Turn on NFS mount support when networking is
	enabled.
2008-02-28 16:10:29 +00:00
Joel Sherrill
6cf00455c4 2008-02-20 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/Makefile.am, libmisc/shell/shellconfig.h: Add netstats
	command to access statistics reporting functions in TCP/IP stack.
	* libmisc/shell/main_netstats.c: New file.
2008-02-20 22:51:14 +00:00
Joel Sherrill
54b2e4b926 2008-02-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/Makefile.am, libmisc/shell/main_wkspaceinfo.c,
	libmisc/shell/shell.c, libmisc/shell/shellconfig.h: Add route and
	ifconfig commands. The code for these was previously in the
	networking guide. Disable NFS filesystem mount until that code is in
	cpukit.
	* libmisc/shell/main_ifconfig.c, libmisc/shell/main_route.c: New files.
2008-02-19 19:44:21 +00:00
Ralf Corsepius
e30a00f40c 2008-01-16 Ralf Corsépius <ralf.corsepius@rtems.org>
* libmisc/shell/Makefile.am: Don't use make variables.
2008-01-16 04:33:25 +00:00
Joel Sherrill
694bd9f68e 2008-01-07 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/Makefile.am: Add new files.
	* libmisc/shell/internal.h: Prototype for rtems_shell_print_heap_info()
	* libmisc/shell/main_mallocinfo.c: Use rtems_shell_print_heap_info().
	* libmisc/shell/shellconfig.h: Add wkspace command.
	* libmisc/shell/main_wkspaceinfo.c,
	libmisc/shell/print_heapinfo.c: New files.
2008-01-07 17:46:25 +00:00
Chris Johns
1ff9922df0 2007-12-22 Chris Johns <chrisj@rtems.org>
* configure.ac: fixed bug that always enabled strict order
	mutexes.
	* score/inline/rtems/score/coremutex.inl: Fixed coding standard.
	* score/src/coremutex.c: Add the holder's thread to the lock_mutex
	list if the mutex is initialised locked.
	* libnetworking/rtems/rtems_glue.c: Changed semaphore error
	message to show the error is an rtems-net error.
	* libmisc/monitor/mon-network.c: Removed warnings.
	* telnetd/icmds.c: Changed shell_* to rtems_shell_*.
	* score/Makefile.am: Fixed typo that stopped 'make tags' working.
	* libmisc/shell/err.c, libmisc/shell/err.h, libmisc/shell/errx.c,
	libmisc/shell/extern-cp.h, libmisc/shell/fts.c,
	libmisc/shell/fts.h, libmisc/shell/main_cp.c,
	libmisc/shell/utils-cp.c, libmisc/shell/verr.c,
	libmisc/shell/verrx.c, libmisc/shell/vwarn.c,
	libmisc/shell/vwarnx.c, libmisc/shell/warn.c,
	libmisc/shell/warnx.c: New. Ported from BSD.
	* libmisc/shell/shellconfig.h: Add the cp command.
	* libmisc/Makefile.am: Add the new files to the shell.
	* libmisc/shell/shell.c, libmisc/shell/shell.h: Add scripting
	support.
	* libblock/src/flashdisk.c: Fixed disk drive count size setting
	bug.
2007-12-22 08:27:18 +00:00
Joel Sherrill
543fe82061 2007-12-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/Makefile.am, libcsupport/preinstall.am,
	libcsupport/src/malloc.c, libcsupport/src/mallocinfo.c,
	libmisc/Makefile.am, libmisc/shell/main_mallocinfo.c,
	libmisc/shell/shellconfig.h: Split malloc.c into multiple files with
	one function per file. Also split out statistics into a separate file
	which can be plugged in dynamically. Right now, it is always in. I
	suspect that splitting the file removed more code than leaving
	statistics in. I tinkered with malloc information command in the
	shell. I resurrected the malloc arena code as malloc boundary. This
	code is now compiled all the time even though it does not appear to
	work.
	* libcsupport/include/rtems/malloc.h, libcsupport/src/_calloc_r.c,
	libcsupport/src/_free_r.c, libcsupport/src/_malloc_r.c,
	libcsupport/src/_realloc_r.c, libcsupport/src/calloc.c,
	libcsupport/src/free.c, libcsupport/src/malloc_boundary.c,
	libcsupport/src/malloc_get_statistics.c,
	libcsupport/src/malloc_initialize.c, libcsupport/src/malloc_p.h,
	libcsupport/src/malloc_report_statistics.c,
	libcsupport/src/malloc_report_statistics_plugin.c,
	libcsupport/src/malloc_statistics_helpers.c,
	libcsupport/src/malloc_walk.c, libcsupport/src/realloc.c,
	libmisc/shell/main_perioduse.c: New files.
2007-12-18 20:36:40 +00:00
Joel Sherrill
e586588471 2007-12-17 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/Makefile.am, libmisc/shell/shellconfig.h: Add malloc command
	with info and dump as replacement for older command. Fix what looked
	like a typo for mount sub-commands.
	* libmisc/shell/main_mallocinfo.c: New file.
	* libmisc/shell/main_mallocdump.c: Removed.
2007-12-17 22:37:29 +00:00
Chris Johns
4657943527 2007-12-17 Chris Johns <chrisj@rtems.org>
* libmisc/shell/main_blksync.c, libmisc/shell/main_msdosfmt.c,
	libmisc/shell/main_unmount.c: New.
	* libmisc/Makefile.am, libmisc/shell/shellconfig.h: Add the
	blksync, msdosfmt, and unmount commands.
2007-12-17 07:20:04 +00:00
Chris Johns
2eeb648c35 2007-12-17 Chris Johns <chrisj@rtems.org>
* libnetworking/rtems/tftp.h: Provide a decl to the TFTP file
	system opts table.
	* libnetworking/rtems/ftpfs.h: Provide a decl to the FTP file
	system opts table.
	* libmisc/Makefile.am: Add the mount command and supporting files.
	* libmisc/preinstall.am: Rebuilt.
	* libmisc/shell/cat_file.c, libmisc/shell/cmds.c,
	libmisc/shell/main_alias.c, libmisc/shell/main_cat.c,
	libmisc/shell/main_cd.c, libmisc/shell/main_chdir.c,
	libmisc/shell/main_chmod.c, libmisc/shell/main_chroot.c,
	libmisc/shell/main_cpuuse.c, libmisc/shell/main_date.c,
	libmisc/shell/main_dir.c, libmisc/shell/main_exit.c,
	libmisc/shell/main_help.c, libmisc/shell/main_id.c,
	libmisc/shell/main_logoff.c, libmisc/shell/main_ls.c,
	libmisc/shell/main_mallocdump.c, libmisc/shell/main_mdump.c,
	libmisc/shell/main_medit.c, libmisc/shell/main_mfill.c,
	libmisc/shell/main_mkdir.c, libmisc/shell/main_mmove.c,
	libmisc/shell/main_mwdump.c, libmisc/shell/main_pwd.c,
	libmisc/shell/main_rm.c, libmisc/shell/main_rmdir.c,
	libmisc/shell/main_stackuse.c, libmisc/shell/main_tty.c,
	libmisc/shell/main_umask.c, libmisc/shell/main_whoami.c,
	libmisc/shell/shell.c, libmisc/shell/shell_cmdset.c,
	libmisc/shell/shell_makeargs.c, libmisc/shell/str2int.c,
	libmisc/shell/write_file.c: Move all shell_* types, variables and
	functions to rtems_shell_* to avoid namespace clashes with
	applications. The is an RTEMS shell after all.
	* libmisc/shell/shell.h, libmisc/shell/internal.h,
	libmisc/shell/shellconfig.h: Move all shell_* types, variables and
	functions to rtems_shell_* to avoid namespace clashes with
	applications. Add the mount command supporting types.
	* libmisc/shell/main_mount.c, libmisc/shell/main_mount_ftp.c,
	libmisc/shell/main_mount_msdos.c, libmisc/shell/main_mount_nfs.c,
	libmisc/shell/main_mount_tftp.c: New.
2007-12-17 00:12:01 +00:00
Joel Sherrill
8fdadc839b 2007-12-14 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/Makefile.am, libmisc/shell/cat_file.c,
	libmisc/shell/shell_makeargs.c, libmisc/shell/shellconfig.h: Rename
	cmd_XXX.c to main_XXX.c. Add cpuuse and stackuse commands.
	* libmisc/shell/main_alias.c, libmisc/shell/main_cat.c,
	libmisc/shell/main_cd.c, libmisc/shell/main_chdir.c,
	libmisc/shell/main_chmod.c, libmisc/shell/main_chroot.c,
	libmisc/shell/main_cpuuse.c, libmisc/shell/main_date.c,
	libmisc/shell/main_dir.c, libmisc/shell/main_exit.c,
	libmisc/shell/main_help.c, libmisc/shell/main_id.c,
	libmisc/shell/main_logoff.c, libmisc/shell/main_ls.c,
	libmisc/shell/main_mallocdump.c, libmisc/shell/main_mdump.c,
	libmisc/shell/main_medit.c, libmisc/shell/main_mfill.c,
	libmisc/shell/main_mkdir.c, libmisc/shell/main_mmove.c,
	libmisc/shell/main_mwdump.c, libmisc/shell/main_pwd.c,
	libmisc/shell/main_rm.c, libmisc/shell/main_rmdir.c,
	libmisc/shell/main_stackuse.c, libmisc/shell/main_tty.c,
	libmisc/shell/main_umask.c, libmisc/shell/main_whoami.c: New files.
	* libmisc/shell/cmd_alias.c, libmisc/shell/cmd_cat.c,
	libmisc/shell/cmd_cd.c, libmisc/shell/cmd_chdir.c,
	libmisc/shell/cmd_chmod.c, libmisc/shell/cmd_chroot.c,
	libmisc/shell/cmd_date.c, libmisc/shell/cmd_dir.c,
	libmisc/shell/cmd_exit.c, libmisc/shell/cmd_help.c,
	libmisc/shell/cmd_id.c, libmisc/shell/cmd_logoff.c,
	libmisc/shell/cmd_ls.c, libmisc/shell/cmd_mallocdump.c,
	libmisc/shell/cmd_mdump.c, libmisc/shell/cmd_medit.c,
	libmisc/shell/cmd_mfill.c, libmisc/shell/cmd_mkdir.c,
	libmisc/shell/cmd_mmove.c, libmisc/shell/cmd_mwdump.c,
	libmisc/shell/cmd_pwd.c, libmisc/shell/cmd_rm.c,
	libmisc/shell/cmd_rmdir.c, libmisc/shell/cmd_tty.c,
	libmisc/shell/cmd_umask.c, libmisc/shell/cmd_whoami.c: Removed.
2007-12-14 21:50:01 +00:00
Joel Sherrill
814d95887d 2007-12-11 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/Makefile.am, libmisc/shell/cmd_help.c, libmisc/shell/cmds.c,
	libmisc/shell/internal.h, libmisc/shell/shell.c,
	libmisc/shell/shell.h, libmisc/shell/shellconfig.h: Command set
	processing now separated from main command loop. Addition of user
	commands and aliases tested. Monitor registration now explicit.
	* libmisc/shell/shell_cmdset.c, libmisc/shell/shell_makeargs.c,
	libmisc/shell/write_file.c: New files.
2007-12-11 19:20:16 +00:00
Joel Sherrill
c62cad974c 2007-12-11 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/Makefile.am: Fix typo.
2007-12-11 15:06:40 +00:00
Joel Sherrill
4e5299ffc4 2007-12-10 Joel Sherrill <joel.sherrill@oarcorp.com>
* ChangeLog, preinstall.am, libmisc/Makefile.am, libmisc/shell/cmds.c,
	libmisc/shell/shell.c, libmisc/shell/shell.h: Split shell commands
	into multiple files and add initial stages of command configuration.
	This seems to work but the monitor commands need to be integrated
	this way and the ability to configure user commands needs to be
	tested.
	* libmisc/shell/cat_file.c, libmisc/shell/cmd_alias.c,
	libmisc/shell/cmd_cat.c, libmisc/shell/cmd_cd.c,
	libmisc/shell/cmd_chdir.c, libmisc/shell/cmd_chmod.c,
	libmisc/shell/cmd_chroot.c, libmisc/shell/cmd_date.c,
	libmisc/shell/cmd_dir.c, libmisc/shell/cmd_exit.c,
	libmisc/shell/cmd_help.c, libmisc/shell/cmd_id.c,
	libmisc/shell/cmd_logoff.c, libmisc/shell/cmd_ls.c,
	libmisc/shell/cmd_mallocdump.c, libmisc/shell/cmd_mdump.c,
	libmisc/shell/cmd_medit.c, libmisc/shell/cmd_mfill.c,
	libmisc/shell/cmd_mkdir.c, libmisc/shell/cmd_mmove.c,
	libmisc/shell/cmd_mwdump.c, libmisc/shell/cmd_pwd.c,
	libmisc/shell/cmd_rm.c, libmisc/shell/cmd_rmdir.c,
	libmisc/shell/cmd_tty.c, libmisc/shell/cmd_umask.c,
	libmisc/shell/cmd_whoami.c, libmisc/shell/internal.h,
	libmisc/shell/shellconfig.c, libmisc/shell/shellconfig.h,
	libmisc/shell/str2int.c: New files.
2007-12-10 23:14:35 +00:00