RTEMS Logo

RTEMS 4.9.1 On-Line Library


General Commands tty - show ttyname

PREV UP NEXT Bookshelf RTEMS Shell User's Guide

2.2.6: tty - show ttyname

SYNOPSYS:

tty

DESCRIPTION:

This command prints the file name of the device connected to standard input.

EXIT STATUS:

This command returns 0 on success and non-zero if an error is encountered.

NOTES:

NONE

EXAMPLES:

The following is an example of how to use tty:

SHLL [/] $ tty
/dev/console

CONFIGURATION:

This command is included in the default shell command set. When building a custom command set, define CONFIGURE_SHELL_COMMAND_TTY to have this command included.

This command can be excluded from the shell command set by defining CONFIGURE_SHELL_NO_COMMAND_TTY when all shell commands have been configured.

PROGRAMMING INFORMATION:

The tty is implemented by a C language function which has the following prototype:

int rtems_shell_rtems_main_tty(
  int    argc,
  char **argv
);

The configuration structure for the tty has the following prototype:

extern rtems_shell_cmd_t rtems_shell_TTY_Command;


PREV UP NEXT Bookshelf RTEMS Shell User's Guide

Copyright © 1988-2008 OAR Corporation