Changeset 7bb71c7 in rtems


Ignore:
Timestamp:
May 16, 2013, 9:24:09 AM (6 years ago)
Author:
Andrei Mozzhuhin <nopscmn@…>
Branches:
4.11, master
Children:
12c99a64
Parents:
56f22600
git-author:
Andrei Mozzhuhin <nopscmn@…> (05/16/13 09:24:09)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/16/13 09:40:42)
Message:

shell: Add df command

Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/Makefile.am

    r56f22600 r7bb71c7  
    103103    shell/main_time.c shell/main_mknod.c \
    104104    shell/main_setenv.c shell/main_getenv.c shell/main_unsetenv.c \
    105     shell/main_mkrfs.c shell/main_debugrfs.c \
     105    shell/main_mkrfs.c shell/main_debugrfs.c shell/main_df.c \
    106106    shell/main_lsof.c \
    107107    shell/main_blkstats.c \
  • cpukit/libmisc/shell/shellconfig.h

    r56f22600 r7bb71c7  
    7171extern rtems_shell_cmd_t rtems_shell_HEXDUMP_Command;
    7272extern rtems_shell_cmd_t rtems_shell_DEBUGRFS_Command;
     73extern rtems_shell_cmd_t rtems_shell_DF_Command;
    7374
    7475extern rtems_shell_cmd_t rtems_shell_RTC_Command;
     
    376377      &rtems_shell_DEBUGRFS_Command,
    377378    #endif
     379    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
     380         !defined(CONFIGURE_SHELL_NO_COMMAND_DF)) || \
     381        defined(CONFIGURE_SHELL_COMMAND_DF)
     382      &rtems_shell_DF_Command,
     383    #endif
    378384
    379385    /*
  • doc/shell/file.t

    r56f22600 r7bb71c7  
    3636@item @code{mkrfs} - format RFS file system
    3737@item @code{cd} - alias for chdir
     38@item @code{df} - display file system disk space usage
    3839
    3940@end itemize
     
    26292630@end example
    26302631
     2632@c
     2633@c
     2634@c
     2635@page
     2636@subsection df - display file system disk space usage
     2637
     2638@pgindex df
     2639
     2640@subheading SYNOPSYS:
     2641
     2642@example
     2643df [-h] [-B block_size]
     2644@end example
     2645
     2646@subheading DESCRIPTION:
     2647
     2648This command print disk space usage for mounted file systems.
     2649
     2650@subheading EXIT STATUS:
     2651
     2652This command returns 0 on success and non-zero if an error is encountered.
     2653
     2654@subheading NOTES:
     2655
     2656NONE
     2657
     2658@subheading EXAMPLES:
     2659
     2660The following is an example of how to use @code{df}:
     2661
     2662@example
     2663SHLL [/] $ df -B 4K
     2664Filesystem     4K-blocks        Used   Available       Use%     Mounted on
     2665/dev/rda               124         1         124         0%   /mnt/ramdisk
     2666SHLL [/] $ df
     2667Filesystem     1K-blocks        Used   Available       Use%     Mounted on
     2668/dev/rda               495         1         494         0%   /mnt/ramdisk
     2669SHLL [/] $ df -h
     2670Filesystem     Size             Used   Available       Use%     Mounted on
     2671/dev/rda              495K        1K        494K         0%   /mnt/ramdisk
     2672@end example
     2673
     2674@subheading CONFIGURATION:
     2675
     2676@findex CONFIGURE_SHELL_NO_COMMAND_DF
     2677@findex CONFIGURE_SHELL_COMMAND_DF
     2678
     2679This command is included in the default shell command set. 
     2680When building a custom command set, define
     2681@code{CONFIGURE_SHELL_COMMAND_DF} to have this
     2682command included.
     2683
     2684This command can be excluded from the shell command set by
     2685defining @code{CONFIGURE_SHELL_NO_COMMAND_DF} when all
     2686shell commands have been configured.
     2687
     2688@subheading PROGRAMMING INFORMATION:
     2689
     2690@findex rtems_shell_rtems_main_df
     2691
     2692The @code{df} is implemented by a C language function
     2693which has the following prototype:
     2694
     2695@example
     2696int rtems_shell_main_df(
     2697  int argc,
     2698  char **argv
     2699);
     2700@end example
     2701
     2702The configuration structure for the @code{df} has the
     2703following prototype:
     2704
     2705@example
     2706extern rtems_shell_cmd_t rtems_shell_DF_Command;
     2707@end example
     2708
Note: See TracChangeset for help on using the changeset viewer.