Blame view

cmd/ext2.c 1.37 KB
83d290c56   Tom Rini   SPDX: Convert all...
1
  // SPDX-License-Identifier: GPL-2.0+
bcd0be5cf   stroese   ext2fs support added
2
  /*
a1596438a   Uma Shankar   ext4fs ls load su...
3
4
5
6
   * (C) Copyright 2011 - 2012 Samsung Electronics
   * EXT4 filesystem implementation in Uboot by
   * Uma Shankar <uma.shankar@samsung.com>
   * Manjunatha C Achar <a.manjunatha@samsung.com>
bcd0be5cf   stroese   ext2fs support added
7
8
9
10
11
12
13
14
15
   * (C) Copyright 2004
   * esd gmbh <www.esd-electronics.com>
   * Reinhard Arlt <reinhard.arlt@esd-electronics.com>
   *
   * made from cmd_reiserfs by
   *
   * (C) Copyright 2003 - 2004
   * Sysgo Real-Time Solutions, AG <www.elinos.com>
   * Pavel Bartusek <pba@sysgo.com>
bcd0be5cf   stroese   ext2fs support added
16
17
18
19
20
   */
  
  /*
   * Ext2fs support
   */
045fa1e11   Stephen Warren   fs: add filesyste...
21
  #include <fs.h>
bcd0be5cf   stroese   ext2fs support added
22

0e350f81e   Jeroen Hofstee   common: commands:...
23
  static int do_ext2ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
bcd0be5cf   stroese   ext2fs support added
24
  {
045fa1e11   Stephen Warren   fs: add filesyste...
25
  	return do_ls(cmdtp, flag, argc, argv, FS_TYPE_EXT);
bcd0be5cf   stroese   ext2fs support added
26
  }
bcd0be5cf   stroese   ext2fs support added
27
28
29
  /******************************************************************************
   * Ext2fs boot command intepreter. Derived from diskboot
   */
0e350f81e   Jeroen Hofstee   common: commands:...
30
  int do_ext2load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
bcd0be5cf   stroese   ext2fs support added
31
  {
b770e88a6   Wolfgang Denk   Fix number base h...
32
  	return do_load(cmdtp, flag, argc, argv, FS_TYPE_EXT);
bcd0be5cf   stroese   ext2fs support added
33
34
35
  }
  
  U_BOOT_CMD(
a1596438a   Uma Shankar   ext4fs ls load su...
36
37
38
39
40
  	ext2ls,	4,	1,	do_ext2ls,
  	"list files in a directory (default /)",
  	"<interface> <dev[:part]> [directory]
  "
  	"    - list files from 'dev' on 'interface' in a 'directory'"
0e350f81e   Jeroen Hofstee   common: commands:...
41
  )
a1596438a   Uma Shankar   ext4fs ls load su...
42
43
  
  U_BOOT_CMD(
bcd0be5cf   stroese   ext2fs support added
44
  	ext2load,	6,	0,	do_ext2load,
2fb2604d5   Peter Tyser   Command usage cle...
45
  	"load binary file from a Ext2 filesystem",
6b367467f   Pavel Machek   Fix help text of ...
46
47
  	"<interface> [<dev[:part]> [addr [filename [bytes [pos]]]]]
  "
bcd0be5cf   stroese   ext2fs support added
48
49
  	"    - load binary file 'filename' from 'dev' on 'interface'
  "
b770e88a6   Wolfgang Denk   Fix number base h...
50
  	"      to address 'addr' from ext2 filesystem."
0e350f81e   Jeroen Hofstee   common: commands:...
51
  )