rpms/cluster/devel 0001-Changes-needed-to-stay-compatible-with-libvolume_id.patch, NONE, 1.1 0002-Changes-needed-to-stay-current-with-libvolume_id.patch, NONE, 1.1
Jesse Keating
jkeating at fedoraproject.org
Wed Sep 3 21:02:09 UTC 2008
- Previous message (by thread): rpms/argyllcms/devel argyllcms-1.0.3-remove-libusb-fork-check.patch, NONE, 1.1 .cvsignore, 1.4, 1.5 argyllcms.spec, 1.5, 1.6 import.log, 1.2, 1.3 sources, 1.4, 1.5 argyllcms-0.70-color-device-file.policy, 1.1, NONE argyllcms-1.0.1-19-color.fdi, 1.1, NONE argyllcms-1.0.1-remove-libusb-fork-check.patch, 1.1, NONE
- Next message (by thread): rpms/ocaml-lwt/F-9 import.log, NONE, 1.1 ocaml-lwt.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jkeating
Update of /cvs/pkgs/rpms/cluster/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10414
Added Files:
0001-Changes-needed-to-stay-compatible-with-libvolume_id.patch
0002-Changes-needed-to-stay-current-with-libvolume_id.patch
Log Message:
Add missing patches
0001-Changes-needed-to-stay-compatible-with-libvolume_id.patch:
--- NEW FILE 0001-Changes-needed-to-stay-compatible-with-libvolume_id.patch ---
>From 1e00b980fb2531de1272229f9900b8bf94caae56 Mon Sep 17 00:00:00 2001
From: Bob Peterson <rpeterso at redhat.com>
Date: Wed, 3 Sep 2008 13:29:35 -0500
Subject: [PATCH] Changes needed to stay compatible with libvolume_id.
---
gfs/gfs_mkfs/main.c | 28 ++++++++++++++++++++++------
1 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/gfs/gfs_mkfs/main.c b/gfs/gfs_mkfs/main.c
index 87316c7..f216b5c 100644
--- a/gfs/gfs_mkfs/main.c
+++ b/gfs/gfs_mkfs/main.c
@@ -208,18 +208,34 @@ void are_you_sure(commandline_t *comline)
{
char input[32];
struct volume_id *vid = NULL;
+ int fd;
- vid = volume_id_open_node(comline->device);
- if (vid == NULL)
+ fd = open(comline->device, O_RDONLY);
+ if (fd < 0)
+ die("Error: device %s not found.\n", comline->device);
+ vid = volume_id_open_fd(fd);
+ if (vid == NULL) {
+ close(fd);
die("error identifying the contents of %s: %s\n",
comline->device, strerror(errno));
-
+ }
printf("This will destroy any data on %s.\n",
comline->device);
- if (volume_id_probe_all(vid, 0, MKFS_DEFAULT_BSIZE) == 0)
- printf(" It appears to contain a %s %s.\n", vid->type,
- vid->usage_id == VOLUME_ID_OTHER? "partition" : vid->usage);
+ if (volume_id_probe_all(vid, 0, MKFS_DEFAULT_BSIZE) == 0) {
+ const char *fstype, *fsusage;
+ int rc;
+
+ rc = volume_id_get_type(vid, &fstype);
+ if (rc) {
+ rc = volume_id_get_usage(vid, &fsusage);
+ if (!rc || strncmp(fsusage, "other", 5) == 0)
+ fsusage = "partition";
+ printf(" It appears to contain a %s %s.\n", fstype,
+ fsusage);
+ }
+ }
volume_id_close(vid);
+ close(fd);
printf("\nAre you sure you want to proceed? [y/n] ");
if (fgets(input, 32, stdin) == NULL || input[0] != 'y')
die("aborted\n");
--
1.6.0.1
0002-Changes-needed-to-stay-current-with-libvolume_id.patch:
--- NEW FILE 0002-Changes-needed-to-stay-current-with-libvolume_id.patch ---
>From f00e7639798652daf6cce0dc7f9d8d3be0dae194 Mon Sep 17 00:00:00 2001
From: Bob Peterson <rpeterso at redhat.com>
Date: Wed, 3 Sep 2008 13:49:41 -0500
Subject: [PATCH] Changes needed to stay current with libvolume_id.
---
gfs2/mkfs/main_mkfs.c | 30 +++++++++++++++++++++++-------
1 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c
index 381380c..9b57f5a 100644
--- a/gfs2/mkfs/main_mkfs.c
+++ b/gfs2/mkfs/main_mkfs.c
@@ -260,17 +260,33 @@ static void are_you_sure(struct gfs2_sbd *sdp)
{
char input[32];
struct volume_id *vid = NULL;
-
- vid = volume_id_open_node(sdp->device_name);
- if (vid == NULL)
+ int fd;
+
+ fd = open(sdp->device_name, O_RDONLY);
+ if (fd < 0)
+ die("Error: device %s not found.\n", sdp->device_name);
+ vid = volume_id_open_fd(fd);
+ if (vid == NULL) {
+ close(fd);
die("error identifying the contents of %s: %s\n",
sdp->device_name, strerror(errno));
-
+ }
printf("This will destroy any data on %s.\n", sdp->device_name);
- if (volume_id_probe_all(vid, 0, sdp->device_size) == 0)
- printf(" It appears to contain a %s %s.\n", vid->type,
- vid->usage_id == VOLUME_ID_OTHER? "partition" : vid->usage);
+ if (volume_id_probe_all(vid, 0, sdp->device_size) == 0) {
+ const char *fstype, *fsusage;
+ int rc;
+
+ rc = volume_id_get_type(vid, &fstype);
+ if (rc) {
+ rc = volume_id_get_usage(vid, &fsusage);
+ if (!rc || strncmp(fsusage, "other", 5) == 0)
+ fsusage = "partition";
+ printf(" It appears to contain a %s %s.\n", fstype,
+ fsusage);
+ }
+ }
volume_id_close(vid);
+ close(fd);
printf("\nAre you sure you want to proceed? [y/n] ");
if(!fgets(input, 32, stdin))
die("unable to read from stdin\n");
--
1.6.0.1
- Previous message (by thread): rpms/argyllcms/devel argyllcms-1.0.3-remove-libusb-fork-check.patch, NONE, 1.1 .cvsignore, 1.4, 1.5 argyllcms.spec, 1.5, 1.6 import.log, 1.2, 1.3 sources, 1.4, 1.5 argyllcms-0.70-color-device-file.policy, 1.1, NONE argyllcms-1.0.1-19-color.fdi, 1.1, NONE argyllcms-1.0.1-remove-libusb-fork-check.patch, 1.1, NONE
- Next message (by thread): rpms/ocaml-lwt/F-9 import.log, NONE, 1.1 ocaml-lwt.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list