1. 19 2月, 2014 4 次提交
    • S
      fs: don't pass NULL dev_desc to most filesystems · 377202b5
      Stephen Warren 提交于
      FAT and ext4 expect that the passed in block device descriptor not be
      NULL. This causes problems on sandbox, where get_device_and_partition()
      succeeds for the "host" device, yet passes back a NULL device descriptor.
      Add special handling for this situation, so that the generic filesystem
      commands operate as expected on sandbox.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      377202b5
    • S
      fs: implement infrastructure for an 'exists' function · 6152916a
      Stephen Warren 提交于
      This could be used in scripts such as:
      
      if test -e mmc 0:1 /boot/boot.scr; then
          load mmc 0:1 ${scriptaddr} /boot/boot.scr
          source ${scriptaddr}
      fi
      
      rather than:
      
      if load mmc 0:1 ${scriptaddr} /boot/boot.scr; then
          source ${scriptaddr}
      fi
      
      This prevents errors being printed by attempts to load non-existent
      files, which can be important when checking for a large set of files,
      such as /boot/boot.scr.uimg, /boot/boot.scr, /boot/extlinux.conf,
      /boot.scr.uimg, /boot.scr, /extlinux.conf.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: NSimon Glass <sjg@chromium.org>
      6152916a
    • S
      fs: fix generic save command implementation · bd6fb31f
      Stephen Warren 提交于
      Fix a few issues with the generic "save" shell command, and fs_write()
      function.
      
      1) fstypes[].write wasn't filled in for some file-systems, and isn't
         checked when used, which could cause crashes/... if executing save
         on e.g. fat/ext filesystems.
      
      2) fs_write() requires the length argument to be non-zero, since it needs
         to know exactly how many bytes to write. Adjust the comments and code
         according to this.
      
      3) fs_write() wasn't prototyped in <fs.h> like other generic functions;
         other code should be able to call this directly rather than invoking
         the "save" shell command.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: NSimon Glass <sjg@chromium.org>
      bd6fb31f
    • S
      README: document CONFIG_CMD_FS_GENERIC · 16f4d933
      Stephen Warren 提交于
      This enables generic filesystem commands such as load and ls, which
      automatically work with multiple filesystem types, without having to
      be told which is present, unlike e.g. ext2load, fatls.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      16f4d933
  2. 18 2月, 2014 3 次提交
  3. 14 2月, 2014 2 次提交
  4. 13 2月, 2014 13 次提交
  5. 11 2月, 2014 2 次提交
  6. 10 2月, 2014 2 次提交
  7. 08 2月, 2014 9 次提交
  8. 07 2月, 2014 5 次提交