Subject: Re: [New to NetBSD] USB mass-storage hotplug?
To: Sylvain Briole <sbriole.mls@free.fr>
From: Hauke Fath <hf@spg.tu-darmstadt.de>
List: netbsd-users
Date: 06/24/2005 11:13:53
Am 23.06.2005 um 15:00 Uhr +0000 schrieb Sylvain Briole:
>I have read USB manpages (usb(4), umass(4)) on NetBSD 2.0.2, but I
>did not find out how to use "hotplug".
There is no daemon in NetBSD that handles USB hot-plugging events,
afaik. The closest thing to hot-plugging support of storage devices
is using amd(8) with a map like what we use here:
# $Id: amd.media,v 1.12 2005/05/11 11:39:29 hf Exp $
#
# /media - mount local removable media (CDROMs,floppy, USB stick)
# by cd'ing into it: cd /media/cd0
# Unmount by typing "amq -u /media/cd0" etc.
#
# ICK: The am-utils that ship with RH-Linux do not support 'pcfs'.
/defaults opts:=nosuid,nodev
# CDROM drives
cd0 -type:=cdfs;addopts:=ro,defperm \
os==netbsd2;dev:=/dev/cd0a \
os==linux;dev:=/dev/cdrom
cd1 -type:=cdfs;addopts:=ro,defperm \
os==netbsd2;dev:=/dev/cd0a \
os==linux;dev:=/dev/cdrom1
# Floppy Disc
floppy -addopts:=rw \
os==netbsd2;type:=pcfs;dev:=/dev/fd0a \
os==linux;type:=pcfs;dev:=/dev/fd0
# USB Memory Sticks (depends on partitioning)
stick0 -addopts:=rw \
os==netbsd2;type:=pcfs;dev:=/dev/sd0d \
os==linux;type:=pcfs;dev:=/dev/sda
stick1 -addopts:=rw \
os==netbsd2;type:=pcfs;dev:=/dev/sd0e \
os==linux;type:=pcfs;dev:=/dev/sda1
stick2 -addopts:=rw \
os==netbsd2;type:=pcfs;dev:=/dev/sd0f \
os==linux;type:=pcfs;dev:=/dev/sda1
HTH,
hauke
--
/~\ The ASCII Ribbon Campaign Hauke Fath
\ / No HTML/RTF in email Institut für Nachrichtentechnik
X No Word docs in email TU Darmstadt
/ \ Respect for open standards Ruf +49-6151-16-3281