24 Feb, 2018

1 commit

  • This patch fixes the below warning by typecasting it properly
    fs/ubifs/ubifs.c: In function 'ubifs_load':
    fs/ubifs/ubifs.c:942:29: warning: cast to pointer from integer
    of different size [-Wint-to-pointer-cast]
    err = ubifs_read(filename, (void *)addr, 0, size, &actread);

    Signed-off-by: Siva Durga Prasad Paladugu
    Signed-off-by: Michal Simek
    Reviewed-by: Heiko Schocher
    (cherry picked from commit 34cc30af27165696a36274394f6ff019ed762ce6)

    Siva Durga Prasad Paladugu
     

13 Feb, 2017

1 commit

  • We repeated partial moves for CONFIG_SYS_NO_FLASH, but this is
    not completed. Finish this work by the tool.

    During this move, let's rename it to CONFIG_MTD_NOR_FLASH.
    Actually, we have more instances of "#ifndef CONFIG_SYS_NO_FLASH"
    than those of "#ifdef CONFIG_SYS_NO_FLASH". Flipping the logic will
    make the code more readable. Besides, negative meaning symbols do
    not fit in obj-$(CONFIG_...) style Makefiles.

    This commit was created as follows:

    [1] Edit "default n" to "default y" in the config entry in
    common/Kconfig.

    [2] Run "tools/moveconfig.py -y -r HEAD SYS_NO_FLASH"

    [3] Rename the instances in defconfigs by the following:
    find . -path './configs/*_defconfig' | xargs sed -i \
    -e '/CONFIG_SYS_NO_FLASH=y/d' \
    -e 's/# CONFIG_SYS_NO_FLASH is not set/CONFIG_MTD_NOR_FLASH=y/'

    [4] Change the conditionals by the following:
    find . -name '*.[ch]' | xargs sed -i \
    -e 's/ifndef CONFIG_SYS_NO_FLASH/ifdef CONFIG_MTD_NOR_FLASH/' \
    -e 's/ifdef CONFIG_SYS_NO_FLASH/ifndef CONFIG_MTD_NOR_FLASH/' \
    -e 's/!defined(CONFIG_SYS_NO_FLASH)/defined(CONFIG_MTD_NOR_FLASH)/' \
    -e 's/defined(CONFIG_SYS_NO_FLASH)/!defined(CONFIG_MTD_NOR_FLASH)/'

    [5] Modify the following manually
    - Rename the rest of instances
    - Remove the description from README
    - Create the new Kconfig entry in drivers/mtd/Kconfig
    - Remove the old Kconfig entry from common/Kconfig
    - Remove the garbage comments from include/configs/*.h

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

29 Jan, 2017

1 commit

  • Doing unaligned reads is not supported on all architectures, use
    byte sized reads of the little endian buffer.
    Rename off16 to off8, as it reflects the buffer offset in byte
    granularity (offset is in entry, i.e. 12 bit, granularity).
    Fix a regression introduced in 8d48c92b45aea91e2a2be90f2ed93677e85526f1

    Reported-by: Oleksandr Tymoshenko
    Signed-off-by: Stefan Brüns
    Tested-by: Oleksandr Tymoshenko

    Stefan Brüns
     

28 Jan, 2017

1 commit


28 Dec, 2016

5 commits

  • genext2fs creates revision level 0 filesystems, which are not readable
    by u-boot due to the initialized group descriptor size field.
    f798b1dda1c5de818b806189e523d1b75db7e72d

    Reported-by: Kever Yang
    Reported-by: FrostyBytes@protonmail.com
    Signed-off-by: Stefan Brüns
    Tested-by: Kever Yang

    Stefan Brüns
     
  • Instead of shuffling bits from two adjacent 16 bit words, use one 16 bit
    word with the appropriate byte offset in the buffer.

    Signed-off-by: Stefan Brüns

    Stefan Brüns
     
  • get_fatent_value(...) flushes changed FAT entries to disk when fetching
    the next FAT blocks, in every other aspect it is identical to
    get_fatent(...).

    Provide a stub implementation for flush_dirty_fat_buffer if
    CONFIG_FAT_WRITE is not set. Calling flush_dirty_fat_buffer during read
    only operation is fine as it checks if any buffers needs flushing.

    Signed-off-by: Stefan Brüns
    Reviewed-by: Benoît Thébaudeau

    Stefan Brüns
     
  • The FAT is read/flushed in segments of 6 (FATBUFBLOCKS) disk sectors. The
    last segment may be less than 6 sectors, cap the length.

    Signed-off-by: Stefan Brüns
    Reviewed-by: Benoît Thébaudeau

    Stefan Brüns
     
  • The u-boot command fatwrite empties FAT clusters from the beginning
    till the end of the file.
    Specifically for FAT12 it fails to detect the end of the file and goes
    beyond the file bounds thus corrupting the file system.

    Additionally, FAT entry chaining-up into a file is not implemented
    for FAT12.

    The users normally workaround this by re-formatting the partition as
    FAT16/FAT32, like here:
    https://github.com/FEDEVEL/openrex-uboot-v2015.10/issues/1

    The patch fixes the bounds of a file and FAT12 entries chaining into
    a file, including EOF markup.

    Signed-off-by: Philipp Skadorov

    Philipp Skadorov
     

03 Dec, 2016

1 commit

  • Now that we free resources in sandbox_fs_ls Coverity is letting us know
    that in some cases we might leak. So in case of error we should still
    let os_dirent_free free anything that was allocated.

    Fixes: 86167089b71c ("sandbox/fs: Free memory allocated by os_dirent_ls")
    Reported-by: Coverity (CID: 153450)
    Cc: Stefan Brüns
    Cc: Simon Glass
    Signed-off-by: Tom Rini
    Reviewed-by: Simon Glass

    Tom Rini
     

29 Nov, 2016

1 commit

  • fill_dir_slot use get_contents_vfatname_block as a temporary buffer for
    constructing a list of dir_slot entries. To save the memory and providing
    correct type of memory for above usage, a local buffer with accurate size
    declaration is introduced.

    The local array size 640 is used because for long file name entry,
    each entry use 32 bytes, one entry can store up to 13 characters.
    The maximum number of entry possible is 20. So, total size is
    32*20=640bytes.

    Signed-off-by: Genevieve Chan
    Signed-off-by: Tien Fong Chee

    Tien Fong Chee
     

22 Nov, 2016

2 commits


31 Oct, 2016

1 commit


24 Oct, 2016

3 commits


12 Oct, 2016

1 commit


24 Sep, 2016

2 commits


23 Sep, 2016

20 commits