#!/bin/dash
# Puppy-compatibility script: list partitions

for p in $(ls /sys/class/block/*/partition); do
	p=${p%/partition}; p=${p##*/}
	# filter device
	case $p in
		ram*|loop*) continue ;;
	esac
	
	# filter output
	ptype=$(guess_fstype /dev/$p)
	case "$ptype" in
		""|unknown) ptype=none
	esac
	psize=0; read psize < /sys/class/block/$p/size
	printf "/dev/%s|%s|%s\n" $p $ptype $psize
done
