DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 6th July 2008
spiderpig spiderpig is offline
Port Guard
 
Join Date: May 2008
Posts: 29
Default identifying device associated with USB device?

I'm writing a shell script which will copy files over to a USB flash drive. Other than grep the output of dmesg, is there any other way to determine what device node is attached to a USB device? It appears that usbdevs doesn't help either.

Any insight would be appreciated. Thanks.
Reply With Quote
  #2   (View Single Post)  
Old 6th July 2008
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

Before I plug in my USB external disk
Code:
$ sysctl hw.disknames
hw.disknames=wd0,wd1,cd0,fd0
After plugging in
Code:
]sysctl hw.disknames
hw.disknames=wd0,wd1,cd0,fd0,sd0
This is what dmesg reports
Code:
umass0 at uhub0 port 4 configuration 1 interface 0
umass0: Prolific Technology Inc. Mass Storage Device, rev 2.00/1.00, addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets
sd0 at scsibus1 targ 1 lun 0: <HTS42404, 0M9AT00, MA2O> SCSI0 0/direct fixed
sd0: 38154MB, 4864 cyl, 255 head, 63 sec, 512 bytes/sec, 78140160 sec total
Don't know what is easier to parse
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #3   (View Single Post)  
Old 7th July 2008
spiderpig spiderpig is offline
Port Guard
 
Join Date: May 2008
Posts: 29
Default

Quote:
Originally Posted by J65nko View Post
Don't know what is easier to parse
Thanks, J65nko! I ended up going a different route, but I had forgotten about poking about the sysctl variables. I won't be likely to forget next time.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW do I ENABLE the wireless device?? bforest FreeBSD General 2 30th January 2009 05:54 PM
tun device zomo OpenBSD General 24 23rd September 2008 11:19 PM
device name qmemo OpenBSD General 2 4th September 2008 11:51 PM
dd: end of device ebzzry FreeBSD General 17 26th August 2008 12:18 AM
fstab and CD/DVD device corneliu FreeBSD General 7 24th May 2008 02:11 AM


All times are GMT. The time now is 10:24 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick