Commit Graph

11 Commits

Author SHA1 Message Date
Simon Glass
4101f68792 dm: Drop the block_dev_desc_t typedef
Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long
and causes 80-column violations, rename it to struct blk_desc.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
2016-03-14 15:34:50 -06:00
Stephen Warren
7c4213f6a5 block: pass block dev not num to read/write/erase()
This will allow the implementation to make use of data in the block_dev
structure beyond the base device number. This will be useful so that eMMC
block devices can encompass the HW partition ID rather than treating this
out-of-band. Equally, the existence of the priv field is crying out for
this patch to exist.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-01-13 21:05:18 -05:00
Jorgen Lundman
e183de0d3e ZFS: Clean up cppcheck warnings where relevant, leaked memory etc
In a message from Wolfgang Denk highlighting warnings from cppcheck,
the patch will address those that are correctly diagnosed. Some are
false-positives:

> [fs/zfs/zfs.c:937]: (error) Memory leak: l
dmu_read() allocates "l" if successful, so error-case should not free
it.
> [fs/zfs/zfs.c:1141]: (error) Memory leak: dnbuf
dmu_read() allocates "dnbuf" if successful, so error-case should not
free it.
> [fs/zfs/zfs.c:1372]: (error) Memory leak: osp
zio_read() allocates "osp" if successful, so error-case should
not free it.
> [fs/zfs/zfs.c:1726]: (error) Memory leak: nvlist
int_zfs_fetch_nvlist() allocates "nvlist" if successful, so error-case
should not free it.

Signed-off-by: Jorgen Lundman <lundman@lundman.net>
2014-11-10 16:25:27 -05:00
Masahiro Yamada
c79cba37b3 cosmetic: replace MIN, MAX with min, max
The macro MIN, MAX is defined as the aliase of min, max,
respectively.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-09-24 18:30:29 -04:00
Masahiro Yamada
4678d74256 fs: descend into sub directories when it is necessary
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-11-17 14:11:34 -05:00
Masahiro Yamada
35c792754c fs: convert makefiles to Kbuild style
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-10-31 13:26:01 -04:00
Wolfgang Denk
1a4596601f Add GPL-2.0+ SPDX-License-Identifier to source files
Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>
2013-07-24 09:44:38 -04:00
Alejandro Mery
624c721f0c fs: zfs: fix illegal use of fp
the upcoming sunxi (allwinner a10/a13) platform enables zfs
by default, and using linaro's hf -msoft-float makes the build
fail because this u64 division.

Signed-off-by: Alejandro Mery <amery@geeks.cl>
Acked-by: Stefan Roese <sr@denx.de>
2012-11-14 13:18:41 +01:00
Stefan Roese
e08ebf4687 ZFS: Fix compile warning in fs/zfs/zfs.c (GCC 4.6.4 from ELDK 5.2.1)
This patch fixes the following compile warning:
zfs.c:2006:1: warning: 'zfs_label' defined but not used [-Wunused-function]
zfs.c:2029:1: warning: 'zfs_uuid' defined but not used [-Wunused-function]

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Jorgen Lundman <lundman@lundman.net>
2012-11-02 15:20:40 -07:00
Rob Herring
4120457044 cmd_zfs: use common get_device_and_partition function
Convert zfsload and zfsls to use common device and partition parsing
function. With the common function "dev:part" can come from the
environment and a '-' can be used in that case.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2012-09-25 14:49:17 -07:00
Jorgen Lundman
4d3c95f5ea zfs: Add ZFS filesystem support
U-Boot port is based on sources forked from GRUB-0.97 by Sun in 2004,
which can be found here:
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/grub/grub-0.97/stage2/zfs-include/zfs.h

Released by Sun for GRUB under the license:
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.

GRUB official releases include ZFS in version:
ftp://alpha.gnu.org/gnu/grub/grub-1.99~rc1.tar.gz

And patched against GRUB Bazaar repository for ashift fixes (4KB HDDs)
more conveniently found at github:
e7b6ef3ac3

Signed-off-by: Jorgen Lundman <lundman@lundman.net>
2012-08-09 23:42:20 +02:00