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 Wed 20 Aug 2014, 00:59
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 Posts_count_1  
Author Message
B.K. Johnson

Joined: 12 Oct 2009
Posts: 106

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:   Sort by:   
Page 1 of 1 Posts_count_1  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » REQUESTS
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


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