On Wed, Jun 14, 2017 at 11:04:34PM +0200, Pali Rohár wrote: > Hello! > > Technically UDF filesystem allows to store empty string values. > LogicalVolumeIdentifier (label) according to UDF specification shall not > be null, but it is possible to store empty string there. > > Question is, what should libblkid's udf code do if e.g. LABEL identifier > is empty string? Should it set empty LABEL for libblkid? Or it should > not set LABEL at all? > > Currently in blkid_probe_set_label() is check for len > 1, so empty > string is not possible to store for LABEL. But when check fails function > return non-negative value which is understood as succeeded -- even it > did not store empty string. It does not looks good... Or it is expected? IMHO think it's expected, blkid_probe_set_label() hides all the logic to keep probing functions simple. So, LABEL is optional and libblkid should not return any error if FS does not define any LABEL. The empty string as label is unwanted and unexpected by library clients. 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