* [Cluster-devel] cluster/gfs/gfs_mkfs main.c
@ 2007-07-10 18:01 rohara
0 siblings, 0 replies; 3+ messages in thread
From: rohara @ 2007-07-10 18:01 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: rohara at sourceware.org 2007-07-10 18:01:05
Modified files:
gfs/gfs_mkfs : main.c
Log message:
BZ 240584 - Check to see if device is mounted before creating filesystem.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/gfs_mkfs/main.c.diff?cvsroot=cluster&r1=1.6&r2=1.7
--- cluster/gfs/gfs_mkfs/main.c 2006/11/29 17:25:44 1.6
+++ cluster/gfs/gfs_mkfs/main.c 2007/07/10 18:01:01 1.7
@@ -22,6 +22,7 @@
#include <sys/ioctl.h>
#include <assert.h>
#include <time.h>
+#include <mntent.h>
#include "global.h"
#include "gfs_ondisk.h"
@@ -243,6 +244,39 @@
/**
+ * 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
*
@@ -307,6 +341,8 @@
decode_arguments(argc, argv, &comline);
+ check_mount(comline.device);
+
if (!comline.expert) {
char buf[256];
if (test_locking(comline.lockproto, comline.locktable, buf, 256))
^ permalink raw reply [flat|nested] 3+ messages in thread* [Cluster-devel] cluster/gfs/gfs_mkfs main.c
@ 2007-07-10 19:18 rohara
0 siblings, 0 replies; 3+ messages in thread
From: rohara @ 2007-07-10 19:18 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: rohara at sourceware.org 2007-07-10 19:18:19
Modified files:
gfs/gfs_mkfs : main.c
Log message:
BZ 240584 - Check to see if device is mounted before creating filesystem.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/gfs_mkfs/main.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.5.2.1&r2=1.5.2.2
--- cluster/gfs/gfs_mkfs/main.c 2006/11/29 18:25:50 1.5.2.1
+++ cluster/gfs/gfs_mkfs/main.c 2007/07/10 19:18:19 1.5.2.2
@@ -22,6 +22,7 @@
#include <sys/ioctl.h>
#include <assert.h>
#include <time.h>
+#include <mntent.h>
#include "global.h"
#include "gfs_ondisk.h"
@@ -243,6 +244,39 @@
/**
+ * 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
*
@@ -307,6 +341,8 @@
decode_arguments(argc, argv, &comline);
+ check_mount(comline.device);
+
if (!comline.expert) {
char buf[256];
if (test_locking(comline.lockproto, comline.locktable, buf, 256))
^ permalink raw reply [flat|nested] 3+ messages in thread* [Cluster-devel] cluster/gfs/gfs_mkfs main.c
@ 2007-07-20 18:11 cfeist
0 siblings, 0 replies; 3+ messages in thread
From: cfeist @ 2007-07-20 18:11 UTC (permalink / raw)
To: cluster-devel.redhat.com
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
--- cluster/gfs/gfs_mkfs/main.c 2007/07/10 19:18:19 1.5.2.2
+++ cluster/gfs/gfs_mkfs/main.c 2007/07/20 18:11:35 1.5.2.2.2.1
@@ -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))
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-07-20 18:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-10 18:01 [Cluster-devel] cluster/gfs/gfs_mkfs main.c rohara
-- strict thread matches above, loose matches on Subject: below --
2007-07-10 19:18 rohara
2007-07-20 18:11 cfeist
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).