2010-02-24 Chris Johns <chrisj@rtems.org>

* libmisc/shell/main_msdosfmt.c, libmisc/shell/shellconfig.h: Fix
        the alias as I did understand how it worked.

        * libfs/src/dosfs/msdos_format.c: Test for a block device.
This commit is contained in:
Chris Johns
2010-02-24 09:30:40 +00:00
parent 346d8300f3
commit 520705cee8
4 changed files with 20 additions and 2 deletions

View File

@@ -1,3 +1,10 @@
2010-02-24 Chris Johns <chrisj@rtems.org>
* libmisc/shell/main_msdosfmt.c, libmisc/shell/shellconfig.h: Fix
the alias as I did understand how it worked.
* libfs/src/dosfs/msdos_format.c: Test for a block device.
2010-02-23 Chris Johns <chrisj@rtems.org>
* libfs/src/rfs/rtems-rfs-dir.c: Fix printf format warning for a

View File

@@ -910,7 +910,7 @@ int msdos_format
/* rtems feature: no block devices, all are character devices */
if ((ret_val == 0) &&
(!S_ISCHR(stat_buf.st_mode))) {
(!S_ISBLK(stat_buf.st_mode))) {
errno = ENOTTY;
ret_val = -1;
}

View File

@@ -170,6 +170,15 @@ rtems_shell_cmd_t rtems_shell_MSDOSFMT_Command = {
"mkdos " OPTIONS " path # format disk", /* usage */
"files", /* topic */
rtems_shell_main_msdos_format, /* command */
"msdosfmt", /* alias */
NULL, /* alias */
NULL /* next */
};
rtems_shell_cmd_t rtems_shell_MSDOSFMT_Alias = {
"msdosfmt", /* name */
NULL, /* usage */
"files", /* topic */
NULL, /* command */
&rtems_shell_MSDOSFMT_Command, /* alias */
NULL /* next */
};

View File

@@ -52,6 +52,7 @@ extern rtems_shell_cmd_t rtems_shell_CHMOD_Command;
extern rtems_shell_cmd_t rtems_shell_CAT_Command;
extern rtems_shell_cmd_t rtems_shell_MKRFS_Command;
extern rtems_shell_cmd_t rtems_shell_MSDOSFMT_Command;
extern rtems_shell_cmd_t rtems_shell_MSDOSFMT_Alias;
extern rtems_shell_cmd_t rtems_shell_MV_Command;
extern rtems_shell_cmd_t rtems_shell_RM_Command;
extern rtems_shell_cmd_t rtems_shell_LN_Command;
@@ -303,6 +304,7 @@ extern rtems_shell_filesystems_t *rtems_shell_Mount_filesystems[];
!defined(CONFIGURE_SHELL_NO_COMMAND_MSDOSFMT)) || \
defined(CONFIGURE_SHELL_COMMAND_MSDOSFMT)
&rtems_shell_MSDOSFMT_Command,
&rtems_shell_MSDOSFMT_Alias,
#endif
#if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
!defined(CONFIGURE_SHELL_NO_COMMAND_MV)) || \