From: Peter.Seiderer@gmx.de
To: linux-raid@vger.kernel.org
Subject: Bugfix: mkraid
Date: Fri, 11 Jul 2003 17:13:27 +0200 (MEST) [thread overview]
Message-ID: <6298.1057936407@www40.gmx.net> (raw)
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
reply other threads:[~2003-07-11 15:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6298.1057936407@www40.gmx.net \
--to=peter.seiderer@gmx.de \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.