[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Discover 2.x brief tutorial



[Branden Robinson]
> The bad news is that there is no way to *exactly* duplicate the
> output of the Discover 1.x command you specified.  Perhaps with some
> enhancement to the discover(1) program, this will be possible.

A format option for discover2 would be most welcome.  Is there any
hope of such option appearing anytime soon?

If I understand you correctly, I can change the output from discover1
to not output vendor and card info, but instead only output the name
of the device like this (Changing '%V\t%M' to '%V %M'):

  /sbin/discover --format="%m\t%V %M\n" \
             --disable-all --enable=pci,ide,scsi,pcmcia scsi cdrom

This output seems easier to get from discover2.  Using ideas from
xfree86, I get the following code:

  dpath=linux/module/name
  dver=2.4 # Kernel version
  dflags="-t -d all -e ata -e pci -e pcmcia -e scsi display"
  VENDOR_MODEL_FILE=$(tempfile)
  DRIVER_FILE=$(tempfile)
  discover --type-summary $dflags > $VENDOR_MODEL_FILE
  discover --data-path=$dpath --data-version=$dver $dflags > $DRIVER_FILE
  paste $VENDOR_MODEL_FILE $DRIVER_FILE
  rm -f $VENDOR_MODEL_FILE $DRIVER_FILE

I believe I lost the 'scsi' and 'cdrom' options in the transformation,
but I am not sure if it is important to have it, if the default of
discover2 is to display all devices.

I have no test setup for discover2, so I was unable to test this.  Can
anyone verify that I am moving in the right direction?



Reply to: