Re: [PATCH] block: set S_IFBLK for block devices instead of S_IFCHR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
> ---
>  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 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux