Difference between revisions of "Parse usbscsi"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
m
m
 
Line 2: Line 2:
 
'''/usr/bin/parse_usbscsi''' is a proprietary [[w:Melco|Buffalo]] binary tool which is part of the stock [[LS2]] firmware (and probably other LinkStations). Buffalo has not released the source code of the binary, and has apparently no intention to do this.
 
'''/usr/bin/parse_usbscsi''' is a proprietary [[w:Melco|Buffalo]] binary tool which is part of the stock [[LS2]] firmware (and probably other LinkStations). Buffalo has not released the source code of the binary, and has apparently no intention to do this.
  
The tool is used as part of the script which is supposed to [[Murasaki LinkStation's USB hot-plugging system| mount hot-plugged storage devices]]. It is supposed to identify the device name of hot-plugged storage devices. Unfortunately it likes to fail to e.g. identify memory cards. Further, it is rather strange that for this small task [[Buffalo]] decided to build a binary, while the following three lines of trivial scripting code does the same:
+
The tool is used as part of the script which is supposed to [[Murasaki LinkStation's USB hot-plugging system| mount hot-plugged storage devices]]. It is supposed to identify the device name of hot-plugged storage devices. Unfortunately it likes to fail to e.g. identify memory cards. Further, it is rather strange that for this small task [[w:Melco|Buffalo]] decided to build a binary, while the following three lines of trivial scripting code does the same:
  
 
  awk '$1 ~ /Host/ && $3 ~ /usb-storage/ {
 
  awk '$1 ~ /Host/ && $3 ~ /usb-storage/ {
 
           printf "/dev/sd%c\n", substr($2, 5, length($2) - 5) + 97
 
           printf "/dev/sd%c\n", substr($2, 5, length($2) - 5) + 97
 
  }' /proc/scsi/usb-storage-*/*
 
  }' /proc/scsi/usb-storage-*/*

Latest revision as of 00:33, 4 February 2007

/usr/bin/parse_usbscsi is a proprietary Buffalo binary tool which is part of the stock LS2 firmware (and probably other LinkStations). Buffalo has not released the source code of the binary, and has apparently no intention to do this.

The tool is used as part of the script which is supposed to mount hot-plugged storage devices. It is supposed to identify the device name of hot-plugged storage devices. Unfortunately it likes to fail to e.g. identify memory cards. Further, it is rather strange that for this small task Buffalo decided to build a binary, while the following three lines of trivial scripting code does the same:

awk '$1 ~ /Host/ && $3 ~ /usb-storage/ {
          printf "/dev/sd%c\n", substr($2, 5, length($2) - 5) + 97
}' /proc/scsi/usb-storage-*/*