On Thu, Feb 03, 2011 at 01:38:21PM +0100, Thomas BÃchler wrote: > > The best way to detect empty device is probably: > > > > if test -z "$(blkid -o udev -p $device -s TYPE -s PTTYPE)"; then > > echo "nothing on the device" > > fi > > > > this works in all cases and all util-linux blkid(8) versions. > > This will still return nothing in case of ambivalent results, right? Or > would is print an ID_FS_AMBIVALENT line? It will print ID_FS_AMBIVALENT. > However, with the changes queued up for 2.19, my method of using 'blkid > -p' should do exactly what I want (correct me if I am wrong here). Yep, seems correct to me. Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html