Small improvement to raidtools
Hey, y'all, here's a small patch for the latest raidtools (that I know of). It removes a couple little annoyances and trivial bugs, and adds a ChangeLog, which enumerates them. :)
The copyright on this patch is hereby abandoned.
| An you be mine, I'll give you to my friend; | An you be not, hang, beg, starve, die in the streets, | For, by my soul, I'll ne'er acknowledge thee, | Nor what is mine shall never do thee good. | | Capulet | Romeo and Juliet
If it burns down your house or seduces your wife, you asked for it. I'm not subscribed, so please cc me on replies.
ChangeLog renamed from raidtools-1.00.3.orig/ChangeLog +24 -0
@@ -0,0 +1,24 @@ +2002-10-03 Rich Paul <[email protected]> + + * minor cleanups in mkraid + + * no longer require root for --help or --version + + * reformatted mkraid --help, and removed lies (-v ...) + + * exit(0) from usage or version, except when there is an error + + * usage to stdout if it's requested, otherwise stderr + + * add 'compiled for md ...' to version + + * report program name used to invoke in usage + + * removed lots of dead code, aparently left from when there + was one multipurpose binary. + + * added this nifty ChangeLog :) + + * changed suggestion from 'read the lsraid HOWTO' to 'read the + lsraid man page', as I am unable to locate the former document. +
common.h renamed from raidtools-1.00.3.orig/common.h +1 -1
@@ -46,7 +46,7 @@#include <linux/unistd.h> #define DEBUG (0) -#define EXIT_USAGE (EXIT_FAILURE) +#define EXIT_USAGE (0)#define EXIT_VERSION (0)#define MAX_LINE_LENGTH (100)#define ZERO_BUFFER_SIZE (64)/* 64kB */
lsraid.c renamed from raidtools-1.00.3.orig/lsraid.c +6 -4
@@ -215,9 +215,11 @@*/ -static void print_version () +static void print_version (const char *prog) { -fprintf (stdout,"lsraid version " LSRAID_VERSION "\n" ); +printf ("%s version %s compiled for md %s\n" , + prog,LSRAID_VERSION ,MD_VERSION + );exit (0 ); }/* print_version() */
@@ -338,7 +340,7 @@else if (strcmp (argv[i],"--help" ) ==0 )print_usage_long ();else if (strcmp (argv[i],"--version" ) ==0 ) -print_version (); +print_version (argv[0 ]);else { fprintf(stderr, "lsraid: Invalid option: %s\n",
@@ -353,7 +355,7 @@break ;case 'V' : -print_version (); +print_version (argv[0 ]);break ;case 'A' :
mkraid.c renamed from raidtools-1.00.3.orig/mkraid.c +39 -91
198 lines not on this page · raw message
raidreconf.c renamed from raidtools-1.00.3.orig/raidreconf.c +3 -3
@@ -84,9 +84,6 @@return EXIT_FAILURE ; } -if (!test &&prepare_raidlib ()) -return EXIT_FAILURE ; -if (help) {usage ();return EXIT_FAILURE ;
@@ -99,6 +96,9 @@return EXIT_VERSION ; } +if (!test &&prepare_raidlib ()) +return EXIT_FAILURE ; +if (test) {printf ("test mode - plain files are used, no kernel RAID interaction\n" );