Skip to contentSkip to conversation

cluster/gfs/gfs_mkfs main.c

Cluster-devel [email protected] 1 participant 1 message Jul 20, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL51
Changes by: cfeist at sourceware.org 2007-07-20 18:11:35

Modified files:
gfs/gfs_mkfs : main.c

Log message:
Revert patch to check if filesystem was in use.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/gfs_mkfs/main.c.diff?cvsroot=cluster&only_with_tag=RHEL51&r1=1.5.2.2&r2=1.5.2.2.2.1

gfs/gfs_mkfs/main.c +0 -36
@@ -22,7 +22,6 @@
 #include <sys/ioctl.h>
 #include <assert.h>
 #include <time.h>
-#include <mntent.h>
 
 #include "global.h"
 #include "gfs_ondisk.h"
@@ -244,39 +243,6 @@
 
 
 /**
- * check_mount -
- * @
- *
- */
-
-void check_mount(char *device)
-{
-	struct mntent *mnt;
-	FILE *fp;
-
-	if ((fp = setmntent("/proc/mounts", "r")) == NULL) {
-		die("error opening /proc/mounts");
-	}
-
-	while ((mnt = getmntent(fp)) != NULL) {
-		if (strcmp(device, mnt->mnt_fsname) == 0) {
-			printf("cannot create filesystem: ");
-			printf("%s appears to be mounted\n", device);
-			break;
-		}
-	}
-
-	endmntent(fp);
-
-	if (fp != NULL) {
-		exit(EXIT_FAILURE);
-	}
-
-	return;
-}
-
-
-/**
  * print_results - print out summary information
  * @comline: the command line
  *
@@ -341,8 +307,6 @@
 
 	decode_arguments(argc, argv, &comline);
 
-	check_mount(comline.device);
-
 	if (!comline.expert) {
 		char buf[256];
 		if (test_locking(comline.lockproto, comline.locktable, buf, 256))