int do_yrd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { char *filename = argv[1]; printf ("Reading file %s ", filename); cmd_yaffs_read_file(filename); printf ("done\n"); return(0); }
int do_yrd(int argc,char **argv) { char *filename; if (argc != 2) { printk("Bad arguments: yrd file_name\n"); return -1; } filename = argv[1]; printk("Reading file %s\n", filename); return cmd_yaffs_read_file(filename); }