[PATCH] block: set S_IFBLK for block devices instead of S_IFCHR
Sascha Hauer
sha at pengutronix.de
Thu Mar 10 01:33:20 PST 2022
On Fri, Mar 04, 2022 at 10:28:05AM +0100, Ahmad Fatoum wrote:
> In barebox, block devices are a special case of character devices.
> Nevertheless, differentiation can be useful to allow scripts iterating
> over all block devices without accounting for naming, e.g.
>
> for dev in /dev/*; do
> test -b $dev && echo $dev: blockdevice
> done
>
> Add the necessary support. This will break scripts that assume
> test -c blockdevice to be true, but that's a quite improbable check.
>
> Signed-off-by: Ahmad Fatoum <ahmad at a3f.at>
> ---
> commands/memtester/memtester.c | 2 +-
> common/block.c | 8 ++++++++
> fs/devfs.c | 7 ++++++-
> fs/legacy.c | 1 +
> include/block.h | 2 ++
> 5 files changed, 18 insertions(+), 2 deletions(-)
Dropped this patch. It breaks several defconfigs with:
/home/sha/dude/barebox/barebox-maintainer-utils/barebox/fs/devfs.c:261: undefined reference to `cdev_get_block_device'
Try for example a9m2410_defconfig
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list