FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 03-19-2010, 12:56 PM
 
Default dmraid include/dmraid/lib_context.h lib/metada ...

CVSROOT: /cvs/dm
Module name: dmraid
Changes by: heinzm@sourceware.org 2010-03-19 13:56:49

Modified files:
include/dmraid : lib_context.h
lib/metadata : metadata.c
tools : commands.c

Log message:
A bit more option character sorting and comments

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/dmraid/include/dmraid/lib_context.h.diff?cvsroot=dm&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/dmraid/lib/metadata/metadata.c.diff?cvsroot=dm&r1=1.11&r2=1.12
http://sourceware.org/cgi-bin/cvsweb.cgi/dmraid/tools/commands.c.diff?cvsroot=dm&r1=1.8&r2=1.9

--- dmraid/include/dmraid/lib_context.h 2010/03/19 12:07:47 1.6
+++ dmraid/include/dmraid/lib_context.h 2010/03/19 13:56:49 1.7
@@ -54,21 +54,21 @@
/* Options access macros. */
/* Return option counter. */
#define OPT_COLUMN(lc) (lc_opt(lc, LC_COLUMN))
+#define OPT_CREATE(lc) (lc_opt(lc, LC_CREATE))
#define OPT_DEBUG(lc) (lc_opt(lc, LC_DEBUG))
#define OPT_DEVICES(lc) (lc_opt(lc, LC_DEVICES))
#define OPT_DUMP(lc) (lc_opt(lc, LC_DUMP))
-#define OPT_GROUP(lc) (lc_opt(lc, LC_GROUP))
#define OPT_FORMAT(lc) (lc_opt(lc, LC_FORMAT))
+#define OPT_GROUP(lc) (lc_opt(lc, LC_GROUP))
+#define OPT_HOT_SPARE_SET(lc) (lc_opt(lc, LC_HOT_SPARE_SET))
#define OPT_IGNORELOCKING(lc) (lc_opt(lc, LC_IGNORELOCKING))
+#define OPT_IGNOREMONITORING(lc) (lc_opt(lc, LC_IGNOREMONITORING))
+#define OPT_PARTCHAR(lc) (lc_opt(lc, LC_PARTCHAR))
+#define OPT_REBUILD_DISK(lc) (lc_opt(lc, LC_REBUILD_DISK))
#define OPT_SEPARATOR(lc) (lc_opt(lc, LC_SEPARATOR))
#define OPT_SETS(lc) (lc_opt(lc, LC_SETS))
#define OPT_TEST(lc) (lc_opt(lc, LC_TEST))
#define OPT_VERBOSE(lc) (lc_opt(lc, LC_VERBOSE))
-#define OPT_PARTCHAR(lc) (lc_opt(lc, LC_PARTCHAR))
-#define OPT_CREATE(lc) (lc_opt(lc, LC_CREATE))
-#define OPT_REBUILD_DISK(lc) (lc_opt(lc, LC_REBUILD_DISK))
-#define OPT_HOT_SPARE_SET(lc) (lc_opt(lc, LC_HOT_SPARE_SET))
-#define OPT_IGNOREMONITORING(lc) (lc_opt(lc, LC_IGNOREMONITORING))

/* Return option value. */
#define OPT_STR(lc, o) (lc->options[o].arg.str)
--- dmraid/lib/metadata/metadata.c 2010/03/19 12:07:48 1.11
+++ dmraid/lib/metadata/metadata.c 2010/03/19 13:56:49 1.12
@@ -1901,23 +1901,21 @@

n++;
}
+
if (n > 1) {
printf("
About to delete the raid super-set "
""%s" with the following RAID sets
",
rs->name);
list_for_each_entry(rs1, &rs->sets, list)
printf("%s
", rs1->name);
- }
- else if (n == 1) {
+ } else if (n == 1) {
rs1 = list_entry(rs->sets.next,
struct raid_set, list);
printf("
About to delete RAID set %s
",
rs1->name);
- }
- else
+ } else
LOG_ERR(lc, 0, "coding error");
- }
- else
+ } else
printf("
About to delete RAID set %s
", rs->name);

printf("
WARNING: The metadata stored on the raidset(s) "
@@ -1932,7 +1930,6 @@
rd->fmt->name);

rd->fmt->delete(lc, rs);
-
}

return 1;
--- dmraid/tools/commands.c 2010/03/19 12:07:48 1.8
+++ dmraid/tools/commands.c 2010/03/19 13:56:49 1.9
@@ -30,12 +30,11 @@
/*
* Command line options.
*/
-static char const *short_opts = "a:hipP:"
- "bc::dDEf:gIlxM:"
+static char const *short_opts = "a:bc::C:dDEf:ghiIlM:"
#ifdef DMRAID_NATIVE_LOG
"n"
#endif
- "rR:s::tvVC:S::Z";
+ "pP:rR:s::S::tvVxZ";

#ifdef HAVE_GETOPTLONG
static struct option long_opts[] = {
@@ -46,8 +45,8 @@
{"display_columns", optional_argument, NULL, 'c'},
{"display_group", no_argument, NULL, 'g'},
{"dump_metadata", no_argument, NULL, 'D'},
- {"format", required_argument, NULL, 'f'},
{"erase_metadata", no_argument, NULL, 'E'},
+ {"format", required_argument, NULL, 'f'},
{"help", no_argument, NULL, 'h'},
{"ignorelocking", no_argument, NULL, 'i'},
{"ignoremonitoring", no_argument, NULL, 'I'},
@@ -618,6 +617,7 @@
if ((action & (DBG | VERBOSE)) == action)
LOG_ERR(lc, 0, "more options needed with -d/-v");

+ /* Enforce metadata dump on (mistaken) erase. */
if (action & DMERASE) {
action |= DUMP;
lc_inc_opt(lc, LC_DUMP);
@@ -636,6 +636,7 @@
LOG_ERR(lc, 0, "invalid format for -f at (see -l)");
}

+/* Save name of rebuild disk. */
int
save_drive_name(struct lib_context *lc, char *drive)
{
@@ -643,6 +644,7 @@
return lc_strcat_opt(lc, LC_REBUILD_DISK, drive, ',') ? 1 : 0;
}

+/* Save name of hot spare disk. */
static int
save_spare_name(struct lib_context *lc, char **argv)
{

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 06:55 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org