From: Florian Schanda <ma1flfs@bath.ac.uk>
To: linux-raid@vger.kernel.org
Subject: [Small Patch] for raidlib.c in raidtools-1.00.3
Date: Tue, 25 Feb 2003 13:49:57 +0000 [thread overview]
Message-ID: <200302251349.57326.ma1flfs@bath.ac.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 343 bytes --]
Hi all,
I had some problems with raidtools, it gave me a wierd error saying
"/dev/md/0: Invalid argument"
After spending some time to fix it, I figured it would be a good idea to
actually load the kernel module. ;)
To save save some trouble, I enhaced the error reporting for that particular
function.
- Florian Schanda
[-- Attachment #2: error-reporting.patch --]
[-- Type: text/x-diff, Size: 1036 bytes --]
--- raidlib.c.orig Tue Feb 25 13:38:46 2003
+++ raidlib.c Tue Feb 25 13:44:44 2003
@@ -149,20 +149,26 @@
return 0;
}
- if ((rc = ioctl (fd, RUN_ARRAY, (unsigned long)param))) {
- save_errno=errno;
- switch (save_errno) {
- case EBUSY:
- fprintf(stderr,"%s: already running\n",dev);
- break;
- /* fall through */
- default:
- perror (dev);
- }
- errno=save_errno;
- return 1;
- }
- return 0;
+ if ((rc = ioctl (fd, RUN_ARRAY, (unsigned long)param))) {
+ save_errno=errno;
+ switch (save_errno) {
+ case EBUSY:
+ fprintf(stderr,"%s: already running\n", dev);
+ break;
+ case EINVAL:
+ fprintf(stderr, "Error: EINVAL\n");
+ fprintf(stderr, "Request or argp is not valid.\n");
+ fprintf(stderr, "Are you *SURE* you compiled raid into the kernel, and loaded it?\n");
+ break;
+ /* fall through */
+ default:
+ perror (dev);
+ }
+ errno=save_errno;
+ return 1;
+ }
+
+ return 0;
}
static int do_mdstart (int fd, char *dev, dev_t rdev) {
int rc;
next reply other threads:[~2003-02-25 13:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-25 13:49 Florian Schanda [this message]
2003-02-25 14:31 ` [Small Patch] for raidlib.c in raidtools-1.00.3 Stephen Lee
2003-02-25 18:04 ` Florian Schanda
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=200302251349.57326.ma1flfs@bath.ac.uk \
--to=ma1flfs@bath.ac.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox