1 diff -urN busybox-1.00-pre2.org/include/applets.h busybox-1.00-pre2/include/applets.h
2 --- busybox-1.00-pre2.org/include/applets.h 2003-08-02 23:46:48.000000000 +0200
3 +++ busybox-1.00-pre2/include/applets.h 2003-08-03 00:32:31.000000000 +0200
6 APPLET(pwd, pwd_main, _BB_DIR_BIN, _BB_SUID_NEVER)
8 +#ifdef CONFIG_RAID_START
9 + APPLET(raid_start, raid_start_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
12 APPLET(rdate, rdate_main, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)
14 diff -urN busybox-1.00-pre2.org/sysdeps/linux/defconfig busybox-1.00-pre2/sysdeps/linux/defconfig
15 --- busybox-1.00-pre2.org/sysdeps/linux/defconfig 2003-08-02 23:46:49.000000000 +0200
16 +++ busybox-1.00-pre2/sysdeps/linux/defconfig 2003-08-03 00:32:31.000000000 +0200
18 # CONFIG_FEATURE_USE_DEVPS_PATCH is not set
20 # CONFIG_FEATURE_MOUNT_FORCE is not set
24 # Common options for mount/umount
25 diff -urN busybox-1.00-pre2.org/util-linux/Config.in busybox-1.00-pre2/util-linux/Config.in
26 --- busybox-1.00-pre2.org/util-linux/Config.in 2003-08-02 23:46:49.000000000 +0200
27 +++ busybox-1.00-pre2/util-linux/Config.in 2003-08-03 00:32:31.000000000 +0200
29 NFS filesystems. Most people using BusyBox will also want to enable
32 +config CONFIG_RAID_START
36 + Enable support for RAID starting.
38 config CONFIG_NFSMOUNT
39 bool " Support mounting nfs file systems"
41 diff -urN busybox-1.00-pre2.org/util-linux/Makefile.in busybox-1.00-pre2/util-linux/Makefile.in
42 --- busybox-1.00-pre2.org/util-linux/Makefile.in 2003-08-02 23:46:49.000000000 +0200
43 +++ busybox-1.00-pre2/util-linux/Makefile.in 2003-08-03 00:32:31.000000000 +0200
45 UTILLINUX-$(CONFIG_MKSWAP) += mkswap.o
46 UTILLINUX-$(CONFIG_MORE) += more.o
47 UTILLINUX-$(CONFIG_MOUNT) += mount.o
48 +UTILLINUX-$(CONFIG_RAID_START) += raid_start.o
49 UTILLINUX-$(CONFIG_NFSMOUNT) += nfsmount.o
50 UTILLINUX-$(CONFIG_PIVOT_ROOT) += pivot_root.o
51 UTILLINUX-$(CONFIG_RDATE) += rdate.o
52 diff -urN busybox-1.00-pre2.org/util-linux/raid_start.c busybox-1.00-pre2/util-linux/raid_start.c
53 --- busybox-1.00-pre2.org/util-linux/raid_start.c 1970-01-01 01:00:00.000000000 +0100
54 +++ busybox-1.00-pre2/util-linux/raid_start.c 2003-08-03 00:34:47.000000000 +0200
56 +/* vi: set sw=4 ts=4: */
58 + * raid_start implementation for busybox
60 + * Copyright (C) 2003 by Michal Moskal <malekith@pld-linux.org>
62 + * This program is free software; you can redistribute it and/or modify
63 + * it under the terms of the GNU General Public License as published by
64 + * the Free Software Foundation; either version 2 of the License, or
65 + * (at your option) any later version.
67 + * This program is distributed in the hope that it will be useful,
68 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
69 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
70 + * General Public License for more details.
72 + * You should have received a copy of the GNU General Public License
73 + * along with this program; if not, write to the Free Software
74 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
78 +#include <sys/types.h>
79 +#include <sys/stat.h>
80 +#include <sys/ioctl.h>
87 +#define START_ARRAY _IO (MD_MAJOR, 0x31)
89 +extern int raid_start_main(int argc, char **argv)
100 + fd_md = open(argv[1], O_RDWR, 0);
102 + bb_perror_msg_and_die("error opening raid device `%s'", argv[1]);
104 + for (i = 2; i < argc; i++) {
105 + if (stat(argv[i], &st)) {
106 + bb_perror_msg("error stating raid builing device `%s'", argv[i]);
110 + if (ioctl(fd_md, START_ARRAY, (unsigned long) st.st_rdev) == -1) {
111 + bb_perror_msg("error starting raid device `%s:%s'", argv[1], argv[i]);
123 +c-file-style: "linux"