#include <cmdline_parse_ipaddr.h>
#include <cmdline_parse_num.h>
#include <cmdline_parse_string.h>
+#include <cmdline_parse_file.h>
#include <cmdline_rdline.h>
#include <cmdline.h>
/**********************************************************/
struct cmd_load_result {
- cmdline_fixed_string_t load;
+ cmdline_filename_t load;
cmdline_fixed_string_t file;
};
},
};
-cmdline_parse_token_string_t cmd_load_file =
- TOKEN_STRING_INITIALIZER(struct cmd_load_result, file, NULL);
+cmdline_parse_token_file_t cmd_load_file =
+ TOKEN_FILE_INITIALIZER(struct cmd_load_result, file, 0);
cmdline_parse_inst_t cmd_loadfile = {
.f = cmd_load_parsed, /* function to call */
struct cmd_save_result {
cmdline_fixed_string_t save;
- cmdline_fixed_string_t file;
+ cmdline_filename_t file;
};
static void cmd_save_parsed(void *parsed_result,
},
};
-cmdline_parse_token_string_t cmd_save_file =
- TOKEN_STRING_INITIALIZER(struct cmd_save_result, file, NULL);
+cmdline_parse_token_file_t cmd_save_file =
+ TOKEN_FILE_INITIALIZER(struct cmd_save_result, file,
+ PARSE_FILE_F_CREATE);
cmdline_parse_inst_t cmd_savefile = {
.f = cmd_save_parsed, /* function to call */