2 * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
4 * Inspired by cmd_ext_common.c, cmd_fat.c.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 static int do_size_wrapper(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
25 return do_size(cmdtp, flag, argc, argv, FS_TYPE_ANY);
29 size, 4, 0, do_size_wrapper,
30 "determine a file's size",
31 "<interface> <dev[:part]> <filename>\n"
32 " - Find file 'filename' from 'dev' on 'interface'\n"
33 " and determine its size."
36 static int do_load_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
39 return do_load(cmdtp, flag, argc, argv, FS_TYPE_ANY);
43 load, 7, 0, do_load_wrapper,
44 "load binary file from a filesystem",
45 "<interface> [<dev[:part]> [<addr> [<filename> [bytes [pos]]]]]\n"
46 " - Load binary file 'filename' from partition 'part' on device\n"
47 " type 'interface' instance 'dev' to address 'addr' in memory.\n"
48 " 'bytes' gives the size to load in bytes.\n"
49 " If 'bytes' is 0 or omitted, the file is read until the end.\n"
50 " 'pos' gives the file byte position to start reading from.\n"
51 " If 'pos' is 0 or omitted, the file is read from the start."
54 static int do_ls_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
57 return do_ls(cmdtp, flag, argc, argv, FS_TYPE_ANY);
61 ls, 4, 1, do_ls_wrapper,
62 "list files in a directory (default /)",
63 "<interface> [<dev[:part]> [directory]]\n"
64 " - List files in directory 'directory' of partition 'part' on\n"
65 " device type 'interface' instance 'dev'."