blob: bef45376471ebb3a74af3c0e6f8b5dbc9394d240 [file] [log] [blame]
#!/bin/sh
set -e
SYSFS_UBI_DIR=/sys/class/ubi
log()
{
echo "$@" >&2
}
usage()
{
log "Usage: $0"
log " Lists all ubi volumes"
exit 9
}
if [ "$#" != 0 ]; then
usage
fi
for i in $SYSFS_UBI_DIR/ubi*_*; do
[ -d $i ] || continue
echo -n ${i##*/} ''
head -n1 $i/name
done