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
--- 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;