Re: Patch to support LUKS UUIDs in libblkid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In addition to the comments already posted:

> +/* check it manually as using LUKS_read_phdr from libcryptsetup
> + * prints too many warnings if it isn't a luks partition and would add a
> + * dependency on the lib */
> +static int probe_luks(struct blkid_probe *probe,
> +		       struct blkid_magic *id __BLKID_ATTR((unused)), 
> +		       unsigned char *buf)
> +{
> +	const char *luks_magic = id->bim_magic;
> +	unsigned char *p_buf = buf;
> +	unsigned char uuid[40];
> +	if(strncmp(buf, luks_magic, strlen(luks_magic)) == 0)   /* ID matches, continue */

There's no point in doing this check, since it's replicating a check
already done in the generic code.  The probe function won't be called
if the bim_magic didn't match the specified offset. 

						- Ted
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux