On Thu, Mar 20, 2014 at 11:03:49AM +0100, Hannes Reinecke wrote: > +/** > + * blkid_probe_get_idmag: > + * @pr: probe > + * @id: id information > + * @offset: begin of probing area > + * @res: found id information > + * > + * Check for matching magic value. > + * Returns BLKID_PROBE_OK if found, BLKID_PROBE_NONE if not found > + * or no magic present, or negative value on error. > + */ > int blkid_probe_get_idmag(blkid_probe pr, const struct blkid_idinfo *id, > blkid_loff_t *offset, const struct blkid_idmag **res) > { > @@ -794,6 +812,8 @@ int blkid_probe_get_idmag(blkid_probe pr, const struct blkid_idinfo *id, > off = (mag->kboff + (mag->sboff >> 10)) << 10; > buf = blkid_probe_get_buffer(pr, off, 1024); > > + if (!buf && errno) > + return errno; return -errno; Otherwise it looks good. 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