1 --- cluster-2.03.10/gfs/gfs_mkfs/main.c.orig 2008-12-09 09:36:04.000000000 +0100
2 +++ cluster-2.03.10/gfs/gfs_mkfs/main.c 2011-05-23 16:54:19.847098734 +0200
7 +#include <blkid/blkid.h>
10 #include "gfs_ondisk.h"
12 -#include "libvolume_id.h"
14 #include "copyright.cf"
16 @@ -207,34 +207,36 @@ static void decode_arguments(int argc, c
17 void are_you_sure(commandline_t *comline)
20 - struct volume_id *vid = NULL;
24 fd = open(comline->device, O_RDONLY);
26 die("Error: device %s not found.\n", comline->device);
27 - vid = volume_id_open_fd(fd);
29 + pr = blkid_new_probe();
32 die("error identifying the contents of %s: %s\n",
33 comline->device, strerror(errno));
35 printf("This will destroy any data on %s.\n",
37 - if (volume_id_probe_all(vid, 0, MKFS_DEFAULT_BSIZE) == 0) {
38 + blkid_probe_set_request(pr, BLKID_PROBREQ_TYPE | BLKID_PROBREQ_USAGE);
39 + if ((blkid_probe_set_device(pr, fd, 0, MKFS_DEFAULT_BSIZE) == 0) &&
40 + (blkid_do_safeprobe(pr) == 0)) {
41 const char *fstype, *fsusage;
44 - rc = volume_id_get_type(vid, &fstype);
45 + rc = blkid_probe_lookup_value(pr, "TYPE", &fstype, NULL);
47 - rc = volume_id_get_usage(vid, &fsusage);
48 + rc = blkid_probe_lookup_value(pr, "USAGE", &fsusage, NULL);
49 if (!rc || strncmp(fsusage, "other", 5) == 0)
50 fsusage = "partition";
51 printf(" It appears to contain a %s %s.\n", fstype,
55 - volume_id_close(vid);
56 + blkid_free_probe(pr);
58 printf("\nAre you sure you want to proceed? [y/n] ");
59 if (fgets(input, 32, stdin) == NULL || input[0] != 'y')
60 --- cluster-2.03.10/gfs/gfs_mkfs/Makefile.orig 2008-12-09 09:36:04.000000000 +0100
61 +++ cluster-2.03.10/gfs/gfs_mkfs/Makefile 2011-05-23 16:54:37.883766007 +0200
62 @@ -24,7 +24,7 @@ CFLAGS += -I${gfskincdir} -I${volidincdi
63 CFLAGS += -I$(S)/../include -I$(S)/../libgfs
66 -LDFLAGS += -L${volidlibdir} -lvolume_id
67 +LDFLAGS += -L${volidlibdir} -lblkid
68 LDFLAGS += -L../libgfs -lgfs