summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cpukit/ChangeLog7
-rw-r--r--cpukit/libfs/src/dosfs/msdos_format.c2
-rw-r--r--cpukit/libmisc/shell/main_msdosfmt.c11
-rw-r--r--cpukit/libmisc/shell/shellconfig.h2
4 files changed, 20 insertions, 2 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 6c523895e6..0f6cfd5914 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -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
diff --git a/cpukit/libfs/src/dosfs/msdos_format.c b/cpukit/libfs/src/dosfs/msdos_format.c
index e9d7cc2e5c..d424c54aa6 100644
--- a/cpukit/libfs/src/dosfs/msdos_format.c
+++ b/cpukit/libfs/src/dosfs/msdos_format.c
@@ -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;
}
diff --git a/cpukit/libmisc/shell/main_msdosfmt.c b/cpukit/libmisc/shell/main_msdosfmt.c
index fc54966da7..f38a58ee5f 100644
--- a/cpukit/libmisc/shell/main_msdosfmt.c
+++ b/cpukit/libmisc/shell/main_msdosfmt.c
@@ -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 */
};
diff --git a/cpukit/libmisc/shell/shellconfig.h b/cpukit/libmisc/shell/shellconfig.h
index 35b08f934a..65428ea164 100644
--- a/cpukit/libmisc/shell/shellconfig.h
+++ b/cpukit/libmisc/shell/shellconfig.h
@@ -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)) || \