Pierre-Alexandre Meyer [Sat, 11 Apr 2009 01:49:24 +0000 (18:49 -0700)]
Merge commit 'hdt-erwan/master' into for-erwan
Conflicts:
com32/hdt/hdt-ata.c
com32/hdt/hdt-cli-pxe.c
com32/hdt/hdt-cli-vesa.c
com32/hdt/hdt-cli.c
com32/hdt/hdt-common.c
com32/hdt/hdt-menu-pci.c
Erwan Velu [Fri, 10 Apr 2009 19:53:00 +0000 (21:53 +0200)]
VPD: Adding the Virtual Product Data detection
Impact: It's now possible to reach VPD's info
Calling vpd_decode() populate a VPD structure to display :
- VPD's base address
- Bios Build ID
- Bios Release Date
- Bios Version
- Box Serial Number
- Motherboard Serial Number
- Machine Type/Model
- Default Flash Filename
Erwan Velu [Thu, 9 Apr 2009 19:53:25 +0000 (21:53 +0200)]
hdt: Fixing typo. Thx to dag.
Impact: Cosmetic
Typo error
Erwan Velu [Mon, 6 Apr 2009 10:58:11 +0000 (12:58 +0200)]
hdt: Don't display unsupported modes
Impact: Prevent from displaying 0x0 modes
Some vesa bioses reports 0x0 modes, no need to display them
Erwan Velu [Fri, 3 Apr 2009 18:08:48 +0000 (20:08 +0200)]
hdt: Adding exit menu in menu mode
Impact: Users can now exit hdt :)
It's now possible to exit HDT properly. Thx to fcrozat report.
Erwan Velu [Fri, 3 Apr 2009 18:04:53 +0000 (20:04 +0200)]
hdt: Fixing aligment in about menu
Impact: cosmetic
Fixing contact in about mode
Erwan Velu [Fri, 3 Apr 2009 18:01:17 +0000 (20:01 +0200)]
hdt: Fixing author name
Impact: cosmetic
Fixing author name
Erwan Velu [Thu, 2 Apr 2009 18:31:17 +0000 (20:31 +0200)]
hdt: cursor pos must be uint
Impact: Prevent warning while comparing with strlen() & co.
Cursor pos is usually compared with string pos, so it must be an uint
Erwan Velu [Thu, 2 Apr 2009 18:23:38 +0000 (20:23 +0200)]
hdt: Implement DEL behavior in cli mode
Impact: Users can now use DEL
DEL now deletes the next char
Erwan Velu [Thu, 2 Apr 2009 17:32:34 +0000 (19:32 +0200)]
Merge branch 'for-erwan' of ssh://erwan@terminus.zytor.com/pub/git/users/pam/hdt-pierre into pam
Pierre-Alexandre Meyer [Thu, 2 Apr 2009 17:08:08 +0000 (10:08 -0700)]
hdt: Trim spaces in the parser
Impact: Fix potential bugs when extra spaces are present
It is now possible to enter:
' set fooo bar baz '
which will be understood as
'set fooo bar baz'
The real benefit is for the autocompletion:
'set <TAB>'
does work.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Erwan Velu [Thu, 2 Apr 2009 15:28:12 +0000 (17:28 +0200)]
Merge branch 'for-erwan' of ssh://erwan@terminus.zytor.com/pub/git/users/pam/hdt-pierre into pam
Pierre-Alexandre Meyer [Thu, 2 Apr 2009 04:03:11 +0000 (21:03 -0700)]
hdt: Autocomplete modes
Impact: Add feature
Add modes in the list of potential matches when autocompleting.
For instance, 'px'<TAB> will autocomplete in 'pxe', which is an
alias for 'set mode pxe'.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Thu, 2 Apr 2009 03:51:45 +0000 (20:51 -0700)]
hdt: Fix !!! BUG when exiting
Impact: Fix error messages
There is no cli_mode_descr for the exit mode. Add a condition not to
print a !!! BUG message if cli_mode_descr is NULL when exiting.
Misc.: fix messages. hdt_cli.mode is an integer, not a string.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Erwan Velu [Tue, 31 Mar 2009 19:28:05 +0000 (21:28 +0200)]
hdt: Adding lib-ansi to manage ansi escape codes
Impact: code is easier to read
Basic implementation of ansi escape codes. This make code easier to
read.
Erwan Velu [Mon, 30 Mar 2009 19:21:09 +0000 (21:21 +0200)]
hdt: skip_spaces is requires for completion
Impact: Completion works again
The previous commit broke the completion
Erwan Velu [Mon, 30 Mar 2009 18:49:21 +0000 (20:49 +0200)]
hdt: renaming skipspace to remove_spaces
Impact: this function now remove trailing spaces too
We need to remove both begining & trailing spaces to insure a good match
while reading cli's input.
Pierre-Alexandre Meyer [Mon, 30 Mar 2009 01:50:21 +0000 (18:50 -0700)]
hdt: Don't print "Flags :" when there is no cpu flags
Impact: Nicer output
The cpu module used to print a "Flags :" even if there was nothing to
print (using Qemu, I had a third Flags line empty). Fixing it.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 30 Mar 2009 01:32:48 +0000 (18:32 -0700)]
hdt: Fix cpu summary alignment
Impact: Nicer output
The fields in the cpu summary weren't aligned. Fixing it.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 30 Mar 2009 01:18:23 +0000 (18:18 -0700)]
hdt: NULLify autocomplete_tail on destroy
Impact: Fix memory corruption
autocomplete_tail needs to be NULLed when freeing the list of
autocomplete tokens or autocomplete_add_token_to_list can get really
confused when starting a new list.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 30 Mar 2009 00:59:39 +0000 (17:59 -0700)]
hdt: Add "menu" command
Impact: Switching back from CLI to menu is possible
The "menu" command allows the user to display the menu from the CLI.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 30 Mar 2009 00:37:05 +0000 (17:37 -0700)]
hdt: Execute default callback only if no module is specified
Impact: 'show' in hdt shows the main summary
Previously, 'show bidule' would execute the default callback for the
list of show modules. This is confusing. Let's execute it only if no
module is specified.
Note: same behaviour for 'set'.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 30 Mar 2009 00:24:35 +0000 (17:24 -0700)]
hdt: Add "?" alias for help
Impact: New alias
"?" is now mapped to help.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 30 Mar 2009 00:08:12 +0000 (17:08 -0700)]
hdt: Add show_modes
Impact: help more verbose w.r.t. modes
show modes (in hdt mode) will list the availables modes.
help (in any mode) will also list them.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 29 Mar 2009 23:11:47 +0000 (16:11 -0700)]
hdt: Add autocompletion support
Impact: current_mode is global; cleanups
Autocompletion is now supported.
Without anything on the line, hitting TAB at the prompt once will show the list
of available commands. Hitting TAB a second time will start cycling
through these commands, replacing one by one on the prompt.
If the start of a command is entered, e.g. 'cl', the list of possible
matches is narrowed ('cl' will only yield 'clear').
The same behaviour exists with modules. Having entered 'show' on the
command line, the list of possible show modules will be presented.
Same for narrow searches: 'show s' in the hdt mode would only yield
'show summary' and 'show syslinux'.
Misc.: cleanups, enhanced some messages.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Erwan Velu [Sun, 29 Mar 2009 19:28:23 +0000 (21:28 +0200)]
pci: Rename get_module_name_from_pci_ids
Impact: none
Rename get_module_name_from_pci_ids to get_module_name_from_pcimap since
the module names are read from the modules.pcimap and not pci.ids file.
Signed-off-by: Sebastian Herbszt (herbszt@gmx.de)
Pierre-Alexandre Meyer [Sun, 29 Mar 2009 17:19:47 +0000 (10:19 -0700)]
hdt: Missing include for getkey
Impact: Fix the build
more_printf now uses the proper includes
Erwan Velu [Fri, 27 Mar 2009 21:03:24 +0000 (22:03 +0100)]
hdt: prevent unless disk's menu
Impact: none
No need to compute disk's menu if no disk are detected
Erwan Velu [Fri, 27 Mar 2009 20:47:42 +0000 (21:47 +0100)]
hdt: Converting printf to more_printf
Impact: Improving display management
more_printf is better to manage output as it ask users to press return
when the content is too long
Erwan Velu [Fri, 27 Mar 2009 18:04:00 +0000 (19:04 +0100)]
hdt: Adding memtest= boot parameter
Impact: memtest=<label> allow users to give another label name for the
memtest call
Prior to that version, memtest label was hardcoded to "memtest".
Now, "memtest" is the default label but could be overrided by users.
Erwan Velu [Fri, 27 Mar 2009 17:40:59 +0000 (18:40 +0100)]
hdt: Adding PXE information on the booted pci device
Impact: Display which pci device is the one used for PXE
Sync with cli's behavior
Erwan Velu [Fri, 27 Mar 2009 17:26:59 +0000 (18:26 +0100)]
hdt: Adding PXE information on the booted pci device
Impact: Display which pci device is the one used for PXE
Sync with cli's behavior
Erwan Velu [Fri, 27 Mar 2009 15:21:21 +0000 (16:21 +0100)]
doc: Adding more initrd details
Signed-off-by: Gert Hulselmans (hulselmansgert@gmail.com)
Erwan Velu [Fri, 27 Mar 2009 15:14:43 +0000 (16:14 +0100)]
doc: Fixing typo
Signed-off-by: Gert Hulselmans (hulselmansgert@gmail.com)
Erwan Velu [Thu, 26 Mar 2009 21:04:19 +0000 (22:04 +0100)]
hdt: Fixing modules count for hdt mode
Impact: "show hdt" command now works
We have 9 modules
Erwan Velu [Thu, 26 Mar 2009 19:17:32 +0000 (20:17 +0100)]
hdt: Updating author name
Impact: none
Made for testing purpose
Erwan Velu [Thu, 26 Mar 2009 17:47:57 +0000 (18:47 +0100)]
hdt: bump version to 0.2.7
Impact: None
Bump to 0.2.7
Erwan Velu [Thu, 26 Mar 2009 17:36:50 +0000 (18:36 +0100)]
Merge commit 'origin/repair'
Erwan Velu [Wed, 25 Mar 2009 22:25:38 +0000 (23:25 +0100)]
hdt: in the cli, we have to Skip empty lines
Impact: empty lines were confusing history
History works better when we ignore empty lines
Erwan Velu [Wed, 25 Mar 2009 19:50:39 +0000 (20:50 +0100)]
hdt: Workaround for PXE detection
Impact: The PCI device matching could fails in some cases
In some cases, trying to find the exact bus/dev/fun/vendor/product
fails reported by the pxe rom fails. In such case, that workaround will
only look at the vendor/product id
Erwan Velu [Wed, 25 Mar 2009 17:51:48 +0000 (18:51 +0100)]
hdt: Fixing output of vesa software revision
Impact: Vesa's software revision was misdisplayed and could lead to
corruption
Displaying an int with %s isn't a good idea ;o)
Pierre-Alexandre Meyer [Wed, 25 Mar 2009 15:53:51 +0000 (08:53 -0700)]
hdt: Fix typo in vesa initialization
Impact: Bug fixing.
This caused some garbage to be displayed when detecting vesa.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Erwan Velu [Wed, 25 Mar 2009 11:59:00 +0000 (12:59 +0100)]
hdt: Pxe mode might generate corruption
Impact: Prevent some hard lock due to pxe detection
In some cases, we can't find the associated PCI device.
In such situation, we shouldn't try to display its properties as
pci_device is set to NULL.
Erwan Velu [Tue, 24 Mar 2009 21:43:07 +0000 (22:43 +0100)]
hdt: Fixing crash on some optical drives
Impact: Prevent some hard crashes
On some optical drives, requesting int 13, func 0x48 make the system
crash. In fact, if the geometry isn't valid (optical drives), no need to
check for extended attributes
Erwan Velu [Tue, 24 Mar 2009 18:50:04 +0000 (19:50 +0100)]
menu: Increasing the maximum number of menus
Impact: some hosts can generate many menus when used with hdt
In some cases, we can run out of menus
Erwan Velu [Mon, 23 Mar 2009 17:20:38 +0000 (18:20 +0100)]
pci: Check if configuration type is PCI_CFG_NONE
Impact: prevent from grabbing configuration when PCI is PCI_CFG_NONE
Signed-off-by: Sebastian Herbszt (herbszt@gmx.de)
Erwan Velu [Mon, 23 Mar 2009 17:17:55 +0000 (18:17 +0100)]
pci: Remove "(void)cfgtype"
Impact: none
Remove useless "(void)cfgtype"
Signed-off-by: Sebastian Herbszt (herbszt@gmx.de)
Erwan Velu [Mon, 23 Mar 2009 09:15:11 +0000 (10:15 +0100)]
pci modules: Check for pci_scan() == NULL.
Impact: we don't have to grab more details if pci_scan returns NULL
Signed-off-by: Sebastian Herbszt (herbszt@gmx.de)
Erwan Velu [Mon, 23 Mar 2009 09:05:58 +0000 (10:05 +0100)]
hdt: Check for pci_scan() == NULL.
Impact: we don't have to grab more details if pci_scan returns NULL
Signed-off-by: Sebastian Herbszt (herbszt@gmx.de)
Erwan Velu [Sun, 22 Mar 2009 08:24:23 +0000 (09:24 +0100)]
hdt: Adding IPMI detection
Impact: HDT can now reports if an IPMI base board exists
By using DMI, it's now possible to detect IPMI base boards
Bump to 0.2.6
Erwan Velu [Sun, 22 Mar 2009 08:23:15 +0000 (09:23 +0100)]
dmi: Adding IPMI detection
Impact: IPMI base board can now be detected
Detecting IPMI via DMI structures
Erwan Velu [Wed, 25 Mar 2009 22:38:29 +0000 (23:38 +0100)]
Merge commit 'origin/erwan'
Erwan Velu [Wed, 25 Mar 2009 22:25:38 +0000 (23:25 +0100)]
hdt: in the cli, we have to Skip empty lines
Impact: empty lines were confusing history
History works better when we ignore empty lines
Erwan Velu [Wed, 25 Mar 2009 21:06:18 +0000 (22:06 +0100)]
Merge branch 'erwan'
Erwan Velu [Wed, 25 Mar 2009 19:50:39 +0000 (20:50 +0100)]
hdt: Workaround for PXE detection
Impact: The PCI device matching could fails in some cases
In some cases, trying to find the exact bus/dev/fun/vendor/product
fails reported by the pxe rom fails. In such case, that workaround will
only look at the vendor/product id
Erwan Velu [Wed, 25 Mar 2009 17:51:48 +0000 (18:51 +0100)]
hdt: Fixing output of vesa software revision
Impact: Vesa's software revision was misdisplayed and could lead to
corruption
Displaying an int with %s isn't a good idea ;o)
Pierre-Alexandre Meyer [Wed, 25 Mar 2009 15:53:51 +0000 (08:53 -0700)]
hdt: Fix typo in vesa initialization
Impact: Bug fixing.
This caused some garbage to be displayed when detecting vesa.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Wed, 25 Mar 2009 15:53:51 +0000 (08:53 -0700)]
hdt: Fix typo in vesa initialization
Impact: Bug fixing.
This caused some garbage to be displayed when detecting vesa.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Wed, 25 Mar 2009 15:53:51 +0000 (08:53 -0700)]
hdt: Fix typo in vesa initialization
Impact: Bug fixing.
This caused some garbage to be displayed when detecting vesa.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Erwan Velu [Wed, 25 Mar 2009 11:59:00 +0000 (12:59 +0100)]
hdt: Pxe mode might generate corruption
Impact: Prevent some hard lock due to pxe detection
In some cases, we can't find the associated PCI device.
In such situation, we shouldn't try to display its properties as
pci_device is set to NULL.
Pierre-Alexandre Meyer [Wed, 25 Mar 2009 05:37:53 +0000 (22:37 -0700)]
hdt: Execute hdt default callbacks in each mode if needed
Impact: One can switch modes without going back through hdt
Given a command `dmi> show foo', the ordering of callbacks is now
the following:
1/ execute module 'foo' of commands set 'show' of mode dmi
2/ execute default callback of commands set 'show' of mode dmi
3/ [NEW] execute module 'foo' of commands set 'show' of mode hdt
(2/ is executed if 1/ doesn't exist, 3/ is executed if 2/ doesn't exist
either, if 3/ doesn't exist an error is displayed).
This allows for instance to switch between modes without exiting first
to hdt.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Wed, 25 Mar 2009 05:27:20 +0000 (22:27 -0700)]
hdt: Implement aliases
Impact: New alias feature; CLi backward compatible
`dmi' is now a shorthand for `set mode dmi' (idem for all modes). This
is performed via a new routine: expand_aliases.
It is now also possible to match aliases (e.g. `q', `quit') to a single
valid command (e.g. `exit'). The list needs to be populated manually and
is intented to be kept short. Eventually, the CLI will support
autocompletion that will help user experience.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Wed, 25 Mar 2009 05:23:46 +0000 (22:23 -0700)]
hdt: Fix NULL dereference in core
Impact: Bug fixing; add debug info
There was a NULL dereference in the CLI core for modes that doesn't
implement a set of modules (show, set, ...).
Also, check the command name on the `command' variable, not the raw line.
Misc.: add debug info.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Erwan Velu [Tue, 24 Mar 2009 21:43:07 +0000 (22:43 +0100)]
hdt: Fixing crash on some optical drives
Impact: Prevent some hard crashes
On some optical drives, requesting int 13, func 0x48 make the system
crash. In fact, if the geometry isn't valid (optical drives), no need to
check for extended attributes
Erwan Velu [Tue, 24 Mar 2009 18:50:04 +0000 (19:50 +0100)]
menu: Increasing the maximum number of menus
Impact: some hosts can generate many menus when used with hdt
In some cases, we can run out of menus
Erwan Velu [Mon, 23 Mar 2009 17:20:38 +0000 (18:20 +0100)]
pci: Check if configuration type is PCI_CFG_NONE
Impact: prevent from grabbing configuration when PCI is PCI_CFG_NONE
Signed-off-by: Sebastian Herbszt (herbszt@gmx.de)
Erwan Velu [Mon, 23 Mar 2009 17:17:55 +0000 (18:17 +0100)]
pci: Remove "(void)cfgtype"
Impact: none
Remove useless "(void)cfgtype"
Signed-off-by: Sebastian Herbszt (herbszt@gmx.de)
Erwan Velu [Mon, 23 Mar 2009 09:15:11 +0000 (10:15 +0100)]
pci modules: Check for pci_scan() == NULL.
Impact: we don't have to grab more details if pci_scan returns NULL
Signed-off-by: Sebastian Herbszt (herbszt@gmx.de)
Erwan Velu [Mon, 23 Mar 2009 09:05:58 +0000 (10:05 +0100)]
hdt: Check for pci_scan() == NULL.
Impact: we don't have to grab more details if pci_scan returns NULL
Signed-off-by: Sebastian Herbszt (herbszt@gmx.de)
Pierre-Alexandre Meyer [Mon, 23 Mar 2009 07:00:52 +0000 (00:00 -0700)]
hdt: Fixing merge
Impact: Fix the build.
The previous merge seems to have gone wrong. Fixing it.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Erwan Velu [Sun, 22 Mar 2009 18:08:58 +0000 (19:08 +0100)]
Merge branch 'master' into pierre
Conflicts:
com32/hdt/hdt-cli-dmi.c
com32/hdt/hdt-cli.c
com32/hdt/hdt-cli.h
Erwan Velu [Sun, 22 Mar 2009 08:24:23 +0000 (09:24 +0100)]
hdt: Adding IPMI detection
Impact: HDT can now reports if an IPMI base board exists
By using DMI, it's now possible to detect IPMI base boards
Bump to 0.2.6
Erwan Velu [Sun, 22 Mar 2009 08:23:15 +0000 (09:23 +0100)]
dmi: Adding IPMI detection
Impact: IPMI base board can now be detected
Detecting IPMI via DMI structures
H. Peter Anvin [Sun, 22 Mar 2009 05:29:09 +0000 (22:29 -0700)]
Add "and contributors" to the copyright banner
Clarify that there are nowadays more copyright holders than just
myself.
Shao Miller [Sun, 22 Mar 2009 04:27:56 +0000 (00:27 -0400)]
memdisk: additional comments in memdisk.inc and postprocess.pl
Just a sprinkling of comments adding further description to the code.
Pierre-Alexandre Meyer [Sun, 22 Mar 2009 04:51:22 +0000 (21:51 -0700)]
Merge commit 'erwan-private/master' into for-erwan
Conflicts:
com32/hdt/hdt-cli.c
com32/hdt/hdt-cli.h
Pierre-Alexandre Meyer [Sun, 22 Mar 2009 04:14:59 +0000 (21:14 -0700)]
hdt: Final cleanups to switch to the new cli
Impact: Old cli code has been removed.
This patch ends the transition to the new framework, the entire old code
has been removed.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 22 Mar 2009 04:10:04 +0000 (21:10 -0700)]
hdt: Make VESA module use the new framework
Impact: Cleanups in the VESA module.
The VESA module now uses the new framework.
Misc.: fix indentation in the VESA module.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 22 Mar 2009 04:03:48 +0000 (21:03 -0700)]
hdt: Make PCI module use the new framework
Impact: Cleanups in the PCI module.
The PCI module now uses the new framework.
Misc.: fix indentation in the PCI module.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 22 Mar 2009 03:52:49 +0000 (20:52 -0700)]
hdt: Make CPU module use the new framework
Impact: Cleanups in the CPU module.
The CPU module now uses the new framework.
Misc.: fix indentation in the CPU module.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 22 Mar 2009 03:46:34 +0000 (20:46 -0700)]
hdt: Make KERNEL module use the new framework
Impact: Cleanups in the KERNEL module.
The KERNEL module now uses the new framework.
Misc.: fix indentation in the KERNEL module.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 22 Mar 2009 03:36:13 +0000 (20:36 -0700)]
hdt: Make PXE module use the new framework
Impact: Cleanups in the PXE module.
The PXE module now uses the new framework.
Misc.: fix indentation in the PXE module.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 22 Mar 2009 03:29:49 +0000 (20:29 -0700)]
hdt: Add default callback for the DMI show module
Impact: Extend the cli.
`show' in the dmi mode now lists the available modules.
Misc.: remove noisy printf.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 22 Mar 2009 03:01:30 +0000 (20:01 -0700)]
hdt: Convert syslinux module to use the new framework
Impact: Add the concept of default_callback per set of modules
Syslinux only implements a default show command. Previously, this was
triggered by the `show list' command line. It is not really intuitive
and may be confusing (it has another meaning in the DMI module).
There is now the concept of default callback, one that would be
triggered when only `show', `set', ... is entered in the command line.
A common usecase may be that `show' triggers a summary display.
Misc.: small fix in the DMI module.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 22 Mar 2009 02:51:21 +0000 (19:51 -0700)]
hdt: Hide show/set help when no module is defined
Impact: Help output improved.
Small improvement in the module help output: the module_descr structure can be
defined but without any module. Add this sanity check.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 22 Mar 2009 00:46:34 +0000 (17:46 -0700)]
hdt: Implement show commands (hdt mode) with the new framework
Impact: Cleanups.
The summary of each mode (show <module> in hdt mode) is now implemented
using the new framework, as show modules of the hdt mode.
Misc.: cleanups.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 22 Mar 2009 00:17:14 +0000 (17:17 -0700)]
hdt: Implement set_mode with the new framework; Cleanups
Impact: Cleanups, rename cli module structures.
set_mode now uses the new framework.
Add a new file: hdt-cli-hdt.c. hdt-cli.c will contain the core functions
for the cli, whereas hdt-cli-hdt.c will contain callbacks for the hdt
(default) mode.
Misc.: rename core structures to be more meaningful.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 22 Mar 2009 00:11:16 +0000 (17:11 -0700)]
hdt: Cleanups in the DMI module
Impact: Remove compilation warnings, Cleanups, DMI CLI output changed.
Add __unused macro to remove compilation warnings. argc and argv are
needed for consistency sake in the cli, but are not always used.
Slightly change the output of `list' to be more precise. It was
confusing for the first time user to list the modules with 'help' but
then have an error message when a module wasn't available.
Remove unused help function (there is a dynamic global one).
Misc.: move dprintf to the header file.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sat, 21 Mar 2009 15:58:44 +0000 (08:58 -0700)]
hdt: Refactor help option; Cleanups
Impact: Help is usable in all modes, cleanups.
Help is now a generique helper that is shared by all modes.
It prints:
* default commands for the current mode
* the list of modules associated to show for the current mode
* default commands for hdt
For the last item, it doesn't print overwritten commands, e.g. if the
dmi module implements a generic 'list' command and there is a generic,
shared, 'list' command in the hdt mode, the former overwrites the
latter.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
H. Peter Anvin [Fri, 20 Mar 2009 23:34:19 +0000 (16:34 -0700)]
vesacon: remove unused com32sys_t variables
No more direct __intcall()'s in this code, so remove unused register
set variables.
H. Peter Anvin [Fri, 20 Mar 2009 23:31:11 +0000 (16:31 -0700)]
Merge branch 'memdisk-cd'
H. Peter Anvin [Fri, 20 Mar 2009 22:45:55 +0000 (15:45 -0700)]
Merge commit 'hdt/master'
Erwan Velu [Fri, 20 Mar 2009 22:37:05 +0000 (23:37 +0100)]
hdt: Adding contributors
Impact: A new cli command : hdt> show hdt
Bump to 0.2.5
Adding contributor's list
Erwan Velu [Fri, 20 Mar 2009 22:03:28 +0000 (23:03 +0100)]
hdt: commenting some devel messages
Impact: remove useless error messages
Some error messages were displayed even if commands were valid
Erwan Velu [Fri, 20 Mar 2009 22:02:05 +0000 (23:02 +0100)]
hdt: Fixing more_printf to display a proper \n
Impact: Improve the visibility of the message
more_printf could have printed that message without any \n
Erwan Velu [Fri, 20 Mar 2009 21:50:55 +0000 (22:50 +0100)]
hdt: Adding an history
Impact: UP & Down keys can be used to reach the command history
UP & Down keys can be used to parse the history
H. Peter Anvin [Fri, 20 Mar 2009 20:54:54 +0000 (13:54 -0700)]
vesacon: migrate disable fixes from ansicon
Copy the disabled fixes already done in ansicon from checkin
22cd4e378e3aafd402f43030941d6f6b300d0cea.
H. Peter Anvin [Fri, 20 Mar 2009 20:44:39 +0000 (13:44 -0700)]
Document menu.c32 + console 0 fix.
H. Peter Anvin [Fri, 20 Mar 2009 20:43:11 +0000 (13:43 -0700)]
ansicon: handle the disabled case properly
Even when disabled, we need to set the screen size, because the
downstream code depends on it. Set it to 25x80 (maybe we should
swtich this is 24x80) in this case.
Furthermore, when disabled, we should return success == bytes
"written", not zero.
H. Peter Anvin [Fri, 20 Mar 2009 20:41:58 +0000 (13:41 -0700)]
getc: move parseint_esdi out of the getint control flow
parseint_esdi was located in the middle of the getint -> parseint fall
through, with expectedly disastrous results.