2004-02-26  Martin Schwenke  <martins@rover>

	* lsvpd.spec.in: Added INSTALL to %doc.

	* .distfiles: Added INSTALL, docs/text-short.xsl.

	* docs/Makefile: Added ../INSTALL.

	* docs/install.xml: Added "basics" section.

2004-02-25  Martin Schwenke  <martins@rover>

	* .distfiles: Added setup/scan.d/27device_scsi_sysfs.

	* Makefile: Bumped version to 0.11.5.

	* setup/lscfg.d/40ibm,vpd:
	In dt_handle_specials, moved where a newline is inserted into VPD.
	Empty "VPD" would have a newline added, and it would no longer be
	empty, so "VPD" containing only a single newline was sometimes
	printed.

	* lscfg.in:
	Fixed a minor formatting glitch: there wasn't a blank line before VPD
	(but there is in AIX lscfg).

2004-02-19  Martin Schwenke  <martins@rover>

	* setup/scan.d/30device-tree:
	In do_adapter_DEFAULT, override RM in existing $vpdprop.

	* Makefile: Bumped version to 0.11.4.

	* setup/query.d/00minimal:
	In get_model_basic, only get first matching line from cpuinfo.

	* setup/scan.d/30device-tree:
	In do_adapter_DEFAULT, override RM in the parent node for a
	multi-channel adapter.

	* .distfiles: Replaced setup/scan.d/07device_scsi_sg with
	setup/scan.d/07device_scsi_sg_{inq,scan}.

	* setup/scan.d/30device-tree:
	In do_adapter_DEFAULT, added rl and rm to list of variables that
	do_adapter_hook may set.  do_adapter_hook_scsi now calls
	get_adapter_firmware_version to try and set rm.

	* setup/scan.d/03adapter_ide_proc:
	do_adapter_ide explicitly unsets rl and rm, just in case they are
	bound in a calling function.

	* setup/scan.d/20sysfs:
	do_adapter_DEFAULT also declares local variable rl, just in case it is
	bound in a calling function.

	* setup/scan.d/00minimal:
	print_adapter_vpd_hook now prints fields for RL and RM if
	corresponding variables are set.  New stub function
	get_adapter_firmware_version.  New function add_field factored out of
	ensure_field - add_field also used by new function override_field.

	* setup/scan.d/20sysfs:
	In do_adapter_DEFAULT, add local variable "rm" before call of
	do_adapter_hook, and use override_field on RM for existing linux,vpd
	file.  New functions get_adapter_firmware_version and
	sysfs_get_class_attribute to support retrieving firmware version with
	ips SCSI driver.  sysfs_get_node now caches a link to the sysfs device
	node and the sysfs class node (if available) - the former is an
	optimisation, and the latter is used to support
	sysfs_get_class_attribute.

2004-02-18  Martin Schwenke  <martins@rover>

	* scsi/scsivpd.conf: Added ZM field for ST314* IBM disks.

	* setup/scan.d/07device_scsi_sg_scan:
	Renamed from 07device_scsi_sg.  Moved all sg_inq-related code to
	07device_scsi_sg_inq.

	* setup/scan.d/07device_scsi_sg_inq, setup/scan.d/27device_scsi_sysfs:
	New file.

	* lib/lsvpd-functions.bash:
	readlink now uses a bash string operation instead of sed.

2004-02-17  Martin Schwenke  <martins@rover>

	* lsmcode.in:
	In render_dev, use bash string substitution rather than sed to remove
	"/dev/" prefix.

	* lscfg.in:
	Removed alternative implementation of function fill_field (I just
	wanted to check it in before deleting it :-).

	* lscfg.in:
	New function fill_field implements generic filling/wrapping of field
	values.  New function formatvpd factors out formatting of VPD items,
	instead of requiring details to be hard-coded.  In print_item, allow
	filling before DS field and also use fill_field to fill DS value.  In
	printheader, removed old unused cases.  In formatvpdline, use new
	function formatvpd to do the formatting, instead of hardcoding it.  In
	printdev, use bash string substitution rather than sed to remove
	"/dev/" prefix.

	* setup/lscfg.d/30device-tree:
	In dt_platform_specific_vpd_line, use function formatvpd instead of
	hardcoding format.

	* setup/lscfg.d/40ibm,vpd:
	In dt_handle_specials, call formatvpdline instead of hardcoding the
	formatting.

2004-02-16  Martin Schwenke  <martins@rover>

	* pci/pci_vpd_to_txt.c:
	In function parse_uleshort_len, parse the bytes one at a time to avoid
	possible alignment issue.

	* pci/ibm_vpd_render.c:
	In function ibm_vpd_to_txt, read the 4 bytes in big-endian length one
	at a time in a loop to avoid possible alignment problem.

2004-01-22  Martin Schwenke  <martins@rover>

	* scsi/scsivpd.conf:
	For generic IBM disks, wildcard IBM* to catch things like IBM-PSG and
	IBM-ESXS.

2004-01-20  Martin Schwenke  <martins@rover>

	* lsvpd_test.in: Now always creates db-*.tgz.

2004-01-19  Martin Schwenke  <martins@rover>

	* setup/scan.d/07device_ide_proc:
	In do_device_ide, added manufacturers AOpen and Ricoh.

2004-01-13  Martin Schwenke  <martins@rover>

	* docs/lscfg.xml: Added 2004 to copyright.

	* docs/lscfg.xml:
	Fixed documentation for -p and -l to reflect improvements.

	* Makefile: Bumped version to 0.11.2.

	* setup/lscfg.d/30device-tree:
	dt_platform_specific_node is now wrapped in
	dt_platform_specific_node_maybe, which also takes over setting certain
	variables, which are then passed as parameters instead of being
	recomputed.  dt_platform_specific_node_maybe respects $name, so only
	items with AX matching $name are printed (except for "mem*", which is
	a special case, and causes all memory modules to be displayed).
	dt_platform_specific_node respects $dovpd and, in any case, will now
	only produce VPD if there is no AX field.  The reasoning here is that
	the VPD should have been printed in the configurations section above.
	Printing of "PLATFORM SPECIFIC" heading moved from
	do_platform_specific_section moved to dt_platform_specific_node, and
	is now only done when first item is printed.  Filtering of "memory@*"
	case moved from do_platform_specific_section moved to
	dt_platform_specific_node_maybe.

	* setup/lscfg.d/40ibm,vpd: In do_post_items, always produce mem0 item.

	* lscfg.in:
	Removed -t (test) option.  I don't believe anyone was using it, and it
	provided such a small subset of functionality that it was no longer
	useful.  In printitem, prefix is a space also if $systemspecific or
	"$name" is set.  In xlatevpd, printerheader is only called is $name is
	empty.  do_platform_specific_section is called even if $dovpd is false.

	* setup/scan.d/00minimal:
	In render_ibm_vpd, filter out empty lines or those that contain
	non-printables.

2004-01-09  Martin Schwenke  <martins@rover>

	* setup/scan.d/07device_scsi_sg_scan:
	In list_devices_scsi, declare i as an integer.

	* setup/scan.d/20sysfs:
	In sysfs_get_node replace an invocation of sed with a bash string
	substitution.

	* setup/scan.d/03adapter_ide_proc:
	In do adapter_ide: removed redundant debug statement, simplified
	vendor/device retrieval/parsing (sed no longer required), reading of
	channel.  In get_pci_info_ide simplified retrieval/parsing instead of
	using sed.

	* setup/scan.d/07device_ide_proc:
	Minor cleanups in list_devices_ide and do_device_ide.

	* setup/scan.d/00minimal:
	Fixed buglet in (currently) unused code in get_pci_config_filename.
	Optimised get_bus_dev_fun_irq_class_list - no more sed.  Cleaned up
	extraction of the bus# in get_real_bus, and also declared variable n
	as an integer.  Fixed typo in comment at top of
	adapter_set_ax_osname_hook.  In adapter_set_ax_osname_hook, removed
	dead code referring to linux,adapter-name file and replaced use of sed
	with bash string substitution.  In get_dot_dots, replaced == with = in
	1 place for consistency.

	* setup/scan.d/01adapter_fibre_defs:
	Made fibre channel look like SCSI, since that's the way Linux treats
	it.

2004-01-08  Martin Schwenke  <martins@rover>

	* .distfiles: Removed sg3_utils-1.00.sginq-raw.patch.

	* scsi/scsi_vpd_custom.c.in, scsi/scsi_vpd_common.h, scsi/scsi_vpd_common.c, pci/pci_vpd_to_txt.h, pci/pci_vpd_to_txt.c, pci/pci_vpd_gen_grab.h, pci/pci_vpd_gen_grab.c, pci/pci_vpd_cap_grab.c, pci/pci_lookup.c, pci/ibm_vpd_render.c, lib/util.h, lib/util.c, lib/test_growbuf.c, lib/tdump.c, lib/lsvpd-functions.bash, lib/growbuf.h, lib/growbuf.c:
	Fixed copyright/license header.

2004-01-07  Martin Schwenke  <martins@rover>

	* lsvpd_test.in:
	Run lsvpd with -m, because this tests more functionality.  Change
	lsvpd output file accordingly.

	* setup/scan.d/07device_scsi_sg_scan:
	device_setup_scsi, list_devices_scsi and scsi_vpd_inquire now use
	debug_cmd instead of redirecting stderr to /dev/null.

	* setup/scan.d/07device_scsi_sg_scan:
	In list_devices_scsi, ignore error messages and filter out lines that
	don't look like device nodes.

	* Makefile: Bumped version.

	* docs/lsvpd.xml: Documented -m option.

	* setup/scan.d/00minimal:
	New function do_fc_field produced marked FC field depending on given
	directory.  render_ibm_vpd now calls do_fc_field and filters output
	from ibm_vpd_render accordingly.  print_adapter_vpd_hook now calls
	do_fc_field too, and depends upon $node being available.

	* setup/scan.d/07device_scsi_sg_scan:
	Function scsi_vpd_render now takes a 2nd argument ($vpdprop) and uses
	a single, grouped redirection to write the output to the file, and
	uses do_fc_field to produce the FC field.  Removed some redundant
	debug statements.  Fixed and updated copyright header.

	* setup/scan.d/07device_ide_proc:
	In function do_device_ide, use do_dc_field to produce the FC field;
	also grouped output statements and now use a single redirection to
	write to $vpdprop.

	* lsvpd.in:
	Added -m option to mark VPD as global or partition specific.  Added
	code to unmark marked VPD if we're not marking.

	* docs/lsvpd.xml:
	Fixed synopsis.  Had "-s" (again), not "-t".  Added 2004 to copyright.

2004-01-06  Martin Schwenke  <martins@rover>

	* lsvpd_test.in:
	Moved package determination code so it is only run if we're sending
	email.

	* debian/changelog.in: New file.

	* lsvpd.spec.in: Updated description.

	* Makefile: Added lsvpd_test.  Added generation of lsvpd.spec and
	debian/changelog.  Files built from *.in files now use a generic rule.

	* setup/scan.d/30device-tree:
	Fixed typo in do_device_scsi_hook that was cauing SCSI devices
	attached to a multi-channel adapter to appear in the directory for the
	adapter rather than in the subdirectories for the channels.

	* .distfiles:
	Renamed debian/changelog to debian/changelog.in, so debian/changelog
	is now generated, including the version.

	* lsvpd.spec.in:
	Renamed to lsvpd.spec.in, so lsvpd.spec is now generated, including
	the version.

	* .distfiles: Added lsvpd.spec.in.

	* setup/query.d/30device-tree, setup/query.d/00minimal, setup/lscfg.d/30device-tree, setup/common.d/00minimal:
	Added 2004 to copyright.

	* docs/design.xml: Year is now 2004.

	* lsmcode.in, lscfg.in, lsvpd.in: Added 2004 to copyright.

	* lsvpd_test.in: Oops, that's copyright 2004.

	* README: New file.

	* lsvpd_test.in: Added an attempt to include packaging information.

	* docs/design.xml:
	Added information about lsmcode, query.d and lsmcode.d directories,
	and the database structure.

2004-01-05  Martin Schwenke  <martins@rover>

	* lsvpd_test.in: New file.

	* .distfiles: Added lsvpd_test.in.

	* .distfiles: Added setup/scan.d/01adapter_fibre_defs.

	* setup/scan.d/01adapter_fibre_defs: New file.

	* lib/lsvpd-functions.bash:
	Sanity check in unpack_device_tree_archive now works on new databases
	by checking for bus subdirectory.

	* lsmcode.in:
	Added sourcing of files from query.d to function do_setup, along with
	new loop to make it look neater.

	* lscfg.in: Changed do_setup to use a loop to make it look neater.

	* lsvpd.in:
	Added sourcing of files from query.d to function do_setup, along with
	new loop to make it look neater.

	* lscfg.in: Added sourcing of files from query.d to function do_setup.

	* .distfiles:
	Moved setup/common.d/30device-tree to setup/query.d/30device-tree,
	added new file setup/common.d/00minimal.

	* setup/query.d/30device-tree: New file.

	* setup/common.d/00minimal:
	Moved functions ensure_db, list_linux_vpd_files_all, get_model,
	get_serial, get_model_basic, get_serial_basic, stripkey to
	../query.d/00common.

	* setup/query.d/00minimal: New file.

	* setup/Makefile: Added query.d.

2003-12-23  Martin Schwenke  <martins@rover>

	* lsmcode.in:
	Moved setup code to new function do_setup, which is called at
	appropriate place.

	* setup/scan.d/30device-tree:
	Unset do_adapter_hook_ide, not do_adapters_hook_ide.

	* setup/scan.d/30device-tree:
	Function db_initialise renamed to db_initialise_bus.  In
	list_db_adapters, dt_find_adapter, manufacture_yl, use $db_bus_dir
	instead of $db.  In function match_adapter, rename variables for
	consistency (i.e. use bus_dir and os_dir), and use new function
	cross_link instead of creating files with directory names in them.
	Removed function dt_find_scsi_node.  Factored as much functionality as
	possible out of do_device_hook_scsi and do_device_hook_ide into new
	functions dt_do_device_hook_common and dt_do_device_hook_post.  In
	do_adapter_DEFAULT use function ensure_field instead of ensure_ax. In
	various places use $db_bus_dir instead of $db.  In dt_do_adapter_fake,
	use bash string substitutions instead of sed.  Removed function
	ensure_ax - functionality moved to ensure_field in 00common.

	* lsvpd.in:
	New function do_setup does setup and is called late enough for things
	to work properly.

	* .distfiles: Added setup/common.d/30device-tree.

	* setup/scan.d/07device_ide_proc:
	In do_device_ide, use dirname instead of sed.

	* setup/scan.d/20sysfs:
	Simplified functions match_adapter, do_device_hook_scsi,
	do_device_hook_ide, sysfs_do_device_hook_common by using generic
	cross_link function.  Fixed bug in do_adapter_DEFAULT where old
	variable sysfs_node was referenced.

	* setup/scan.d/00minimal:
	New functions cross_link, get_dot_dots, pseudo_realpath.

	* lib/lsvpd-functions.bash:
	Reimplemented dirname and basename using bash substitutions.

2003-12-22  Martin Schwenke  <martins@rover>

	* lscfg.in: Setup stage done after pointing to database.

	* setup/common.d/00minimal:
	Only set $db if it is not already set.  This is necessary for the ls*
	commands, since they may be pointing to a different database and
	the setup process should respect this.

	* tidy_device_trees.in:
	Tidy directories that look like db-* too.  Fix copyright header.

	* setup/lscfg.d/00minimal:
	Function get_cpus_basic uses new location of cpuinfo in $db_proc_dir.
	get_architecture now uses $db_uname_dir/machine for default value.
	Fixed copyright header.

	* setup/lscfg.d/40ibm,vpd:
	Use $db_bus_dir, not $db.  Fixed copyright header.

	* setup/scan.d/07device_ide_proc:
	In function do_device_ide, added manufacturer "Lite-On".  Fixed
	copyright header.

	* setup/scan.d/05adapter_ethernet_ethtool:
	Fixed debug messages.  Fixed copyright header.

	* setup/scan.d/40ibm,vpd:
	Replaced function db_initialise with new function
	db_initialise_ibm_vpd and add this to $db_initialise_functions.
	Serial and model numbers now go to files in $db_misc_dir.  Fixed
	copyright header.  db_initialise_ibm_vpd now uses factored
	functionality in new functions render_ibm_vpd and ensure_field.

	* setup/scan.d/00minimal:
	Fixed typo in render_ibm_vpd - variable is $dir, not $d.

	* setup/scan.d/30dmidecode:
	Replaced function db_initialise with new function
	db_initialise_dmidecode and add this to $db_initialise_functions.
	Serial and model numbers now go to files in $db_misc_dir.  Fixed
	copyright header.

	* setup/scan.d/03adapter_ethernet_ifconfig, setup/scan.d/10devfs:
	Fixed copyright header.

	* setup/scan.d/03adapter_scsi_proc:
	Use $db_scsi_dir instead of $scsidir.  Function list_os_adapters_scsi
	now uses glob-expansion instead of find.  Function scsi_host_pci_info
	now stored PCI in $db_scsi_dir/host*/pci-data.  Function
	get_pci_info_scsi now assigned new location for storing pci-data to a
	variable to ensure consistency.  Fixed copyright header.

	* setup/scan.d/01adapter_ide_defs: Added get_pci_class_ide.

	* setup/scan.d/20sysfs:
	New functions db_initialise_bus, db_initialise_sysfs,
	get_pci_config_filename.  db_initialise_sysfs copies information from
	sysfs and also attempts to gather PCI-2.2-style VPD.  Function
	get_pci_info reimplemented.  Function list_os_adapters_DEFAULT now has
	sanity check on variable values.  Function match_adapter now builds
	symlinks in both directions and has horrible special case for IDE.
	list_db_adapters is more complex due to added functionality.  Function
	do_adapter_DEFAULT no longer uses $sysfs_node, since $node contains
	all of the relevant files.  do_adapter_DEFAULT no longer overwrites an
	existing linux,vpd file, but ensures that it contains both AX and YL
	fields.  Functions do_adapter_hook_scsi and do_adapter_hook_ethernet
	are now correctly unset, so locally defined do_adapter_hook_DEFAULT is
	used.  do_adapter_hook_DEFAULT and do_adapter_hook_ide now use part of
	$node to get YL, instead of calling a complicated function.
	do_device_hook_scsi and do_device_hook_ide now call new function
	sysfs_do_device_hook_common, mosty to accomplish cross-linking of the
	OS-specific and bus directories.  Function sysfs_get_adapter_class
	gratuitously reformatted.  Function pcistring2info now uses bash
	substitution instead of sed.  Function sysfs_get_pci_string renamed to
	sysfs_get_bus_string and now returns a value prefixed with either
	"pci:" or "pseudo:".  Function sysfs_do_pci_adapter_hook now uses
	$node, not $sysfs_node, and also uses bash variable substitutions
	where possible instead of sed.  New function sysfs_get_pci_class.

	* setup/scan.d/07device_scsi_sg_scan:
	Removed variable scsidir.  Relevant data is now stored in
	db/linux/scsi.  Function do_device_scsi no longer stored information
	in devfs-style subdirectory under /var/lib/lsvpd - now in, for
	example, db/linux/host0/sda/tmp.  sg_map-x now lives in $db_misc_dir.

	* setup/lscfg.d/30device-tree:
	Use $db_bus_dir in most places instead of $db.  Fixed copyright header.

	* setup/common.d/30device-tree: New file.

	* setup/scan.d/00minimal:
	Function db_initialise now calls functions listed in
	$db_initialise_functions.  New functions db_initialise_bus,
	db_initialise_basic, db_initialise_misc, db_initialise_misc_uname,
	db_initialise_misc_proc, get_pci_config_filename, render_ibm_vpd,
	do_pci22_vpd.  Remove functions maybe_fake_model and
	maybe_fake_system_id.  Function adapter_set_ax_osname_hook now tries
	linux,os-node symlink first.  New function ensure_field ensures given
	VPD file contains the given field - if not, adds it with given value.

	* update-device-tree.in:
	Added "fibre-channel" to list of adapter types.  Removed miscellaneous
	section at end - this is now done by db_initialise_misc.

	* setup/common.d/00minimal:
	$db_prefix is now "db" rather than "device-tree".  New function
	db_set_subdir_vars_hook sets variables pointing to certain DB
	subdirectories.  This function is called immediately after being
	defined, but may be called again after changing the value of $db.  In
	function list_linux_vpd_files_all, find is now done in "$db_bus_dir
	instead of $db.  Function get_model now simply calls new function
	get_model_basic, which encodes all relevant logic for finding model
	from basic database.  Function get_system_id replaced by function
	get_serial_basic, which is called by get_serial.

	* lsvpd.in:
	Printing header now happens inside dedicated function: call new
	function get_serial instead of get_system_id; use $db_uname_dir to
	find system information, and no longer try to run uname directly if
	information is missing.  Fixed copyright header.

	* lscfg.in:
	Removed function scsi_disk_short_to_long - disk sizes when devfs is in
	use are no longer supported (this simply got too hard, and the major
	distros don't appear to use devfs), hence function disk_size is
	greatly simplified.  In function partition_disk_size, partitions file
	is now ${db_proc_dir}/partitions.  In function disk_size, "0 MB" is
	never printed anymore.  In functions printitem and maybeprintitem now
	assign parameters to local variables for clarity.  Function
	maybeprintitem no longer prints items with empty AX.  Function
	printdev now assigns no value to $ax, instead of "[NONAME]".

2003-12-02  Martin Schwenke  <martins@rover>

	* setup/scan.d/30device-tree:
	Split out new function ensure_ax from function dt_do_adapter_fake.
	Split out new function dt_do_pci_adapter_hook from function
	do_adapter_DEFAULT.  If dealing with a multi-channel adapter, ensure
	that any existing linux,vpd property for the adapter has the correct
	AX field and then generate minimal linux,vpd property for channels.

2003-11-25  Martin Schwenke  <martins@rover>

	* docs/install.xml:
	Clarified the ServerWorks issue - it isn't only 2.6 and it isn't only
	sysfs.

	* docs/install.xml: Added section on ServerWorks/sysfs strangeness.

	* Makefile:
	Added check to ensure tarball doesn't already exist on dist target.
	Bumped version to 0.10.4.

	* lsvpd.spec.in: Bumped version to 0.10.4.

	* scsi/scsivpd.conf: Added ZM field for IC35L*.

	* lsmcode.in:
	In function add_item, $zm should be hex-encoded before use.  Use tdump
	to do this.  Add @libdir@ to $PATH to be able to run tdump.

	* lib/tdump.c:
	If no file specified, reads from stdin - takes advantage of new
	file_read_contents behaviour where a NULL filename reads stdin.

	* lib/util.c:
	Function file_read_contents no longer uses fstat to determine file
	size - grows a buffer and reallocs instead.

2003-11-24  Martin Schwenke  <martins@rover>

	* setup/lscfg.d/00minimal:
	In function get_cpus_basic, only try using linux,cpuinfo if it exists.

	* scsi/scsivpd.conf: Added ZM field for DDYS-*.

	* lsmcode.in:
	In function add_item, if is set $zm use it and truncate $tm.  Removed
	function stripkey, now in 00minimal.  In function render_dev, set $zm
	from ZM field if found.

	* setup/common.d/00minimal:
	Function strip key moved here from lscfg.  Fixed copyright/license header.

	* lscfg.in: Fixed copyright header.

	* lscfg.in: Moved function stripkey to common.d/00minimal.

	* lscfg.in: Removed unneeded comment about stripkey change.

	* lscfg.in:
	Function stripkey now uses an internal bash string operation instead
	of sed.  This provides a useful performance improvement.

2003-11-21  Martin Schwenke  <martins@rover>

	* setup/scan.d/20sysfs:
	New function sysfs_get_node (hopefully) all the logic for figuring out
	the the canonical sysfs node (hopefully including PCI information, for
	PCI adapters) in one place.  Function match_adapter now uses
	sysfs_get_node.  PCI specific code in function do_adapter_DEFAULT
	pushed out to new function sysfs_do_pci_adapter.  Also in
	do_adapter_DEFAULT, sysfs_node-related code cleaned up courtesy of
	better value in linux,sysfs-node file, and case statement added to
	handle PCI-specific nodes and "pseudo" nodes, ignoring other types of
	sysfs nodes.  Function sysfs_get_pci_string has had new function
	sysfs_get_node factored out of it.

	* setup/scan.d/03adapter_ide_proc:
	In function do_adapter_ide, call function get_adapter_ds instead of referencing
	$ide_ds.

	* setup/scan.d/00minimal:
	Renamed function adapter_set_ax_hook to adapter_set_ax_osname_hook,
	and added code to set $osname.  Fixed copyright/licensing.

	* setup/scan.d/20sysfs:
	Call function adapter_set_ax_osname_hook instead of
	adapter_set_ax_hook and declare associated variable.  Refactored
	do_adapter_hook_* functions, partly using get_adapter_ds.

	* setup/scan.d/30device-tree:
	Call function adapter_set_ax_osname_hook instead of
	adapter_set_ax_hook and declare associated variable.  Refactored
	do_adapter_hook_* functions, partly using get_adapter_ds.  Fixed
	copyright.

	* setup/scan.d/03adapter_ide_proc:
	Fixed copyright.  Call function adapter_set_ax_osname_hook instead of
	adapter_set_ax_hook and declare associated variable.

	* setup/scan.d/01adapter_ethernet_defs, setup/scan.d/01adapter_scsi_defs:
	Fixed copyright message.

	* setup/scan.d/01adapter_ide_defs:
	Moved $ide_ethernet to new function get_adapter_ds_ide.

	* setup/scan.d/01adapter_ethernet_defs:
	Moved $scsi_ethernet to new function get_adapter_ds_ethernet.

	* setup/scan.d/01adapter_scsi_defs:
	Moved $scsi_ds to new function get_adapter_ds_scsi.

	* setup/scan.d/00minimal: Made get_adapter_ds a multiplex function.

2003-11-18  Martin Schwenke  <martins@rover>

	* docs/lsmcode.xml: Fixed typo in BUGS section.

2003-11-17  Martin Schwenke  <martins@rover>

	* .distfiles: Added lsmcode.{xml,8}.

	* docs/lsvpd.xml, docs/lscfg.xml:
	Replaced SEE ALSO for update-device-tree to lsmcode, since
	update-device-tree isn't documented in a man page.

	* docs/lsmcode.xml: New file.

	* docs/lsvpd.xml, docs/lscfg.xml:
	Fixed typo in options - that's 'z', not 'd' (again).

	* lsmcode.in: Fixed usage message.

	* docs/Makefile: Added lsmcode.8 as a target.

	* lsmcode.in: Added SP_CARD_ as a name for Service Processor.

2003-11-14  Martin Schwenke  <martins@rover>

	* Makefile:
	Added support for building lsmcode.  Bumped version to 0.10.3.

	* setup/scan.d/20sysfs: Cleaned up copyright and licensing.

	* lsvpd.spec.in:
	Added /sbin/lsmcode to %files.  Bumped version to 0.10.3.

	* setup/scan.d/20sysfs:
	Attempt to fix bug in function sysfs_get_pci_string for IDE.  Was
	failing on IDE channels with more than 1 device attached.

	* .distfiles: Added lsmcode.in.

	* lsmcode.in: New file.

2003-11-12  Martin Schwenke  <martins@rover>

	* setup/Makefile: Added lsmcode.d.

2003-11-11  Martin Schwenke  <martins@rover>

	* Makefile: Bumped version to 0.10.2.

	* docs/install.xml:
	Moved previous dependencies to "Software dependencies" section. Added
	filesystem and kernel dependencies.

2003-11-10  Martin Schwenke  <martins@rover>

	* lsvpd.spec.in: Added extra docs.

	* lib/Makefile: Added debug.bash to install.

	* .distfiles: Added lib/debug.bash.

	* update-device-tree.in:
	Updated copyright message.  Moved debug functions out to
	libdir/debug.bash.

	* lib/debug.bash: Added copyright header.

	* lib/debug.bash, lsvpd.spec.in: New file.

	* .distfiles:
	Added design and installation documentation, and supporting stylesheets.

	* docs/install.xml, docs/design.xml: Added releaseinfo.

	* docs/design.xml, docs/install.xml: New file.

	* docs/Makefile: Cleanups and additions.

2003-11-07  Martin Schwenke  <martins@rover>

	* setup/scan.d/05adapter_ethernet_ethtool:
	Use "type -p" to find ethtool instead of depending on it being in
	/usr/sbin.

2003-11-05  Martin Schwenke  <martins@rover>

	* setup/scan.d/20sysfs:
	Removed function sysfs_pci_string and moved 2 line function body to
	sysfs_get_pci_string, the only place where sysfs_pci_string was used.

	* scsi/scsi_vpd_std.c:
	Fixed copyright message and GPL.  Reimplemented fixed arrays using
	string_array.

	* lib/util.c:
	New function string_array_lookup, for allowing (possibly) sparse
	arrays to be declared and search without bounds checking.

	* lib/util.h: New struct string_array and corresponding function
	string_array_lookup, for allowing (possibly) sparse arrays to be
	declared and search without bounds checking.

2003-10-07  Martin Schwenke  <martins@rover>

	* Makefile: Bumped version to 0.10.1.

	* setup/scan.d/01adapter_scsi_defs: New file.

	* setup/scan.d/00minimal:
	Removed declaration of multiplexed function do_setup.  Added new
	multiplexed functions adapter_setup and device_setup.

	* setup/scan.d/20sysfs:
	In function do_adapter_DEFAULT, make mf and tm local or bad things
	happen.

	* update-device-tree.in:
	In main section, use adapter_setup and device_setup instead of
	do_setup.

	* docs/Makefile: Oops, installing MANPAGES, not DOCS.

	* docs/Makefile: New file.

	* .distfiles: Added new files in docs subdirectory.

	* docs/lsvpd.xml, docs/lscfg.xml: New file.

	* .distfiles: Changes for file splits in scan.d.

	* .distfiles: Various changes for 0.10.0.

	* setup/scan.d/03adapter_scsi_proc:
	Added loading prereq.  Moved all functions except adapter_setup_scsi
	(renamed from do_setup_scsi), list_os_adapters_scsi,
	get_pci_info_scsi (and supporting functions: scsi_get_host_frag,
	scsi_host_pci_info) to files 01adapter_scsi_defs or 07device_scsi_sg.

	* setup/scan.d/07device_scsi_sg_scan, setup/scan.d/07device_ide_proc, setup/scan.d/01adapter_ide_defs:
	New file.

	* setup/scan.d/03adapter_ide_proc:
	Moved all functions except list_os_ide_adapters, do_ide_adapter and
	get_pci_info_ide to 01adapter_ide_defs or 07device_ide_proc.

	* setup/scan.d/03adapter_ethernet_ifconfig:
	Moved all functions except list_os_ethernet_adapters to
	01adapter_ethernet_defs.

	* setup/scan.d/01adapter_ethernet_defs: New file.

	* setup/scan.d/30device-tree:
	Removed function device_tree_scsi_adapter_prehook.  In function
	do_adapter_DEFAULT, removed conditional (on type scsi) call to
	device_tree_scsi_adapter_prehook, and replaced with logic that
	attempts to spot multichannel adapters.

	* setup/scan.d/03adapter_ide_proc:
	In function do_device_ide, loosened pattern for recognising
	manufacturer "IBM".

	* setup/scan.d/00minimal:
	In function pci_set_mf_tm_hook, tidied logic and fixed a bug where mf
	could get set to an unknown device-id and tm wouldn't get set at all.

	* setup/scan.d/03adapter_scsi_proc:
	In function scsi_get_host_frag, allow numbers retrieved using template
	to be hexadecimal, not just decimal.

	* setup/lscfg.d/00minimal:
	In function get_cpus_basic, count CPUs using grep, not by hand
	(especially at the end of a pipe, where the count gets lost).

	* setup/scan.d/20sysfs:
	In function sysfs_get_pci_string, made ide handling (more) failsafe.

	* scsi/scsihost.conf: Loosened ibmsis templates.

2003-10-03  Martin Schwenke  <martins@rover>

	* Makefile: Bumped version to 0.10.0.

	* lscfg.in, lsvpd.in: Fixed GPL.

	* setup/scan.d/03adapter_ide_proc:
	In function get_pci_info_ide, PCI bus and device values can now
	include hex digits.  In function do_device_ide, recognise manufacturer
	TOSHIBA.

	* setup/scan.d/40ibm,vpd:
	Load this module if device_tree_device_type = "chrp".

	* setup/scan.d/30device-tree: Set variable device_tree_device_type.

	* setup/lscfg.d/40ibm,vpd:
	Load this module if device_tree_device_type = "chrp".  Moved functions
	dt_platform_specific_header, dt_platform_specific_vpd_line,
	dt_platform_specific_vpd, dt_platform_specific_node,
	do_platform_specific_section to 30device-tree.

	* setup/lscfg.d/30device-tree:
	Set variable device_tree_device_type.  Moved functions
	dt_platform_specific_header, dt_platform_specific_vpd_line,
	dt_platform_specific_vpd, dt_platform_specific_node,
	do_platform_specific_section from 40ibm,vpd.

2003-10-02  Martin Schwenke  <martins@rover>

	* update-device-tree.in: Fixed GPL.

	* update-device-tree.in:
	Removed inclusion of file @libdir@/scsi-functions.bash.

	* setup/scan.d/30device-tree:
	In function do_adapter_DEFAULT, attempt to set mf and tm using
	pci_set_mf_tm_hook.

	* setup/scan.d/00minimal:
	In function pci_set_mf_tm_hook, added work-around for broken 1023/2000
	card and fixed logic to only set mf to unknown subvendor if subdevice
	lookup worked.

	* lscfg.in:
	In function formatvpdline, commented out "Unknown key" debug.  This is
	only used during development.

	* setup/scan.d/40ibm,vpd:
	In function db_initialise, manufacture_yl was being called
	incorrectly, causing broken output.

	* pci/pci_vpd_rom_grab.c:
	In function find_rom_info, cast PCI_ROM_ADDRESS_MASK to uint32_t to
	stop compiler warning of implicit conversion.

	* pci/pci_vpd_to_txt.c:
	In functions parse_resource_chunk and do_checksum, add 'z' modifier in
	fprintf format to handle size_t items properly.

	* pci/pci_lookup.c:
	In function strip_and_return_to_newline, cast size_t items to int in
	call to asprintf.

	* pci/pci_lookup.c: Removed global variable prog.

	* setup/common.d/00minimal:
	New fnuction ensure_db checks to ensure database exists.

	* lsvpd.in, lscfg.in:
	Removed custom db-existence checking code and call ensure_db instead.

	* lscfg.in:
	Added "DESIGN NOTE" to comment near to replace point in TODO file.

	* lib/tdump.c:
	In main, changed use of die() to die2().  Removed variable prog,
	replaced with use of vpd_program_name.

	* pci/pci_vpd_rom_grab.c, pci/pci_vpd_cap_grab.c:
	In main, changed use of die() to die2() and removed redundant asprintf.

	* pci/ibm_vpd_render.c: In main, changed use of die() to die2().

	* scsi/scsi_vpd_custom.c.in:
	In function get_templates, changed use of die() to die2().

	* lib/util.c: In fnuctions file_relative_read_contents and
	file_relative_write_contents, changed uses of die() to die2().

2003-10-01  Martin Schwenke  <martins@rover>

	* setup/scan.d/20sysfs:
	In function do_adapter_DEFAULT, use function pci_set_mf_tm_hook
	instead of hand-coding PCI lookups - required some small surrounding
	code changes.

	* setup/scan.d/00minimal: New function pci_set_mf_tm_hook.

	* setup/scan.d/03adapter_ide_proc:
	In function do_adapter_ide, updated use of pci_lookup to reflect new
	usage.

	* setup/scan.d/20sysfs:
	In function do_adapter_DEFAULT, updated use of pci_lookup to reflect
	new usage.

	* pci/pci_lookup.c:
	Rewrite to support subsystem-ids.  Now only prints a single item -
	must run multiple times to get both vendor and device string.  Has
	been generalised to also do PCI class lookups.

	* lib/util.c, lib/util.h: New function die2.

2003-09-30  Martin Schwenke  <martins@rover>

	* setup/scan.d/20sysfs:
	Remove definitions of functions list_os_adapters_scsi and
	list_os_adapters_ethernet, since we want list_os_adapters_DEFAULT to
	be run.

	* scsi/Makefile:
	Removed scsi-functions.bash - this functionality has been rolled into
	../setup/scan.d/01sg-scsi.

	* lib/lsvpd-functions.bash:
	New functions sanitise, hex2ascii, hex2substring, multiplex, make_multiplexed.

	* setup/lscfg.d/40ibm,vpd:
	Replaced variable model_architecture with function get_architecture.
	Renamed function do_extra_items to do_post_items.  New function do_pre_items.

	* setup/scan.d/10devfs:
	Renamed function list_scsi_devices to list_devices_scsi to take
	advantage of multiplexed functions.  Removed duplicated comment at top
	of file.

	* lsvpd.in:
	serial_number and type_model now set using get_system_id and get_model
	functions.

	* update-device-tree.in:
	Moved SCSI-specific code to 01sg-scsi.  Function add_ax moved to
	setup/scan.d/30device-tree and renamed to dt_do_adapter_fake.
	Reorganised main section to use nested loops instead of duplicated
	sections.  Also save output of "uname -m" in "linux,architecture",
	"hostname" in "linux,hostname" and "/proc/cpuinfo" in "linux,cpuinfo".

	* lscfg.in:
	Function scsi_disk_size renamed to partition_disk_size, since it works
	for IDE disks too.  In function printheader, removed various
	hard-coded and inlined logic and replaced by function calls.  Use of
	function do_extra_items changed to do_post_items.

	* setup/common.d/00minimal: New functions get_model and get_system_id.

	* setup/scan.d/03adapter_ide_proc: New file.

	* setup/scan.d/00minimal:
	Added declarations for multiplexed function.  Removed prefix variables
	- replaced with a group of multiplexed functions.  Moved SCSI-specific
	code to 01sg-scsi.  Function maybe_fake_model now outputs to
	"linux,model" if required (not just "model", which is used to figure
	if we've got an OF device-tree).  New function adapter_set_ax_hook.

	* setup/scan.d/03adapter_ethernet_ifconfig, setup/scan.d/03adapter_scsi_proc:
	New file.

	* setup/scan.d/30device-tree:
	Major changes to support function multiplexing scheme, as described in
	setup/scan.d/00minimal.  Added various hooks, including those to
	support IDE devices and adapters.

	* setup/scan.d/30dmidecode: New file.

	* setup/scan.d/20sysfs:
	Major changes to support function multiplexing scheme, as described in
	setup/scan.d/00minimal.  Added various hooks, including those to
	support IDE devices and adapters.

	* setup/lscfg.d/00minimal:
	Removed variable model_architecture and replaced with new function
	get_architecture.  Renamed function do_extra_items to do_post_items.
	Added new function do_pre_items with some content that was in
	lscfg.in.  New functions get_cpus_basic and get_cpus attempt to
	decide if the machine is SMP or not.

	* setup/lscfg.d/30device-tree: New file.

2003-09-23  Martin Schwenke  <martins@rover>

	* setup/common.d/00minimal:
	In function list_linux_vpd_files_all, add trailing slash to influence
	sort order.

2003-09-22  Martin Schwenke  <martins@rover>

	* setup/scan.d/05adapter_ethernet_ethtool:
	About to change name to 02ethtool.  Removed function get_pci_info,
	renamed function ethtool_pci_info to get_pci_info_ethernet - will use
	new multiplexing infrastructure.

	* Makefile: Bumped version to 0.9.2.

2003-09-19  Martin Schwenke  <martins@rover>

	* setup/scan.d/05adapter_ethernet_ethtool, update-device-tree.in:
	Wrap "set -- ..." in  "set -f" and "set +f".

	* setup/scan.d/00minimal, setup/scan.d/20sysfs:
	No silly "shopt -u nullglob".  Use "set -f" followed by "set +f"
	instead.

	* setup/scan.d/20sysfs:
	No silly "shopt -u nullglob".  Use "set -f -- ..." followed by
	"set +f" instead.

	* setup/Makefile:
	With the scripts set to use nullglob, no longer need 000EMPTY files.

	* lscfg.in, lsvpd.in: Added nullglob at beginning of script.

	* setup/Makefile: Fixed installation to avoid copying RCS directories.

	* setup/scan.d/40ibm,vpd, setup/scan.d/30device-tree:
	Changed remaining instances of $dt to $db.

	* lib/lsvpd-functions.bash:
	In function unpack_device_tree_archive, changed instances of $dt* to
	$db*.

	* update-device-tree.in: Changed remaining instances of $dt to $db.

2003-09-05  Martin Schwenke  <martins@rover>

	* lscfg.in: -d option was broken, fixed.

2003-09-02  Martin Schwenke  <martins@rover>

	* update-device-tree.in, setup/scan.d/00minimal:
	Changed function name to maybe_fake_system_id (no '-' in name).

2003-09-01  Martin Schwenke  <martins@rover>

	* Makefile: Bump version to 0.9.1.

	* setup/common.d/00minimal:
	In function list_linux_vpd_files_all sort on directory names, not full
	filename.  This means, for example, when using a device-tree, SCSI
	devices will now appear after the adapter they're connected to.

	* setup/scan.d/20sysfs:
	In function sysfs_pci_string, removed extraneous '-' in sed
	expression.

2003-08-22  Martin Schwenke  <martins@rover>

	* Makefile:
	No longer builds/install dt_find_adapter.  Added "setup" subdir for
	install target.  Bumped version to 0.9.0.

	* .distfiles: Added pci/pci.ids.

	* setup/scan.d/20sysfs: Use pci.ids from /lib/lsvpd/.

	* pci/Makefile: Added install of pci.ids.

	* scsi/Makefile: Removed all traces of scsi_host_pci_info{,.in}.

	* .distfiles:
	Removed scsi/scsi_host_pci_info.in, added setup/scan.d/01ethtool.

	* setup/scan.d/00minimal:
	Added modified versions of functions from scsi_host_pci_info.in here.
	Function list_os_adapters now lists ethernet adapters (via "ifconfig -a").

	* setup/scan.d/05adapter_ethernet_ethtool: New file.

2003-08-19  Martin Schwenke  <martins@rover>

	* update-device-tree.in: Set $libdir.

2003-08-18  Martin Schwenke  <martins@rover>

	* setup/scan.d/40ibm,vpd:
	In function db_initialise, added debug messages and use of debug_cmd
	to conditionally trap stderr from ibm_vpd_render.

	* update-device-tree.in:
	No longer use -e flag - should never stop processing 1/2 way.  Use
	"shopt -s nullgob", since some directories may be empty.  Added -d
	(debug) flag and corresponding debug and debug_cmd functions.  Added
	debug message to various functions, and echo to stderr and exit 1
	become debug and return 1.  In function scsi_do_device, out separate
	output directory for VPD components - remove that output directory if
	it is empty after rendering.

	* setup/scan.d/20sysfs:
	Relaxed pattern for sysfs mount in /proc/mounts.  Initial support for
	using sysfs (partly) in place of device-tree: new functions
	sysfs_pci_string, sysfs_get_adapter_class, sysfs_get_adapter_prefix,
	get_pci_string, match_adapter, list_db_adapters, do_adapter;
	sysfs_pci_info now uses sysfs_pci_string; get_pci_info now uses
	sysfs_get_adapter_class.

	* setup/scan.d/30device-tree:
	In function dt_find_adapter, add debug and change echo to stderr to be debug.

	* scsi/scsi-functions.bash:
	Add debugs.  Change echo to stderr to be debug.

2003-08-15  Martin Schwenke  <martins@rover>

	* scsi/scsi_vpd_std.c: Oops, argc should now be 3.

	* setup/scan.d/00minimal:
	maybe_fake_model now looks for both "machine" and "model name" in
	/proc/cpuinfo.  It now shows something vaguely useful on my Thinkpad.
	:-)

2003-08-14  Martin Schwenke  <martins@rover>

	* setup/scan.d/30device-tree:
	"echo 1>&2" changed to "debug" in several places.  "exit 1" changed to
	"return 1" in several places.

2003-08-13  Martin Schwenke  <martins@rover>

	* setup/scan.d/00minimal:
	Changed module name in debug messages to "minimal".

	* setup/scan.d/00minimal:
	Added debug to functions match_adapter and do_adapter.

2003-08-08  Martin Schwenke  <martins@rover>

	* scsi/scsi_vpd_custom.c.in:
	Now accepts 2 arguments: input directory containing inquiry data and
	output directory, which must exist.  Functions process_template and
	process_templates now both take separate indir and outdir arguments.

	* setup/scan.d/30device-tree:
	In function scsi_do_device_hook, use variable $outdir for output
	directory.

	* scsi/scsi_vpd_std.c:
	Now accepts 2 arguments: input directory containing inquiry data and
	output directory, which must exist.

	* lsvpd.in:
	Use function list_linux_vpd_files_all instead of using find directly.
	Replace use of xargs (which is in /usr/bin) will a read loop.

	* lscfg.in:
	Use function list_linux_vpd_files instead of doing find directly.

	* setup/common.d/00minimal: New function list_linux_vpd_files_all.

	* setup/lscfg.d/00minimal, setup/lscfg.d/40ibm,vpd:
	New function list_linux_vpd_files.

	* lscfg.in, lsvpd.in: Check database initialisation.

2003-08-01  Martin Schwenke  <martins@rover>

	* scsi/scsi_vpd_common.h: Removed use of glib.

	* lib/Makefile: Replaced GStringIter with growbuf.

	* .distfiles: Added and changed files under setup/ for lscfg.

	* lsvpd.in:
	Use @libdir@/{common,lsvpd}.d/*.  $dt is now $db and is defined in
	common.d/00minimal.

	* setup/lscfg.d/40ibm,vpd, setup/common.d/00minimal, setup/lscfg.d/00minimal:
	New file.

	* lscfg.in:
	Added use of  @libdir@/{common,lscfg}.d/*.  dt is now db.  Moved
	device-tree specific functionality to setup/lscfg.d/40ibm,vpd.

	* update-device-tree.in: Don't call db_configure.  That's now implicit.

	* update-device-tree.in:
	Moved initialisation of variable vardir into db_configure and moved
	that function to setup/common.d/00minimal.  Call maybe_fake_model and
	maybe_fake_system-id at end.

	* setup/scan.d/00minimal:
	Add -p to mkdir in db_initialise.  New functions maybe_fake_model and
	maybe_fake_system-id.

2003-07-31  Martin Schwenke  <martins@rover>

	* setup/scan.d/40ibm,vpd, setup/scan.d/20sysfs, setup/scan.d/10devfs, setup/scan.d/00minimal:
	New file.

	* update-device-tree.in:
	Abstracted and extracted many functions into setup/scan.d/*.

	* setup/Makefile, setup/scan.d/30device-tree: New file.

	* .distfiles:
	Remove dt_find_adapter.in - now in setup/scan.d/30device-tree.

2003-07-29  Martin Schwenke  <martins@rover>

	* .distfiles: Removed pci/ibm_vpd_to_txt.[ch].

	* lib/util.c:
	In function read_file_contents, fixed bad memory free in bail branch.

	* scsi/scsi_vpd_custom.c.in: Fixed memory leaks.

	* scsi/scsi_vpd_std.c: In main, free(data) to fix memory leak.

	* scsi/scsi_vpd_common.c:
	In function dump_field, free(ldata) to fix memory leak.

	* pci/ibm_vpd_render.c:
	In main, use fwrite to print txt, not fputs, since growbuf_data(txt)
	is not (necessarily) NUL-terminated.

	* pci/pci_vpd_to_txt.c:
	In function parse_board_id use growbuf_free(name), not free(name), to
	avoid memory leak.

	* pci/pci_vpd_to_txt.c: Remove MIN - unused.

	* pci/pci_vpd_to_txt.c:
	Renamed functions ending in _string to end in _data to avoid
	impression that they deal with NUL-terminated strings.  Moved
	NUL-termination checking from parse_uchar_length_data (where it was
	a gross hack) to parse_resource_chunk (where it probably belongs).

	* pci/Makefile: New file.

	* Makefile: No more glib.

	* .distfiles: Switch from GStringIter.* to growbuf.*.

	* pci/pci_vpd_rom_grab.c:
	Update copyright.  Part of lsvpd package, not rtasdiag utils.  Use
	growbuf instead of glib/GString.

	* pci/pci_vpd_cap_grab.c:
	In main, use growbuf_length(frag) instead of frag->len.

	* pci/pci_vpd_rom_grab.c: New file.

	* pci/pci_vpd_cap_grab.c:
	Update copyright.  Part of lsvpd package, not rtasdiag utils.  Use
	growbuf instead of glib/GString and GByteArray.

2003-07-28  Martin Schwenke  <martins@rover>

	* pci/pci_vpd_gen_grab.c, pci/pci_vpd_gen_grab.h:
	Update copyright.  Part of lsvpd package, not rtasdiag utils.  Use
	growbuf instead of glib/GString.

	* pci/pci_vpd_to_txt.h:
	Update copyright.  Part of lsvpd package, no rtasdiag utils.

	* pci/pci_vpd_to_txt.h: Change type of function pci_vpd_to_txt.

	* pci/pci_vpd_to_txt.c:
	Removed use of glib.  Use growbuf instead of GString.  Got rid of
	intermediate parse tree - convert straight to text... some functions
	disappeared in the process.

	* lib/util.c:
	In function read_file_contents initialise *buf to a void bogus free if
	goto bail.

	* pci/ibm_vpd_render.c:
	Removed use of glib.  Use growbuf instead of GString.  Removed
	function grab_file.  Moved function ibm_vpd_to_txt here from
	ibm_vpd_to_txt.c.

	* scsi/scsi_vpd_custom.c.in: Removed trace fprintf in main.

	* lib/growbuf.c: In growbuf_iter_free, don't free the growbuf's data.

	* lib/growbuf.h, lib/growbuf.c, lib/test_growbuf.c: New file.

	* lib/Makefile: tdump needs util.{h,o}

2003-07-25  Martin Schwenke  <martins@rover>

	* scsi/scsi_vpd_custom.c.in: Remove glib usage - major rewrite.

	* lib/util.c: file_write_contents: set file mode in open(2).

	* scsi/scsi_vpd_common.c: Remove fprintf debug statements.

	* scsi/scsi_vpd_common.c:
	strstrip: fix off by one error and add NUL-termination.

	* scsi/scsi_vpd_std.c:
	In make_ds_value free(data_0xc7) rather than munmap.

	* pci/pci_lookup.c: In main free(data), not munmap(data, len).

	* lib/tdump.c: In main free(data).

	* lib/util.c:
	file_read_contents now returns malloced memory and is NUL-terminated.

	* lib/util.h:
	Removed comment about munmap being needed to free memory.  This won't
	be true in a couple of minutes.

	* scsi/scsi_vpd_std.c: Remove glib usage.

	* scsi/scsi_vpd_common.c: Remove tracing fprintf.

	* scsi/scsi_vpd_common.c:
	Removed dependency on glib.  New function strstrip removes leading and
	trailing whitespace, and truncates at the first non-printable
	character.  dumpfield: dropped unneeded variable llen.

	* lib/util.c:
	file_write_contents: oops, initialised variable done to 0.

	* pci/pci_lookup.c:
	skip_and_print_to_newline now modifies pci.ids memory buffer returned
	by mmap.

	* lib/util.c:
	Use private, writable memory for mmap in file_read_contents.

	* pci/pci_lookup.c: Use asprintf instead of strconcat2, strconcat3.

	* lib/util.c:
	Removed strconcat2, strconcat3 - use asprintf instead.  Modified
	build_relative_filename accordingly.

	* lib/util.h: Removed strconcat2, strconcat3 - use asprintf instead.

2003-07-24  Martin Schwenke  <martins@rover>

	* lib/util.h: Fixed copyright, comments.

	* lib/util.h:
	Removed dependency on glib, most functions changed, including argument
	list.  New functions strconcat2, strconcat3, build_relative_filename,
	read_file_contents.

	* lib/tdump.c: Removed dependency on glib.

	* lib/util.c:
	Removed dependency on glib, most functions changed, including argument
	list.  New functions strconcat2, strconcat3, build_relative_filename,
	read_file_contents.

	* pci/pci_lookup.c: New file.

	* scsi/scsi_vpd_std.c (make_ds_value):
	simplified filename construction using
	g_build_filename, thus changing type of variable "file".

	* scsi/scsi_vpd_custom.c.in (process_template):
	simplified filename construction using
	g_build_filename, thus changing type of variable "file".

	* scsi/scsi_vpd_std.c:
	In main(): simplified filename construction  using g_build_filename, thus
	changing type of variable "file"; fixed bug in message about short
	standard inquiry - was using uninitialised value.

	* lib/util.c:
	(file_relative_read_contents, file_relative_write_contents):
	simplified using g_build_filename.

2003-07-22  Martin Schwenke  <martins@rover>

	* scsi/Makefile:
	Removed scsi_vpd_inquire and scsi_vpd_render from SCRIPTS variable, so
	nothing attempts to install them.

	* Makefile: Bumped version to 0.8.7.

	* scsi/scsivpd.conf:
	Changed IBM;cdrom;CDRM00203 to wildcard on *RM00203 to catch DVD-RAM
	drives.  This wildcard could be loosened later to cover more/all IBM
	CD-ROM drives.

	* update-device-tree.in:
	New function sysfs_dir to facilitate better handling of sysfs.

	* lscfg.in: Added comment about -mindepth option to find.

2003-07-18  Martin Schwenke  <martins@rover>

	* lib/Makefile: New file.

	* scsi/Makefile:
	Renamed CONFIGS to DATAS.  Added scsi-functions.bash to DATAS.

	* scsi/Makefile: New file.

	* .distfiles:
	Added scsi/scsi-functions.bash.  Removed scsi/scs_vpd_inquire and
	scsi_scsi_vpd_render.

	* update-device-tree.in:
	Added source of scsi-functions.bash.  In function scsi_do_device,
	scsi_vpd_render stdout is now redirected directly to linux,vpd file.

	* scsi/scsi-functions.bash: New file.

	* lscfg.in, lsvpd.in:
	Check for extraneous arguments (without flags) and print usage message
	if present.

2003-07-17  Martin Schwenke  <martins@rover>

	* scsi/scsi_vpd_std.c:
	Removed macro constant MAX_SCSI_DEVICE_TYPES and made arrays size
	automatically.   New macro ARRAY_LEN.  New array cdrom_device_types.
	Function make_ds_value now uses cdrom_device_types array to fill in
	ret for DS.

2003-07-02  Martin Schwenke  <martins@rover>

	* Makefile:
	Fixed the dist target so that everything happens in $(TARBALLS).  It
	was leaving a half-baked tarball in the top-level directory.

	* Makefile: dist tarball now gets constructed in $(TARBALLS).

	* Makefile: Bumped version to 0.8.6.

2003-07-01  Martin Schwenke  <martins@rover>

	* lib/lsvpd-functions.bash:
	In function unpack_device_tree_archive, the trap now makes the
	device-tree writable before tryig to remove it.

2003-06-27  Martin Schwenke  <martins@rover>

	* .distfiles: Removed scsi/scsi_vpd_scan - no longer needed.

	* update-device-tree.in:
	- Removed optional device-tree and scsidir arguments to script - too
	  many external commands are used for this to work sensibly.

	- Removed function scsi_get_ax, and replaced with neater (shorter) new
	  function scsi_hbtl_to_dev.

	- New function sysfs_pci_info, moved from lib/lsvpd-functions.bash,
	  allows easy retrieval of PCI (dom,bus,dev,fun) for a PCI adapter.

	- Changes to allow processing of individual devices and adapters - in
	  the long term this involves splitting some of the functions out to a
	  library, so that they can be used by other scripts; for now the
	  functions are still here.

	  scsi_match_adapter:  Now takes just the name of a SCSI adapter
	  (e.g. "host1") and uses sysfs_pci_info directly if /sys is
	  available.  File device-tree-node is now created 1 level higher,
	  since the PCI subdirectory is not needed if sysfs is being used, but
	  it does unconditionally create the directory that will contain that
	  file.

	  New functions scsi_list_adapters, scsi_list_devices and
	  ethernet_list_adapters - the logic for these has been separated out
	  from the per-adapter/device code.

	  scsi_do_device now takes just an sg device node, does the SCSI
	  inquiries for that node (using scsi_vpd_inquire) and then does the
	  parsing, field manufacturing and rendering that it used to do.

	  scsi_do_adapter now expects linux,scsihost file to contain the
	  "scsi" prefix, if it exists.

	  ethernet_match_adapters has been replaced by new functions
	  ethernet_list_adapters and ethernet_match_adapter.

	- New function add_ax adds an AX fields to the given linux,vpd file if
	  it does not already contain one.  The prefix of the AX field is
	  taken from the first 4 characters of the directory name.

	- Variable sdt renamed to source_dt.

	- Logic of main SCSI processing section changed to reflect new
	  scsi_list_* functions and changes to scsi_do_device.

	- Added new main section to use add_ax to add AX fields for various
	  types of device-tree node.  Currently just display.

	- /proc/partitions is now copied verbatim to $dt/linux,partitions,
	  rather than being preprocessed to produce $dt/linux,disk-sizes file.
	  The makes debugging easier, given a device-tree.tar.gz archive.

	* lscfg.in: scsi_disk_size only worked when there were statistics in
	/proc/partitions, which seems to be the default for SuSE kernels.
	Loosened up the regexp a bit and it works for both styles of
	/proc/partitions.

	* lscfg.in:
	New functions disk_size, scsi_disk_size, scsi_disk_short_to_long and
	changes to print_item to do disk sizes properly, including under
	devfs.

	* lib/lsvpd-functions.bash:
	Removed function scsi_get_ax - optimised both uses in different ways.

2003-06-26  Martin Schwenke  <martins@rover>

	* scsi/scsi_vpd_scan:
	Changed multi-line, overcomplicated, looped construction of
	hostH/busB/targetT/lunL strings for non-devfs case to just use a very
	long sed substitution.

	* lib/lsvpd-functions.bash:
	Moved sysfs_pci_info to update-device-tree.in.

	* scsi/scsi_host_pci_info.in:
	Moved sysfs code into update-device-tree.in since it is so small, and
	(hopefully) this file will be deprecated when all systems use sysfs.

2003-06-20  Martin Schwenke  <martins@rover>

	* lib/lsvpd-functions.bash:
	Moved scsi_get_ax here from update-device-tree.

2003-06-18  Martin Schwenke  <martins@rover>

	* Makefile:
	dist target now puts tarball into TARBALLS/ directory.  Added new
	ChangeLog target.

	* .distfiles: Added ChangeLog.

	* lib/lsvpd-functions.bash:
	hex2dec now uses implicit arithmetic conversion, via $((...)), rather
	than printf.  This should be faster... although if speed was terribly
	important this would all be written in C!

2003-06-17  Martin Schwenke  <martins@rover>

	* .distfiles: Added lsvpd.cron.daily.in.

	* scsi/scsi_vpd_custom.c.in:
	Added #include <string.h> to avoid compiler warning.  Changed comment
	to say this is part of lsvpd package.  Bumped copyright.

	* scsi/scsi_vpd_std.c, pci/ibm_vpd_render.c, pci/pci_vpd_to_txt.c, lib/util.c, lib/tdump.c:
	Added #include <stdlib.h> to avoid compiler warning.  Changed comment
	to say this is part of lsvpd package.  Bumped copyright.

	* Makefile: Added lsvpd.cron.daily.in to GEN_SRC.

	* Makefile: Added dependency for lsvpd.cron.daily.

	* scsi/scsi_host_pci_info.in:
	Added 2003 to copyright comment.  Simplify usage function.

	* Makefile: Bumped version to 0.8.5.

	* update-device-tree.in:
	In function scsi_match adapter: simplified retrieval of PCI
	information, since it is now in a single file.  In function
	ethernet_match_adapters: simplified by using shell function
	sysfs_pci_info in direct combination with dt_find_adapter.

	* dt_find_adapter.in:
	Now accepts arguments device-tree, dom, bus, dev, fun, where the last
	4 are in hexadecimail format.  All check_* functions now accept
	hexadecimal arguments and convert to decimal as needed.  Renamed
	function check_phbprop to check_pci_domain - 2nd argument is now just
	the PCI domain, in hex.  Variable phbprop renamed to pci_domain_prop,
	and "linux,pci-domain" added to list of possibilities.  Comments
	cleaned up to talk about PCI domains and bignum machines instead of
	using ad hoc terminology.  Removed unneeded dec2hex conversions and
	added a hex2dec on $fun in one spot.

	* scsi/scsi_host_pci_info.in:
	In function get_all_pci_non_sysfs: made many variables local; store
	information in single file "data" rather than separate "bus", "dev",
	"fun" files; "data" contains "dom bus dev fun" all in hexadecimal.  In
	function get_all_pci_sysfs: factored out body of function, now calling
	sysfs_pci_info and dropping 4 hexadecimal numbers into "data" file, as
	above.

	* lib/lsvpd-functions.bash: New function sysfs_pci_info.

	* update-device-tree.in:
	Implemented ethernet adapter/device-tree matching with sysfs.

	* scsi/scsi_host_pci_info.in:
	Added logic to work with sysfs, including Anton's prototype PCI domain
	support.

	* dt_find_adapter.in:
	Added linux,pci-domain for magic property in PCI nodes.

2003-06-16  Martin Schwenke  <martins@rover>

	* tidy_device_trees.in:
	Got rid of $pattern.  Put glob pattern explicitly in loop and regexp
	pattern explicitly in call to tidy_subdirs.

	* tidy_subdirs:
	$2 is now a regexp, as allowed by grep.  Temporary directories now
	start with '.'.  Reimplemented compress_group and main loop to avoid
	long command lines as much as possible.

2003-05-26  Martin Schwenke  <martins@rover>

	* tidy_device_trees.in:
	Run update-device-tree if it hasn't been run.  Change command-line
	arguments to tidy_subdirs.

	* tidy_subdirs:
	Now accepts separate directory and glob pattern.  This is a more
	standard way of doing things.  Along with the above, use find to
	minimise the length of command line passed to ls.

2003-05-23  Martin Schwenke  <martins@rover>

	* Makefile: New file.

	* .distfiles:
	Added COPYING, NEWS, TODO, tidy_device_trees.in, tidy_subdirs files,
	and added ".in" suffix to lscfg and lsvpd.

	* lib/lsvpd-functions.bash: Added copyright message.

	* update-device-tree.in, dt_find_adapter.in, lsvpd.in:
	Changed comment to say Linux lsvpd package, not other stuff.
	Added 2003 to copyright.

	* lscfg.in: Added -z option to use device-tree tgz archive.

	* lsvpd.in:
	Added -z option to use device-tree tgz archive.  Renamed to lsvpd.in
	to get access to shell function library.

	* lib/lsvpd-functions.bash: New function unpack_device_tree_archive.

2003-05-22  Martin Schwenke  <martins@rover>

	* tidy_device_trees.in, tidy_subdirs: New file.

	* update-device-tree.in:
	Date/time in device-tree directory name now has no colons in time,
	since this confuses tar.  Old device-tree only renamed to
	device-tree-0000-00-00-000000 when it is not a symlink.

	* lib/lsvpd-functions.bash: Added readlink.

2003-05-07  Martin Schwenke  <martins@rover>

	* scsi/scsihost.conf: Fixed typo in bus pattern for sym53c8xx.

2003-04-29  Martin Schwenke  <martins@rover>

	* scsi/scsihost.conf:
	Loosened the pattern for the ibmsis PCI bus number so it can be more
	than 2 digits.

	* scsi/scsi_host_pci_info.in:
	get_real_bus: removed redundant echo from at end.  New function
	get_host_frag to avoid duplicating logic in main loop.  In main loop -
	added use of prefix fields from template file; use new function
	get_host_frag; only call get_real_bus if $irq is set; use printf to
	print values, implicitly converting prefixed (hex or octal) numbers to
	decimal.

	* dt_find_adapter.in: Optimised away some hex2dec and dec2hex calls.

	* scsi/scsihost.conf:
	Anchors are now in this file, not put in by the code.  Added comment
	about field 6-9.  Added line for ibmsis driver.

	* lib/lsvpd-functions.bash:
	Simplified dec2hex and hex2dec using printf.

	* scsi/scsihost.conf: Added IRQ field.

2003-03-28  Martin Schwenke  <martins@rover>

	* lscfg.in: Fixed quoting error in printdev.

	* lscfg.in:
	Fixed wrapping on device header line in VPD section again.  Forgot to
	do it after changing the field width.

	* lscfg.in: Changed width of AX field to 16 chars.

	* update-device-tree.in:
	Remove -prune on find.  busybox doesn't implement it.

	* update-device-tree.in:
	Factored out new function manufacture_yl.  Moved most code from
	dt_find_scsi_node to new function scsi_match_adapter, which drops
	cross reference files into $dt and $scsidir. dt_find_scsi_node now
	does less work.  new function scsi_do_device contains most of the code
	that used to be in the main SCSI loop.  New function scsi_do_adapter
	synthesises linux,vpd for SCSI adapters.  New function
	ethernet_do_adapter synthesises VPD for Ethernet adapters.  Main SCSI
	loop now much shorter and easier to read, and ensures linux,vpd props
	exist for adapters.  New loop for Ethernet adapters.

	* lscfg.in:
	Fixed wrapping on device header line in VPD section.  renamed function
	render_platform_specific_node to just platform_specific_node.
	platform_specific_node only prints VPD is ibm,vpd exists too.  Added
	trivial handling for ISA Bus.

2003-03-26  Martin Schwenke  <martins@rover>

	* lscfg.in:
	Removed -s option and corresponding $sd.  Use ${dt}/linux,disk-sizes
	instead of ${sd}/disk-sizes.

	* update-device-tree.in:
	Moved ${scsidir}/disk-sizes to ${dt}/linux,disk-sizes.

	* lscfg.in:
	New function platform_specific_vpd_line() overrides some of the
	descriptions for keys found in formatvpdline().  This function is
	called in platform_specific_vpd() instead of formatvpdline().

	* lscfg.in: Added MP key type.  Print the PS VPD DS field in a 16 byte
	field.  Hard-code the printing of the Physical Location, since the ':
	is only followed by a single space.

	* dt_find_adapter.in:
	Fixed careless bug: check_phbprop grabs hex numbers from file, not
	octal.

2003-03-25  Martin Schwenke  <martins@rover>

	* lscfg.in:
	Got rid of use of "set" - use read instead.  Factored out prcoessing
	of key after read into new function stripkey().  Implemented platform
	specific (PS) VPD handling.  Added more exceptions on the PS-related
	find command.

	* lscfg.in: First cut of most of the platform specific stuff.

2003-03-24  Martin Schwenke  <martins@rover>

	* lib/lsvpd-functions.bash: Removed nulcat.  It didn't work.

	* lscfg.in:
	Starting to implement -p option.  Time to rename to lscfg.in, so can
	include lsvpd-functions.bash.

	* lib/lsvpd-functions.bash: Make that "nulcat".

	* lib/lsvpd-functions.bash: New function nullcat().

	* lscfg.in:
	Factored out formatting of VPD lines to function formatvpdline().

2003-03-21  Martin Schwenke  <martins@rover>

	* update-device-tree.in:
	Filter comments from sg_map output, and throw away stderr.

	* lscfg.in: Ditto - missed one.

	* lscfg.in: Added -f to set line to stop really stupid things being
	filename-expanded by the shell.

	* lscfg.in:
	Added -s option, since scsi directory needs to be used now, because it
	contains the disk-sizes file.  Speaking of which, SCSI disks now have
	their sizes printed.  Consistent syntax/layout used for shell
	functions.

	* scsi/scsi_host_pci_info.in:
	Implemented yet a different workaround to the problem of SCSI drivers
	only reporting 8-bit worth of PCI bus number.

	* update-device-tree.in: Changed "partitions" to "disk-sizes".

2003-03-20  Martin Schwenke  <martins@rover>

	* update-device-tree.in:
	If /proc/partition is available, dump disk names and sizes to
	$scsidir/partitions.   This is in preparation for adding size info to
	output in at least lscfg.

	* lscfg.in:
	Removed need for xargs and grep.  Fixed filter to stop printing items
	from root node ibm,vpd prop.  Hard-coded sys0, sysplanar0.  Added
	support for pci, proc, L2cache via handle_specials function.  Other
	minor cleanups.

2003-03-18  Martin Schwenke  <martins@rover>

	* update-device-tree.in:
	dt_find_scsi_node now exits on error, rather than returning.  New
	function scsi_get_ax, which uses the output of sg_map -x to match up
	block/sg devices.  Use dirname function in a few spots, instead of
	using sed directly.  Factor out distillation of host/bus/target/lun
	into a single spot.  AX field now contains short SCSI device name as
	reported by sg_map, not devfs version.  Added a few comments.

	* lscfg.in:
	Device names are hopefully now shorter - made the column widths same
	as AIX.

	* dt_find_adapter.in:
	Better attempt to decide whether a machine is "bignum" - might have
	PCI bus numbers >255, so linux,phbnum props need to be used.

2003-03-13  Martin Schwenke  <martins@rover>

	* update-device-tree.in:
	Needs bash, not just sh.  Use dec2hex from lsvpd-functions.bash.
	scsi_dt_find_host renamed to dt_find_scsi_node, which now looks for
	subdirectories in case the adapter is multi-channel and
	dt_find_adapter just finds the top level.  Added separator comments.

	* .distfiles: New file.

	* lib/lsvpd-functions.bash: Added basename.

	* dt_find_adapter.in: Removed tdump variable.  Moved functions out to
	lib/lsvpd-functions.bash.  Added keyword "function" for clarity.
	Explicity set PATH for easier testing.  Renamed file so Makefile can
	substitute @libdir@.

	* lib/lsvpd-functions.bash:
	Just renamed file and added comment about needing bash.

	* lib/lsvpd-functions.bash: New file.

	* dt_find_adapter.in:
	Factorised unreadable code into shell functions.  Reworked logic to
	search for PCI bus top-down - the odl logic was broken.  Removed type
	parameter.

	* lsvpd.in: Use device-tree file with "uname -s -r" output if present.

	* update-device-tree.in:
	Added device-tree file with "uname -s -r" output.

2003-03-12  Martin Schwenke  <martins@rover>

	* scsi/scsi_host_pci_info.in:
	Completely reimplemented based on output of lspci.  If that changes,
	or hot-plug events occur, we go back to the old implementation.

2003-03-11  Martin Schwenke  <martins@rover>

	* lsvpd.in, lscfg.in: Force dereference of $dt symlink in find.

	* update-device-tree.in: Oops, mkdir $vardir.

	* update-device-tree.in: Oops fixed unmatched quote.

	* lsvpd.in:
	Changed options handling to use getopts.  Added -d option to specify
	device-tree.

	* lscfg.in: Fixed stupid comment.

	* lscfg.in: Added -d option to specify device-tree directory.

	* update-device-tree.in:
	Don't remove old device-tree.  Now create dated device-tree
	directories and symlink to the current one.  Also parameterised top
	level directory ($vardir).

	* update-device-tree.in:
	Changed location of device-tree to /var/lib/lsvpd/device-tree.
	Similar for SCSI data.

	* lsvpd.in, lscfg.in:
	Changed location of device-tree to /var/lib/lsvpd/device-tree.

	* lscfg.in:
	Now accesses device-tree copy directly, instead of via lsvpd.  Added
	options processing.  Now shows summary without any options and shows
	VPD with -v option.  Added -l option to print only some devices - this
	is currently pretty useless without names for most devices.  Resorted
	case statement in xlatevpd.  Supress more fields.  Generally make it
	output look more like AIX version.  Added -t option - give it a file
	containing lsvpd output and it uses that rather than device-tree.

2003-03-03  Martin Schwenke  <martins@rover>

	* update-device-tree.in:
	Made scsi_dt_find_host a shell function that calls the newly renamed
	dt_find_adapter.

	* dt_find_adapter.in: Fixed documentation to reflect previous changes.

	* dt_find_adapter.in:
	Renamed from scsi_dt_find_host (which is now just a shell function in
	update-device-tree) and threw out the SCSI specific bit.  Now looks
	for linux,phbnum if linux,global-number is not there.

2003-02-25  Martin Schwenke  <martins@rover>

	* lscfg.in: Implemented line wrapping for the header line of each item.

	* lscfg.in: Added SE and U? fields.

2003-02-24  Martin Schwenke  <martins@rover>

	* lscfg.in: Fixed typo in "unknown field" error message line.

	* lscfg.in:
	Fixed bug that stopped the last item being printed, added function
	printvpd.  Fixed comment at top, added copyright message.

2003-02-21  Martin Schwenke  <martins@rover>

	* scsi/scsi_vpd_scan: Fixed the check for devfs.

2002-11-07  Martin Schwenke  <martins@rover>

	* lib/util.h:
	Added cpu_to_le32 and le32_to_cpu.  Also cleaned up the 16-bit ones...

	* pci/pci_vpd_cap_grab.c:
	Moved big_cool_{read,write} to ../lib/util.[ch].

	* scsi/scsi_vpd_std.c (main): changed to use strerror.

	* lib/util.h: Added #include <sys/types.h>.

	* lib/util.c: Moved #define _XOPEN_SOURCE to top.

	* lib/util.h, lib/util.c: Added big_cool_{read,write}.

	* pci/pci_vpd_cap_grab.c:
	Abstracted out reading/top-level-parsing of VPD to
	pci_vpd_gen_grab.[ch].

	* pci/pci_vpd_gen_grab.h, pci/pci_vpd_gen_grab.c: New file.

2002-10-25  Martin Schwenke  <martins@rover>

	* pci/pci_vpd_to_txt.c (parse_resource_chunk):
	fixed formatting/length of warning message.

	* pci/pci_vpd_to_txt.c:
	Improved warning messages throughout.  (parse_pci_vpd): Fixed
	indentation.

	* pci/pci_vpd_cap_grab.c:
	Added more comments throughout.  (vpd_byte): restructured for
	readability.  (have_capabilities, find_vpd_capabilities): use of pci.h
	#defines instead of hard-coded constants.  (find_vpd_capabilities):
	code to detect correct position of capability list, depending on
	header type.  (grab_vpd): restructured for clarity.  (main): better
	error handling.

2002-10-24  Martin Schwenke  <martins@rover>

	* pci/pci_vpd_to_txt.c:
	Rewrote parse_pci_vpd so that it follows the PCI specification more
	closely and isn't limited to what is documented in the RS6K RPA.
	Factored out the checksum validation code into do_checksum function.

	* update-device-tree.in: s/pci_vpd_render/ibm_vpd_render/

	* pci/ibm_vpd_render.c:
	Change of include file name and associated function (ibm_vpd_to_txt).

	* pci/ibm_vpd_to_txt.c:
	Cut down from original version of pci_vpd_to_txt.c.

	* pci/pci_vpd_to_txt.c:
	Factored out IBM-specific stuff to separate file.  Changed, for
	example, all unsigned char to uint8_t.  Pruned redundant includes.

	* pci/ibm_vpd_to_txt.c, pci/ibm_vpd_to_txt.h: New file.

	* pci/pci_vpd_to_txt.h: Renamed to pci_vpd_to_txt.

	* pci/pci_vpd_to_txt.c:
	Various functions renamed and refactored.  Used ntohl instead of
	home-grown stuff at one point.

	* pci/pci_vpd_cap_grab.c: Removed le16_to_cpu and cpu_to_le16.

	* lib/util.h: Added le16_to_cpu and cpu_to_le16.

	* pci/pci_vpd_cap_grab.c:
	Fixed crash on failed open.  Changed message about no capabilities
	list to "return 1".

	* pci/pci_vpd_cap_grab.c: This works.  :-)

	* pci/pci_vpd_cap_grab.c: New file.

2002-09-26  Martin Schwenke  <martins@rover>

	* lscfg.in: Made the output look more like AIX lscfg -v.

	* lscfg.in: New file.

2002-09-23  Martin Schwenke  <martins@rover>

	* scsi/scsi_vpd_custom.c.in (process_template):
	Fixed off-by-one error at end of data.

	* scsi/scsi_vpd_std.c (make_ds_value):
	Fixed type of parameter 3 (dir).  Reorganised 0xc7
	checking to get "Other SCSI CD-ROM Drive" for unknowns.

	* scsi/scsi_vpd_custom.c.in (process_template):
	Now takes struct containing directory and short
	device type string as argument.  Changed call to dump_field to reflect
	changed argument.

	* scsi/scsi_vpd_std.c (scsi_device_types, scsi_device_types_short):
	type is now gchar, not
	char - no real difference!
	(make_ds_value): New function that does some of the work main used to
	do, and also adds extra information from inquiry page 0xc7.
	(main): Pulled some logic into make_ds_value, changed calls to
	dump_field to reflect argument change.

	* scsi/scsi_vpd_common.h, scsi/scsi_vpd_common.c (dump_string):
	Removed strip argument - the only field not being
	stripped was Z0, and it is safe to do so after hex encoding it - all
	values are stripped now.  Added dtype argument - short device type
	string, which is used to help decide if value should be hex encoded.

	* scsi/scsivpd.conf:
	For enclosures, we don't want the FN, even though it looks OK.  We
	want a broken looking Z1 instead!

2002-09-20  Martin Schwenke  <martins@rover>

	* scsi/scsivpd.conf: Removed SN field from enclosure type.

2002-09-17  Martin Schwenke  <martins@rover>

	* scsi/scsi_vpd_inquire: - Fixed usage message.
	- Throw away stderr of sg_inq.

	* update-device-tree.in:
	Add /sbin to PATH, assuming this is where the sg_* stuff is.

	* scsi/scsi_vpd_scan: Removed debugging PATH stuff.

	* scsi/scsi_vpd_scan:
	- Now requires /bin/bash because we want to loop from 0 to 255.  :-(
	- Fixed usage message.
	- Now handle non-devfs case, although this is a bit of a hack.
	- If an scsi_vpd_inquire call fails, return the exit code of the last
	  one.

2002-09-03  Martin Schwenke  <martins@rover>

	* update-device-tree.in:
	In SCSI YL values, target and LUN are now lowercase hex, not decimal.

	* scsi/scsi_vpd_common.c: hexify() now produces uppercase hex output.

	* dt_find_adapter.in: Took out "not tested" message.

2002-09-02  Martin Schwenke  <martins@rover>

	* dt_find_adapter.in: Fixed usage message.

2002-08-23  Martin Schwenke  <martins@rover>

	* dt_find_adapter.in:
	Remove -prune on find.  This is just an optimisation and doesn't work
	with busybox's find.

	* dt_find_adapter.in: Fixed order of parameters.

2002-08-14  Martin Schwenke  <martins@rover>

	* scsi/scsi_vpd_custom.c.in: Add Emacs mode to top line in comment.

	* scsi/scsi_vpd_custom.c.in: template file resides in @libdir@.

	* scsi/scsi_host_pci_info.in: conf file resides in @libdir@.

	* update-device-tree.in:
	Added copyright/license.  Change PATH to include @libdir@.

	* update-device-tree.in: Eek, library directory should not be in /usr.

	* update-device-tree.in, lsvpd.in: New file.

	* pci/pci_vpd_to_txt.c: - Made internal functions static.
	- Factor out length grabbing functions.
	- Use gsize instead of unsigned int for lengths.
	- Factored out parsing code for board id and included checksum
	  calculation.
	- Made chunk parsing more forgiving of errors, which required restructure.
	- Incorrect checksum now prints a warning instead of exiting.

	* pci/pci_vpd_to_txt.c:
	Now parses multiple chunks.  Fix g_free -> g_string_free bug.

2002-08-13  Martin Schwenke  <martins@rover>

	* lib/GStringIter.c, lib/GStringIter.h: Changed bool to gboolean.

2002-08-12  Martin Schwenke  <martins@rover>

	* scsi/scsi_vpd_std.c: Added "SCSI " to DS string.

	* dt_find_adapter.in: Make $dt the 1st argument.

	* scsi/scsi_vpd_render: Added *FC line.

	* pci/ibm_vpd_render.c: Sensible reimplimentation of grab_file.

	* lib/util.h, lib/util.c, lib/tdump.c, scsi/scsivpd.conf, scsi/scsihost.conf, scsi/scsi_vpd_std.c, scsi/scsi_vpd_scan, scsi/scsi_vpd_render, scsi/scsi_vpd_inquire, scsi/scsi_vpd_custom.c.in, scsi/scsi_vpd_common.h, scsi/scsi_vpd_common.c, scsi/scsi_host_pci_info.in, dt_find_adapter.in:
	New file.

2002-06-19  Martin Schwenke  <martins@rover>

	* pci/ibm_vpd_render.c:
	Actually implemented proper main().  Use g_string_append_len() to make
	building buffer trivial.  Added copyright message.

	* pci/pci_vpd_to_txt.h: New file.

	* pci/pci_vpd_to_txt.c: Use GStringIter.  Add copyright message.

	* lib/GStringIter.h: That should be ".h". :-)

	* lib/GStringIter.h, lib/GStringIter.c: New file.

2002-06-05  Martin Schwenke  <martins@rover>

	* pci/pci_vpd_to_txt.c, pci/ibm_vpd_render.c: New file.

