[PATCH] hald+LUKS v3
Kay Sievers
kay.sievers at vrfy.org
Wed Mar 2 09:39:05 PST 2005
On Tue, Mar 01, 2005 at 11:33:25PM -0600, W. Michael Petullo wrote:
> Attached you should find a more patch to add LUKS[1] support to hald.
> This patch differs from v2 in that it is against the CVS code as of
> 03/01/05.
>
> diff -u --recursive --new-file hal-cvs-vanilla/volume_id/luks.c hal-cvs/volume_id/luks.c
> --- hal-cvs-vanilla/volume_id/luks.c 2005-02-25 11:21:48.000000000 -0600
> +++ hal-cvs/volume_id/luks.c 2005-03-01 21:41:19.000000000 -0600
> @@ -40,6 +40,10 @@
> #include "logging.h"
> #include "luks.h"
>
> +/* FIXME: this contains a lot of copy and pasted code. One alternative
> + * would be to fork/exec cryptsetup isLuks and cryptsetup luksUUID. Another
> + * would be to write a LUKS library */
> +
Please add only comments that are needed to understand the actual code. :)
> /* from cryptsetup-luks internal.h */
> #define SECTOR_SHIFT 9
> #define SECTOR_SIZE (1 << SECTOR_SHIFT)
> @@ -64,6 +68,8 @@
>
> int volume_id_probe_luks(struct volume_id *id, __u64 off)
> {
> + int i;
What is this variable for?
> diff -u --recursive --new-file hal-cvs-vanilla/volume_id/Makefile.am hal-cvs/volume_id/Makefile.am
> --- hal-cvs-vanilla/volume_id/Makefile.am 2005-02-16 16:40:47.000000000 -0600
> +++ hal-cvs/volume_id/Makefile.am 2005-03-01 11:42:11.000000000 -0600
> @@ -14,6 +14,7 @@
> linux_raid.h linux_raid.c \
> linux_swap.h linux_swap.c \
> lvm.h lvm.c \
> + luks.h luks.c \
That seems not against the CVS version. And the whitespace is wrong.
> diff -u --recursive --new-file hal-cvs-vanilla/volume_id/util.c
> hal-cvs/volume_id/util.c
> --- hal-cvs-vanilla/volume_id/util.c 2005-02-16 14:16:55.000000000 -0600
> +++ hal-cvs/volume_id/util.c 2005-03-01 11:43:37.000000000 -0600
> @@ -138,6 +138,10 @@
> break;
> case UUID_DCE:
> count = 16;
> + break;
> + case UUID_DCE_UNPARSED:
> + count = 36;
This will not fit into the current buffer.
> diff -u --recursive --new-file hal-cvs-vanilla/volume_id/util.h hal-cvs/volume_id/util.h
> --- hal-cvs-vanilla/volume_id/util.h 2005-02-16 16:40:47.000000000 -0600
> +++ hal-cvs/volume_id/util.h 2005-03-01 11:46:42.000000000 -0600
> @@ -71,6 +71,7 @@
> #endif
>
> enum uuid_format {
> + UUID_DCE_UNPARSED,
DCE means "Distributed Computing Environemnt", which is a defined
standard. Are you sure that there is such a format?
Thanks,
Kay
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list