Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 23 Oct 2014, 11:09
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » REQUESTS
Map device serial number to device names
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message
B.K. Johnson

Joined: 12 Oct 2009
Posts: 141

PostPosted: Thu 28 Jun 2012, 00:00    Post subject:  Map device serial number to device names  

All 3 USB ports on my computer are in use all the time and 2 are so close that a slight jiggle, a touch of one means a new device assignment in ascending order. This can be catastrophic in the midst of a download. Communications software that allows downloads to be resumed and completed after disconnection is nullified because of the changed destination.

In Windows, I once knew how to obtain the device type and serial number for each connected device. Is there a way to obtain same from puppy/Linux? If so, I have an idea for a pet that may perk someone's interest. Let's say the pet would be called lockdrives. When called/run it would obtain the serial number of each mounted drive, the assigned device name it is mapped to and set a flag (DRIVELOCK). The existing routine that polls the ports and assigns a new device name would check DRIVELOCK and if set, check if the serial number of the newly plugged in drive matches that which was locked. If they match, then reassign the old device name to the drive.

The pet and DRIVELOCK flag may not be even necessary. Just add/modify the existing code to read, log and map serial numbers and device name at boot and when a port is populated. When a drive is added, compare its serial number with that of the last resident. If it matches, then reassign the same device name. If different, do what is done now - assign the next higher number for the device type and update the device table.

Any comments? Any takers?
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [1 Post]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » REQUESTS
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0365s ][ Queries: 11 (0.0036s) ][ GZIP on ]