On Tue, Mar 27, 2018 at 11:28:17AM -0500, Tony Asleson wrote: > From looking at the documentation and the code for blkid_do_safeprobe > it's not totally apparent to me that when the function returns -2 > (ambivalent) that there is any results which may be retrieved by > utilizing blkid_probe_numof_values and blkid_probe_get_value. After any error blkid_probe_get_value() behavior is undefined. If need to rescan the device by blkid_do_probe() get all possible results. See for example misc-utils/blkid.c:print_udev_ambivalent() where we compose ID_FS_AMBIVALENT= for udev. > Any clarification on this would be appreciated. Also, do you only get > the -2 return if BLKID_SUBLKS_BADCSUM is set? You can get -2 when there is more valid superblocks detected on the same device. The flag BLKID_SUBLKS_BADCSUM may help, but it's not requirement. All depends on msfs-like tools, if the tool does not wipe the device before it creates a new filesystem then you will see more superblocks. It's unusual now, but years ago it was pretty common. For example it was possible to create LUKS/VFAT and SWAP on the same device. You can imagine what happen with our encrypted data after swapon. 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