Skip to contentSkip to conversation

cluster/cman/qdisk disk.h main.c mkqdisk.c proc.c

Cluster-devel [email protected] 1 participant 1 message Nov 15, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: fabbione at sourceware.org 2007-11-15 04:14:15

Modified files:
cman/qdisk : disk.h main.c mkqdisk.c proc.c

Log message:

	Fix bugzilla 362031

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/disk.h.diff?cvsroot=cluster&r1=1.7&r2=1.8
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/main.c.diff?cvsroot=cluster&r1=1.11&r2=1.12
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/mkqdisk.c.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/proc.c.diff?cvsroot=cluster&r1=1.3&r2=1.4

cman/qdisk/disk.h +1 -1
@@ -277,7 +277,7 @@
 void qd_destroy(qd_ctx *ctx);
 
 /* proc.c */
-int find_partitions(const char *partfile, const char *label,
+int find_partitions(const char *devdir, const char *label,
 		    char *devname, size_t devlen, int print);
 int check_device(char *device, char *label, quorum_header_t *qh);
 
cman/qdisk/main.c +2 -1
@@ -1491,7 +1491,8 @@
 	}
 	
 	if (ctx.qc_label) {
-		if (find_partitions("/proc/partitions",
+		memset(device, 0, sizeof(device));
+		if (find_partitions("/dev",
 				    ctx.qc_label, device,
 				    sizeof(device), 0) != 0) {
 			clulog_and_print(LOG_CRIT, "Unable to match label"
cman/qdisk/mkqdisk.c +3 -3
@@ -39,19 +39,19 @@
 	char *newdev = NULL, *newlabel = NULL;
 	int rv;
 
-	printf("mkqdisk v0.5.1\n");
+	printf("mkqdisk v" RELEASE_VERSION "\n\n");
 
 	while ((rv = getopt(argc, argv, "Lf:c:l:h")) != EOF) {
 		switch (rv) {
 		case 'L':
 			/* List */
 			close(2);
-			return find_partitions("/proc/partitions",
+			return find_partitions("/dev",
 					       NULL, NULL, 0, 1);
 			break;
 		case 'f':
 			close(2);
-			return find_partitions("/proc/partitions",
+			return find_partitions("/dev",
 					       optarg, device,
 					       sizeof(device), 1);
 		case 'c':
cman/qdisk/proc.c +48 -47

120 lines not on this page · raw message