Pierre-Alexandre Meyer [Sat, 9 May 2009 02:24:10 +0000 (19:24 -0700)]
Merge commit 'mouraf/for-erwan' into for-erwan
Pierre-Alexandre Meyer [Sat, 9 May 2009 02:23:19 +0000 (19:23 -0700)]
Merge commit 'hdt-erwan/master' into for-erwan
Pierre-Alexandre Meyer [Sat, 9 May 2009 02:12:21 +0000 (19:12 -0700)]
hdt: Silence harmless errors when detecting disks
Detecting disk geometry can fail either because the extension query failed
(invalid disk number?) or because the legacy geometry call failed
(int 13 not supported?). The latter happens for instance when querying
geometry for CDROMs.
In either case, the error message is not meaningful. Don't print it (and
don't confuse the user).
(Impact: fixes #5)
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sat, 9 May 2009 02:11:10 +0000 (19:11 -0700)]
hdt: Remove vesa hack (cli)
The vesa detection hack is not needed anymore
as the disklib has been fixed.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Erwan Velu [Fri, 8 May 2009 16:56:45 +0000 (18:56 +0200)]
Merge branch 'for-erwan' of ssh://terminus.zytor.com//pub/git/users/pam/hdt-pierre
Pierre-Alexandre Meyer [Fri, 8 May 2009 03:26:25 +0000 (20:26 -0700)]
hdt: Fix partition display (menu)
Pass the correct disk structure when extracting partitioning
information.
Misc.: remove extra paren in output.
(Impact: fixes #2)
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Thu, 7 May 2009 20:14:13 +0000 (13:14 -0700)]
gpllib: Specify size of the edd structure in the buffer (disklib)
The first word of the result buffer should contain the size of the expected
result, as specified in the ATA/ATAPI Command set:
The caller shall set this value to the maximum Result Buffer length, in bytes.
(Impact: fixes #1)
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Fri, 8 May 2009 03:26:25 +0000 (20:26 -0700)]
hdt: Fix partition display (menu)
Pass the correct disk structure when extracting partitioning
information.
Misc.: remove extra paren in output.
(Impact: fixes #2)
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Thu, 7 May 2009 20:14:13 +0000 (13:14 -0700)]
gpllib: Specify size of the edd structure in the buffer (disklib)
The first word of the result buffer should contain the size of the expected
result, as specified in the ATA/ATAPI Command set:
The caller shall set this value to the maximum Result Buffer length, in bytes.
(Impact: fixes #1)
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Erwan Velu [Tue, 5 May 2009 19:09:44 +0000 (21:09 +0200)]
hdt: 0.3.3
Impact: new release
New release 0.3.3
Erwan Velu [Tue, 5 May 2009 19:03:11 +0000 (21:03 +0200)]
hdt: Adding e820, e801, e88 memory information
Impact: More memory detection
This commit introduce 3 new memory information in the menu mode
- e820
- e801
- e88
Erwan Velu [Tue, 5 May 2009 18:02:16 +0000 (20:02 +0200)]
hdt: adding "hdt> show memory"
Impact: more command coherency
hdt> show memory now reports the same as memory> show
Erwan Velu [Tue, 5 May 2009 17:59:12 +0000 (19:59 +0200)]
hdt: adding memory> show bank xx
Impact: Improving command coherency
memory> show bank is now implemented like dmi> show bank
Erwan Velu [Mon, 4 May 2009 18:58:29 +0000 (20:58 +0200)]
hdt: improve help message
Impact: Improve display usage
Prior to that commit, the help message was using too much lines.
This commit make it more compact
Erwan Velu [Sun, 3 May 2009 19:45:26 +0000 (21:45 +0200)]
hdt: using reset_more_printf in memory mode
Impact: prevent weird display
more_printf needs reset_more_printf()
Erwan Velu [Sun, 3 May 2009 18:55:39 +0000 (20:55 +0200)]
Merge branch 'for-erwan' of ssh://terminus.zytor.com//pub/git/users/pam/hdt-pierre
Erwan Velu [Sun, 3 May 2009 17:53:49 +0000 (19:53 +0200)]
hdt: fixing cursor disapearing
Impact: Improve user experience
After some commands, the cursor was disapearing. That could confuse
users. This commit resolve this weird cases.
Erwan Velu [Sun, 3 May 2009 17:49:20 +0000 (19:49 +0200)]
hdt: Input cursor is now blinking
Impact: Improve user experience
This commit let the cursor blinking while waiting for a keyboard input.
The blinking mode seems to fails under qemu but works fine on real
hardware.
Erwan Velu [Sun, 3 May 2009 08:30:20 +0000 (10:30 +0200)]
hdt: fixing BACKSPACE behavior
Impact: Fixing CLI behavior
Prior to that commit, the BACKSPACE didn't worked properly.
In some cases, the cursor was misplaced and was confusing user.
Pierre-Alexandre Meyer [Sun, 3 May 2009 04:32:07 +0000 (21:32 -0700)]
Merge commit 'hdt-erwan/master' into for-erwan
Conflicts:
com32/hdt/hdt-cli-dmi.c
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 3 May 2009 03:44:56 +0000 (20:44 -0700)]
hdt: Add e801 and 88 calls in the memory mode (CLI)
Enhance the new memory mode:
* show e801: to show the memory layout reported by the
INT 15, AX = 0xE801 call
* show 88: to show the memory size (contiguous Kb above 1M)
reported by the INT 0x15, AH = 0x88 call
Note: `show' now defaults to the DMI banks listing.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 3 May 2009 03:43:18 +0000 (20:43 -0700)]
gllib: Add e801 and 88 memory detection
Add Bios calls INT 0x15, AX = 0xE801 and INT 0x15, AH = 0x88
to detect the memory. These can be used as a fallback when e820 is not
available.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 3 May 2009 03:37:58 +0000 (20:37 -0700)]
gpllib: Fix ACPI 3.0 quirk (memory)
If 24 bytes are returned in the e820 map, the entry should be ignored
if bit 0 of the Extended Attributes is clear.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Erwan Velu [Sat, 2 May 2009 17:24:58 +0000 (19:24 +0200)]
hdt: 0.3.2
Impact: new release
New 0.3.2 release
Pierre-Alexandre Meyer [Fri, 1 May 2009 03:42:43 +0000 (20:42 -0700)]
gpllib: Add copyright/license information (disklib)
The disklib is distributed under GPLv2.
Add copyright holders for borrowed code:
* H. Peter Anvin/Intel Corporation (read/write BIOS calls)
* Matt Domsch <Matt_Domsch@dell.com> (edd structures)
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sat, 2 May 2009 15:56:51 +0000 (08:56 -0700)]
hdt: Add memory mode (CLI)
The memory mode will be used to dump the memory map
(via e820, e802, e801 and 88). Only `show e820' is implemented.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sat, 2 May 2009 15:52:55 +0000 (08:52 -0700)]
gpllib: Add detect_memory_e820 call
detect_memory_e820 populates an array of struct e820entry using
INT 15, AX = E820h.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Erwan Velu [Fri, 1 May 2009 05:48:35 +0000 (07:48 +0200)]
hdt: removing useless clear screen on dmi> show memory
Impact: Improving display usage
No need to clearscreen for such display
Pierre-Alexandre Meyer [Fri, 1 May 2009 03:42:43 +0000 (20:42 -0700)]
gpllib: Add copyright/license information (disklib)
The disklib is distributed under GPLv2.
Add copyright holders for borrowed code:
* H. Peter Anvin/Intel Corporation (read/write BIOS calls)
* Matt Domsch <Matt_Domsch@dell.com> (edd structures)
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Erwan Velu [Wed, 29 Apr 2009 18:00:19 +0000 (20:00 +0200)]
cmenu: fixing getnumrows values
Impact: Allow users to use 25 lines instead of 24
Prior to that commit it was impossible to setup a 25 lines menu
Erwan Velu [Tue, 28 Apr 2009 18:57:48 +0000 (20:57 +0200)]
hdt: Remove useless comments
Impact: code cleaning
Removing useless comments
Erwan Velu [Mon, 27 Apr 2009 20:37:19 +0000 (22:37 +0200)]
hdt: 0.3.2-pre1
Impact: pre version
pre1
Erwan Velu [Mon, 27 Apr 2009 20:33:47 +0000 (22:33 +0200)]
hdt: optmizing disk's menu
Impact: Improving visuals
Optimizing disk'screen to have an efficient display
Erwan Velu [Mon, 27 Apr 2009 20:10:47 +0000 (22:10 +0200)]
hdt: updating disk's menu to match latest disk api
Impact: Menu mode now display every partition
Updating the menu to use the latest API.
The menu now display all detected partitions
Erwan Velu [Mon, 27 Apr 2009 15:45:16 +0000 (17:45 +0200)]
hdt: detect_disks requires detect_vesa (FIXME)
Impact: Prevent empty strings while detecting disks
Calling detect_vesa before doing int13 make it works....
Erwan Velu [Mon, 27 Apr 2009 15:22:35 +0000 (17:22 +0200)]
hdt: missing \n on disk detection
Impact: visual improvements
Fixing missing return while printing "DISKS: Detecting"
Erwan Velu [Mon, 27 Apr 2009 15:17:35 +0000 (17:17 +0200)]
pci: prevent modules.alias to destroy modules.pcimap content
Impact: multiple get_module_name_from_* corrupt result
Prior to that commit, calling both get_module_name_from_pcimap and
get_module_name_from_alias were reporting unknown modules.
Erwan Velu [Mon, 27 Apr 2009 14:56:16 +0000 (16:56 +0200)]
hdt: preventing mac address to be shown of all pci devices
Impact: Fixing wrong display of MAC Address
This commit fix a wrong behavior where the MAC address was displaying
for every pci device instead of only for the related pci device.
Erwan Velu [Mon, 27 Apr 2009 14:50:59 +0000 (16:50 +0200)]
hdt: fix wrong kernel module display in menu mode
Impact: prevent wrong module display for some pci devices
The buffer wasn't clean and could contain some previous kernel modules.
This bug leads to display too many kernel modules for a single pci device
Erwan Velu [Mon, 27 Apr 2009 14:43:46 +0000 (16:43 +0200)]
hdt: Adding modules.alias support
Impact: It is now possible to use modules.alias to search kernel
modules.
This commit rename modules= command line parameter to modules_pcimap=
It introduce modules_alias= parameter to override the default
"modules.alias" filename.
Both methods (pcimap & alias) are tried when detecting hardware.
A failure message will occurs only if both methods fails.
Erwan Velu [Mon, 27 Apr 2009 14:41:07 +0000 (16:41 +0200)]
pci: Adding get_module_name_from_alias()
Impact: Users can now use modules.alias to find kernel modules
get_module_name_from_alias() parses modules.alias to find the
appropriate kernel modules required by the local pci devices.
Pierre-Alexandre Meyer [Mon, 27 Apr 2009 06:33:53 +0000 (23:33 -0700)]
hdt: Fix bug in module lookup (CLI)
Compare the exact length. The previous version allowed
`show diskkkkkk' to match `show disk'.
Using strcmp is safe here, both strings are null-terminated by
construction.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 27 Apr 2009 06:24:50 +0000 (23:24 -0700)]
hdt: Add disk callbacks (CLI)
In the hdt mode, `show disk' outputs a summary for all disks
(C/H/S, EDD (version, size) and host/interface).
In the disk mode, `show' outputs the same as above, `show disks'
a full description for all disks (with partitions) and `show disk 0x80'
detailed information for one disk only (0x80 in that example).
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 27 Apr 2009 06:17:19 +0000 (23:17 -0700)]
hdt: Fix modules lookup to compare against full callback name (CLI)
Impact: remove auto-aliases feature but fix potential bug
Comparing the first letters of the supplied command to look for
the callback was interesting, since it added aliases automatically
(`show bi' matched `show bios'). Unfortunately, that caused some issues
in certain situation (`show disk' matching `show disks').
Removing the feature.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 26 Apr 2009 21:37:00 +0000 (14:37 -0700)]
Merge commit 'hdt-erwan/master' into for-erwan
Pierre-Alexandre Meyer [Sun, 26 Apr 2009 21:35:56 +0000 (14:35 -0700)]
Merge branch 'disklib' into for-erwan
Conflicts:
com32/hdt/hdt-common.c
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 26 Apr 2009 21:14:49 +0000 (14:14 -0700)]
hdt: Make the disk mode use parse_partition_table() (CLI)
Impact: code refactoring
Leverage the new call parse_partition_table() in the disk CLI.
Misc.: enhance UI output, add space in the columns for up to 46 TB disks.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 26 Apr 2009 21:09:18 +0000 (14:09 -0700)]
gpllib: Add parse_partition_table() to iterate through all partitions on a disk
Impact: expand gpllib disk API
parse_partition_table() can be used to execute a callback on each partition.
The signature of the callback is:
void callback(struct driveinfo *drive_info,
struct part_entry *ptab,
struct part_entry *ptab_root,
int offset_root,
int local_partition_number,
int ebr_seen)
* drive_info represents the disk.
* ptab is the current partition entry processed.
* ptab_root is the partition entry linking to the current one processed (extended only).
* offset_root is the offset of the ebr when iterating through extended partitions
(0 otherwise).
* local_partition_number is the number of the partition processed (0->3).
* ebr_seen counts the total number of ebr processed.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 26 Apr 2009 00:52:02 +0000 (17:52 -0700)]
hdt: Improve disk output (CLI)
Do not print EDD C/H/S info, since it is not really useful.
Add disk size to the summary.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Erwan Velu [Thu, 23 Apr 2009 20:28:43 +0000 (22:28 +0200)]
hdt: Adding hdt> show vpd
Impact: Adding a missing CLI command
Prior to that commit, "hdt> show vpd" didn't worked.
Erwan Velu [Thu, 23 Apr 2009 20:10:08 +0000 (22:10 +0200)]
hdt: Adding hotkey for VPD
Impact: VPD menu is now reachable via its "V" hotkey
Prior to that commit, VPD menu wasn't selectable using a direct keyboard key.
Erwan Velu [Thu, 23 Apr 2009 20:08:51 +0000 (22:08 +0200)]
hdt: displaying only populated VPD' items
Impact: No need to display empty items
This commit improve VPD menu by not displaying empty items
Erwan Velu [Thu, 23 Apr 2009 16:51:57 +0000 (18:51 +0200)]
hdt: 0.3.1
Impact: new release
New release
Pierre-Alexandre Meyer [Thu, 23 Apr 2009 06:57:33 +0000 (23:57 -0700)]
Merge commit 'mouraf/for-erwan' into for-erwan
Conflicts:
com32/hdt/hdt-cli-hdt.c
Pierre-Alexandre Meyer [Tue, 21 Apr 2009 19:05:46 +0000 (12:05 -0700)]
hdt: Do not print information about buggy extended partitions
Impact: bug fix
Add a sanity check before printing extended partitions.
As hpa notes in chain.c:
Sanity check entry: must not extend outside the extended partition.
This is necessary since some OSes put crap in some entries.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 21 Apr 2009 19:04:03 +0000 (12:04 -0700)]
hdt: Do not modify offsets in the part_entry itself
Impact: fix bug
When printing extended partitions information, we need to adjust
the start lba. Do not modify it in the part_entry struct but just
print the adjusted one.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 21 Apr 2009 19:02:23 +0000 (12:02 -0700)]
gpllib: Handle unknown labels (disk)
Return "Unknown" for unknown labels.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 21 Apr 2009 19:01:15 +0000 (12:01 -0700)]
gpllib: Add default error handling (disk)
In case of an unknown error, display a default message.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 21 Apr 2009 17:05:05 +0000 (10:05 -0700)]
hdt: Add missing header in hdt-util.c
Impact: fix build
Add missing #include <string.h> in hdt-util.c.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 21 Apr 2009 17:02:51 +0000 (10:02 -0700)]
hdt: Check if a swsusp image exists on swap partitions
Impact: new feature, add error debug information
When printing partitions information, add a message in the CLI if a swap device
contains a valid swsusp (hibernate) image.
Misc.: check and print, if needed, errors after each I/O operation.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 21 Apr 2009 17:01:38 +0000 (10:01 -0700)]
gpllib: Build new objects (disk)
Add error.o and swsusp.o as part of the gpllib build.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 21 Apr 2009 16:58:35 +0000 (09:58 -0700)]
gpllib: Add swsusp_check to check for swsusp signature
swsusp is a Linux mechanism to put a computer to sleep. In case of hibernation,
an image is written to the disk, on a swap partition.
swsusp_check can be used to check if a device contains the magic swsusp signature,
meaning that an image is present.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 21 Apr 2009 16:56:11 +0000 (09:56 -0700)]
gpllib: Propagate error codes in disk library
It is worth propagating read/write error codes back to the caller. He can
pass NULL to ignore them, or an int* that will be populated.
To decode it, one can use the get_error function (see disk/error.c).
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 21 Apr 2009 16:53:16 +0000 (09:53 -0700)]
gpllib: Move partition declarations to disk/partition.h
Add a new file for partition related structures.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 21 Apr 2009 16:51:28 +0000 (09:51 -0700)]
gpllib: Move get_error from disk/util.c to disk/error.c
The get_error function is fairly big. It is worth creating
a new file for it.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 21 Apr 2009 16:48:09 +0000 (09:48 -0700)]
gpllib: Add disk/common.h for shared definitions
A couple of structures/definitions are shared between several files
in the disk library. Add them in disk/common.h
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 21 Apr 2009 02:46:45 +0000 (19:46 -0700)]
hdt: Add IEC 60027 format for disk size (menu)
Impact: move the decimal format code to hdt-util.c
Display size in MiB/GiB/TiB as well in the disk menu.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 21 Apr 2009 02:31:13 +0000 (19:31 -0700)]
hdt: Use IEC 60027 standard for capacity (CLI)
Impact: add hdt-util.c for generic helpers
Display size of partitions in kibi, mebi, gibi ot tebibytes.
There is no point in displaying the number of sectors in the CLI, a
human readable size is more useful.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 21 Apr 2009 00:19:26 +0000 (17:19 -0700)]
hdt: Process extended partitions (CLI)
Print information about extended partitions in the CLI.
Note: the offsets reported are the offsets found in the EBR. We may want to
adjust it with the offset in the MBR.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 20 Apr 2009 22:26:12 +0000 (15:26 -0700)]
hdt: Add partitions information in disk menu
Show information about valid partitions found (start, end, length, type, ...).
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 20 Apr 2009 04:13:47 +0000 (21:13 -0700)]
hdt: Dump partition tables (CLI)
Use the new disk API to read mbrs and dump information about detected
primary partitions.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 20 Apr 2009 04:09:21 +0000 (21:09 -0700)]
gpllib: Add partition table structure (disk)
Impact: disk API extension
Add part_entry structure to describe DOS partition tables.
The new get_label call translates a label id to a meaningful string
describing the partition.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 20 Apr 2009 04:06:39 +0000 (21:06 -0700)]
gpllib: Add read_mbr helper (disk)
Impact: disk API extension
read_mbr takes a drive number and returns a pointer to a malloced buffer
containing its mbr.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 20 Apr 2009 01:26:39 +0000 (18:26 -0700)]
disk.c32: Fix indentation
Impact: none
Fix indentation for the loop ending curly brace.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 20 Apr 2009 01:25:44 +0000 (18:25 -0700)]
hdt: Adapt disk CLI/menu to new struct devinfo
The struct devinfo has slightly changed. Reflect the changes in hdt.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 20 Apr 2009 00:11:59 +0000 (17:11 -0700)]
gpllib: Don't clobber legacy C/H/S parameters with EDD ones
Impact: driveinfo structure change, new disk.c32 module
Adapt driveinfo structure to store both legacy and EDD parameters. Change utility
functions to use EDD when available (C/H/S being a fallback).
Add a new disk.c32 module to test the disk library. It will print information
(geometry) about every detected drive.
Misc.: refactoring, set ES:DI to 0:0 when querying legacy C/H/S
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 19 Apr 2009 19:27:51 +0000 (12:27 -0700)]
hdt: Fix typo in device_parameter struct
cheksum should read checksum.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 19 Apr 2009 19:25:09 +0000 (12:25 -0700)]
hdt: Remove misguiding printf() (disks)
When detecting disks, we iterate through all ports. The number of disks
scanned will always be 127, no matter how many are actually plugged in.
Remove extra printf() when scanning.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 19 Apr 2009 19:19:53 +0000 (12:19 -0700)]
hdt: Fix EDD format (menu)
The EDD version is more meaningful if displayed using an hexadecimal
format:
01h = 1.x
20h = 2.0 / EDD-1.0
21h = 2.1 / EDD-1.1
30h = EDD-3.0
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 19 Apr 2009 19:16:38 +0000 (12:16 -0700)]
hdt: Remove inappropriate free()
Impact: fix crash
This extra free() is not needed, as the error buffer is already freed in the
loop.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Erwan Velu [Sun, 19 Apr 2009 18:21:12 +0000 (20:21 +0200)]
hdt: removing useless more_printf
Impact: improving user experience
hdt>show modes was using more_printf. This is pretty useless and
annoying for users.
Pierre-Alexandre Meyer [Sun, 19 Apr 2009 15:39:08 +0000 (08:39 -0700)]
hdt: Add `show disk' in hdt mode (CLI)
It is now possible to see disks from hdt mode, via the `show disk'
command.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 19 Apr 2009 15:31:57 +0000 (08:31 -0700)]
Merge commit 'mouraf/for-erwan' into disklib
Conflicts:
com32/hdt/hdt-cli.c
com32/hdt/hdt-cli.h
Pierre-Alexandre Meyer [Sun, 19 Apr 2009 15:26:34 +0000 (08:26 -0700)]
hdt: Refactor disk menu
Make the disk menu use the new disk library.
Misc.: remove firmware, serial number and model information as they aren't
detected yet.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 19 Apr 2009 15:20:09 +0000 (08:20 -0700)]
hdt: Add disk mode (CLI)
The disk mode features drives autodetection (geometry). Generic geometry
code from hdt-ata.c has been replaced by the new disk gpllib.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 19 Apr 2009 15:13:00 +0000 (08:13 -0700)]
gpllib: Add disk library
This library features read and write operations, as well as geometry detection.
It will prevent duplicating code between several modules (e.g. hdt and chain.c32).
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Erwan Velu [Sun, 19 Apr 2009 09:39:57 +0000 (11:39 +0200)]
hdt: removing useless more_printf
Impact: none
more_printf isn't needed for such display
Erwan Velu [Sun, 19 Apr 2009 08:02:08 +0000 (10:02 +0200)]
hdt: more_printf was eating a line
Impact: Visual. Some lines were missing at display
The more_printf call was missing some lines to display
Erwan Velu [Sun, 19 Apr 2009 07:54:14 +0000 (09:54 +0200)]
hdt: MAC Address should only be displayed on the PXE Device
Impact: MAC address were shown on invalid devices
Prior to that commit, the mac address of the PXE booted network card was
displayed on every pci devices.... weird.
Erwan Velu [Sun, 19 Apr 2009 07:42:25 +0000 (09:42 +0200)]
hdt: fixing typo
Impact: fixing compilation errors
Wrong call :(
Erwan Velu [Sun, 19 Apr 2009 07:40:41 +0000 (09:40 +0200)]
hdt: Cleaning dmi chassis asset tag output
Impact: Visual
Some users reported this dmi/chassis/asset tag could reports many
spaces.
Erwan Velu [Sun, 19 Apr 2009 07:35:06 +0000 (09:35 +0200)]
hdt: removing multiple spaces
Impact: Improving visual experience
Some hardware reported strings contains multiple spaces.
This isn't very nice for managing display. The del_multiple_spaces()
function is removing multiple spaces.
Pierre-Alexandre Meyer [Sat, 18 Apr 2009 18:39:09 +0000 (11:39 -0700)]
Merge commit 'origin/for-erwan' into disklib
Erwan Velu [Sat, 18 Apr 2009 17:15:34 +0000 (19:15 +0200)]
hdt: moving contact adress to the mailing list
Impact: none
Mailing list is the best place to have user inputs
Pierre-Alexandre Meyer [Sat, 18 Apr 2009 03:08:06 +0000 (20:08 -0700)]
hdt: Add VPD menu item
Add an item to display VPD information, if detected.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Fri, 17 Apr 2009 23:29:49 +0000 (16:29 -0700)]
hdt: Add vpd mode (CLI)
Add the vpd mode to dump the vpd structure, if found.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Fri, 17 Apr 2009 21:55:12 +0000 (14:55 -0700)]
Merge commit 'erwan/master' into for-erwan
Conflicts:
com32/hdt/hdt-cli-hdt.c
com32/hdt/hdt-cli.c
Pierre-Alexandre Meyer [Fri, 17 Apr 2009 21:35:52 +0000 (14:35 -0700)]
hdt: Get rid of nb_modules in struct cli_module_descr
End list of modules commands by NULL instead of managing manually
the number in nb_modules. This should limit the number of bugs when adding new
features.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Thu, 16 Apr 2009 22:27:39 +0000 (15:27 -0700)]
hdt: Get rid of MAX_MODES
End the list of modes by NULL instead of managing manually the length.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Erwan Velu [Thu, 16 Apr 2009 20:54:03 +0000 (22:54 +0200)]
hdt: removing useless clear_screen
Impact: Improve user experience
Prevent clear screen when not necessary