summaryrefslogtreecommitdiffstats
path: root/release/sysinstall
diff options
context:
space:
mode:
Diffstat (limited to 'release/sysinstall')
-rw-r--r--release/sysinstall/Makefile4
-rw-r--r--release/sysinstall/install.c2
-rw-r--r--release/sysinstall/main.c3
-rw-r--r--release/sysinstall/sysinstall.h3
-rw-r--r--release/sysinstall/usb.c44
5 files changed, 53 insertions, 3 deletions
diff --git a/release/sysinstall/Makefile b/release/sysinstall/Makefile
index 3e9dc68..9074ad2 100644
--- a/release/sysinstall/Makefile
+++ b/release/sysinstall/Makefile
@@ -14,8 +14,8 @@ SRCS= anonFTP.c cdrom.c command.c config.c devices.c dhcp.c kget.c \
ftp.c globals.c http.c index.c install.c installUpgrade.c keymap.c \
label.c lndir.c main.c makedevs.c media.c menus.c misc.c mouse.c \
msg.c network.c nfs.c options.c package.c pccard.c \
- system.c tape.c tcpip.c termcap.c ufs.c user.c variable.c wizard.c \
- keymap.h
+ system.c tape.c tcpip.c termcap.c ufs.c usb.c user.c variable.c \
+ wizard.c keymap.h
CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog -I${.OBJDIR}
.if ${MACHINE_ARCH} != "i386" || defined(X_AS_PKG)
diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c
index da56363..db5719e 100644
--- a/release/sysinstall/install.c
+++ b/release/sysinstall/install.c
@@ -608,7 +608,7 @@ nodisks:
#endif /* notyet */
dialog_clear_norefresh();
- if (!msgYesNo("Does this system have a mouse attached to it?"))
+ if (!msgYesNo("Does this system have a non-USB mouse attached to it?"))
dmenuOpenSimple(&MenuMouse, FALSE);
/* Now would be a good time to checkpoint the configuration data */
diff --git a/release/sysinstall/main.c b/release/sysinstall/main.c
index 885b6cb..1fde541 100644
--- a/release/sysinstall/main.c
+++ b/release/sysinstall/main.c
@@ -90,6 +90,9 @@ main(int argc, char **argv)
/* Initialize PC-card */
pccardInitialize();
+ /* Initialize USB */
+ usbInitialize();
+
/* Probe for all relevant devices on the system */
deviceGetAll();
diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h
index 815ca4a..b3e6494 100644
--- a/release/sysinstall/sysinstall.h
+++ b/release/sysinstall/sysinstall.h
@@ -733,6 +733,9 @@ extern void mediaShutdownUFS(Device *dev);
extern Boolean mediaInitUFS(Device *dev);
extern FILE *mediaGetUFS(Device *dev, char *file, Boolean probe);
+/* usb.c */
+extern void usbInitialize(void);
+
/* user.c */
extern int userAddGroup(dialogMenuItem *self);
extern int userAddUser(dialogMenuItem *self);
diff --git a/release/sysinstall/usb.c b/release/sysinstall/usb.c
new file mode 100644
index 0000000..4eedbd5
--- /dev/null
+++ b/release/sysinstall/usb.c
@@ -0,0 +1,44 @@
+/*
+ * USB support for sysinstall
+ *
+ * $FreeBSD$
+ *
+ * Copyright (c) 2000 John Baldwin <jhb@FreeBSD.org>. All rights reserved.
+ *
+ * This software may be used, modified, copied, and distributed, in
+ * both source and binary form provided that the above copyright and
+ * these terms are retained. Under no circumstances is the author
+ * responsible for the proper functioning of this software, nor does
+ * the author assume any responsibility for damages incurred with its
+ * use.
+ */
+
+#include "sysinstall.h"
+#include <sys/fcntl.h>
+#include <sys/time.h>
+
+void
+usbInitialize(void)
+{
+ int fd;
+ WINDOW *w;
+
+ if (!RunningAsInit && !Fake) {
+ /* It's not my job... */
+ return;
+ }
+
+ if ((fd = open("/dev/usb", O_RDONLY)) < 0) {
+ msgDebug("Can't open USB controller.\n");
+ return;
+ }
+ close(fd);
+
+ w = savescr();
+ msgNotify("Initializing USB controller....");
+
+ variable_set2("usbd_enable", "YES", 1);
+
+ vsystem("/stand/usbd");
+ restorescr(w);
+}
OpenPOWER on IntegriCloud