]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - avr/command_tbl.c
New command(s): attach (and detach) - not fully working.
[z180-stamp.git] / avr / command_tbl.c
index 5dcbf1f1649dbfc72be643b512e62053349df3a1..944c1c4b0dcbbf5e5286168ed4ce645d91372471 100644 (file)
@@ -37,6 +37,7 @@ extern command_ret_t do_fat_ls(cmd_tbl_t *, int, int, char * const []);
 extern command_ret_t do_fat_rw(cmd_tbl_t *, int, int, char * const []);
 extern command_ret_t do_run(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
 extern command_ret_t do_source(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+extern command_ret_t do_attach(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
 
 #ifdef CONFIG_SYS_LONGHELP
 const FLASH char sd_help_text[] =
@@ -349,6 +350,22 @@ CMD_TBL_ITEM(
        "    - Write file to 'path/filename' on logical drive 'd' from RAM\n"
        "      starting at address 'addr'.\n"
 ),
+CMD_TBL_ITEM(
+       attach, CONFIG_SYS_MAXARGS,     1,      do_attach,
+       "attach filesystem image file to CP/M drive",
+       "[options] [dsk<n> <d:/path/filename>]\n"
+       "    - attach drive number <n> to diskfile <d:/path/filename>\n"
+       "attach -d dsk<n>\n"
+       "    - detach drive\n"
+       "attach\n"
+       "    - without arguments, list current assignments"
+),
+CMD_TBL_ITEM(
+       detach, 2,      1,      do_attach,
+       "detach file from CP/M drive",
+       "dsk<n>]\n"
+       "    - same as attach -d dsk<n>"
+),
 
 CMD_TBL_ITEM(
        help,   CONFIG_SYS_MAXARGS,     1,      do_help,