* Bugfix: mkraid
@ 2003-07-11 15:13 Peter.Seiderer
0 siblings, 0 replies; only message in thread
From: Peter.Seiderer @ 2003-07-11 15:13 UTC (permalink / raw)
To: linux-raid
Hello,
the following patch is a bugfix for mkraid (from raidtools-1.00.3).
It fixes that a call 'mkraid /dev/md5' will check if /dev/md5 is active and
not
if the last entry from the config file is active.
--- raidtools-1.00.3/mkraid.c_orig 2003-07-11 16:49:23.000000000 +0200
+++ raidtools-1.00.3/mkraid.c 2003-07-11 17:15:24.000000000 +0200
@@ -219,7 +219,7 @@
while (*args) {
for (p = cfg_head; p; p = p->next) {
if (strcmp(p->md_name, *args)) continue;
- if (check_active(cfg))
+ if (check_active(p))
goto abort;
if (force_flag) {
fprintf(stderr, "DESTROYING the contents of %s in 5 seconds,
Ctrl-C if unsure!\n", *args);
And another little patch for against SEGV when called with a very long
cmdline (e.g.
/dev/md_this_is_very_long_md_device_and_longer_than_MAX_LINE_LENGTH_)
--- raidtools-1.00.3/raid_io.c_orig 2003-07-11 16:09:43.000000000 +0200
+++ raidtools-1.00.3/raid_io.c 2003-07-11 17:15:25.000000000 +0200
@@ -522,7 +522,7 @@
if ((ch = strstr(p->md_name, "/md")) == NULL)
return 0;
- strcpy(buffer, ch+1);
+ strncpy(buffer, MAX_LINE_LENGTH, ch+1);
if ((fp = fopen("/proc/mdstat", "r")) == NULL)
return 0;
while (1) {
Peter
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
Jetzt ein- oder umsteigen und USB-Speicheruhr als Prämie sichern!
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-07-11 15:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-11 15:13 Bugfix: mkraid Peter.Seiderer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.