platform/upstream/syslinux.git
15 years agohdt: Add show_modes
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>
15 years agohdt: Add autocompletion support
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>
15 years agohdt: Missing include for getkey
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

15 years agohdt: Converting printf to more_printf
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

15 years agohdt: Adding PXE information on the booted pci device
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

15 years agohdt: Fixing modules count for hdt mode
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

15 years agohdt: Fix typo in vesa initialization
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>
15 years agohdt: Execute hdt default callbacks in each mode if needed
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>
15 years agohdt: Implement aliases
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>
15 years agohdt: Fix NULL dereference in core
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>
15 years agohdt: Fixing merge
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>
15 years agoMerge branch 'master' into pierre
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

15 years agohdt: Adding IPMI detection
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

15 years agodmi: Adding IPMI detection
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

15 years agoMerge commit 'erwan-private/master' into for-erwan
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

15 years agohdt: Final cleanups to switch to the new cli
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>
15 years agohdt: Make VESA module use the new framework
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>
15 years agohdt: Make PCI module use the new framework
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>
15 years agohdt: Make CPU module use the new framework
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>
15 years agohdt: Make KERNEL module use the new framework
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>
15 years agohdt: Make PXE module use the new framework
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>
15 years agohdt: Add default callback for the DMI show module
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>
15 years agohdt: Convert syslinux module to use the new framework
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>
15 years agohdt: Hide show/set help when no module is defined
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>
15 years agohdt: Implement show commands (hdt mode) with the new framework
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>
15 years agohdt: Implement set_mode with the new framework; Cleanups
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>
15 years agohdt: Cleanups in the DMI module
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>
15 years agohdt: Refactor help option; Cleanups
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>
15 years agohdt: Adding contributors
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

15 years agohdt: commenting some devel messages
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

15 years agohdt: Fixing more_printf to display a proper \n
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

15 years agohdt: Adding an history
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

15 years agohdt: Implement exit with the new cli framework; Cleanups
Pierre-Alexandre Meyer [Fri, 20 Mar 2009 05:52:50 +0000 (22:52 -0700)]
hdt: Implement exit with the new cli framework; Cleanups

Impact: Cleanups, add the concept of 1 word commands, make hdt_cli global

Add support for one token commands. Each mode can now have "default
commands", which are commands made of only one word.
Some of these are generic (exit, help, ...). They are stored in the
hdt mode structures. Only 'exit' is implemented so far.

Note: this is different from default callbacks for modules:

dmi> exit # default command (shared, stored into
# hdt structures)
dmi> show chassis # will execute the chassis module
# callback stored in the show modules
# list of the dmi mode
dmi> show # will execute the default callback for the
# show modules

The structure is the following:

|
----> mode A
| |
| ------> default_modules
| | |
| | ----> module default
| | |
| | ----> module a
| | |
| | ----> module b
| |
| ------> show_modules
| |
| ----> module default
| |
| ----> module c
| |
| ----> module d
| |
| ----> module e

If A is dmi, c is cpu, d memory, e chassis, etc and default (of
show_modules) displays a summary (command 'show'). a and b are single
commands ('foo', 'bar'). 'exit', 'help', ... fall into that category but are
defined in the hdt mode.

Note2: none of the modules list is mandatory. Most of the time actually,
the default_modules list will be empty.

Misc: Refactor the new framework by extracting logic into helpers.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agoMerge commit 'erwan-private/master' into for-erwan
Pierre-Alexandre Meyer [Fri, 20 Mar 2009 02:15:00 +0000 (19:15 -0700)]
Merge commit 'erwan-private/master' into for-erwan

Conflicts:

com32/hdt/hdt-cli.c
com32/hdt/hdt-cli.h

15 years agohdt: Fixing indentation
Pierre-Alexandre Meyer [Fri, 20 Mar 2009 02:11:03 +0000 (19:11 -0700)]
hdt: Fixing indentation

Impact: None.

spaces -> tabs so that I can merge easily.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Fixing backspace
Erwan Velu [Thu, 19 Mar 2009 22:17:09 +0000 (23:17 +0100)]
hdt: Fixing backspace

Impact: Backspace now have the proper behaviour

Since we can move in the string, backspace have to behave differently.
Fixing style.

15 years agohdt: Adding append mode to cli
Erwan Velu [Thu, 19 Mar 2009 20:40:43 +0000 (21:40 +0100)]
hdt: Adding append mode to cli

Impact: Users can now edit a line

Append mode is now the default mode
This features moving using LEFT,RIGHT,HOME & END keys.

15 years agohdt: ctrl+a or HOME key return to the beginning of line
Erwan Velu [Thu, 19 Mar 2009 18:01:43 +0000 (19:01 +0100)]
hdt: ctrl+a or HOME key return to the beginning of line

Impact: Users can now uses ctrl+a or HOME to return at the beginning of
a line

Ctrl+a or home key is now implemented

15 years agohdt: Skip heading spaces
Erwan Velu [Thu, 19 Mar 2009 17:27:11 +0000 (18:27 +0100)]
hdt: Skip heading spaces

Impact: Allow user to put some space char before the real command

Before that patch, it was required not having any space before the
command. That's not so user friendly ;o)

15 years agohdt: Using a single cli structure to manage the input line
Erwan Velu [Thu, 19 Mar 2009 17:21:55 +0000 (18:21 +0100)]
hdt: Using a single cli structure to manage the input line

Impact: Makes the code easier to write

Using a single s_cli structure for managing the input line, the cursor
position and the prompt

15 years agohdt: Missing include for getkey
Erwan Velu [Thu, 19 Mar 2009 16:32:00 +0000 (17:32 +0100)]
hdt: Missing include for getkey

Impact: remove a warning

more_printf now uses the proper includes

15 years agohdt: more_printf must use getkey
Erwan Velu [Thu, 19 Mar 2009 11:08:34 +0000 (12:08 +0100)]
hdt: more_printf must use getkey

Impact: Users can now press a key to continue

Since we switch to an ansi raw console, the fgets() used
to catch the return when we display to much lines didn't worked.
We now use the getkey function to grab __any__ key, which is better
then.

15 years agohdt: Rewrite DMI module using a new syntax for the CLI
Erwan Velu [Thu, 19 Mar 2009 10:34:49 +0000 (11:34 +0100)]
hdt: Rewrite DMI module using a new syntax for the CLI

Impact: Start refactoring the CLI.

In order to have an extensible CLI, the commands handling needs to be
refactored. This patch starts the migration by refactoring the DMI
module.

Note that the core of the new commands parser has been implemented.
Adapting other modules to use it simply requires to declare
new structures that maps the command string to the callback.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: fixing one remaining display_prompt
Erwan Velu [Thu, 19 Mar 2009 10:03:29 +0000 (11:03 +0100)]
hdt: fixing one remaining display_prompt

Impact: make is now successfull ;o)

A display_prompt didn't get updated

15 years agohdt: Renaming display_prompt to reset_prompt
Erwan Velu [Thu, 19 Mar 2009 09:57:46 +0000 (10:57 +0100)]
hdt: Renaming display_prompt to reset_prompt

Impact: Fix buffer corruption in cli.

The rename occurs to match the reality.
We actually do more than displaying the prompt as we reset some vars.
One of this parameters where wrong too and could occurs corruption.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/boot/syslinux/syslinux
Erwan Velu [Thu, 19 Mar 2009 09:56:43 +0000 (10:56 +0100)]
Merge branch 'master' of git://git./boot/syslinux/syslinux

15 years agorunkernel: further simplify the command-line parser syslinux-3.74-pre8
H. Peter Anvin [Thu, 19 Mar 2009 04:06:30 +0000 (21:06 -0700)]
runkernel: further simplify the command-line parser

Further simplifications to the command-line parser, both from a code
size and a usability perspective.

15 years agoRefactor command line parsing; support "quiet" option syslinux-3.74-pre7
H. Peter Anvin [Thu, 19 Mar 2009 03:40:26 +0000 (20:40 -0700)]
Refactor command line parsing; support "quiet" option

Refactor the command line parser to be more of a general parser
instead of treating each option as an ad hoc feature.

Suppress the Loading... prompt if "quiet" is specified on the command
line.  Some messed-up people want it this way.

15 years agohdt: Rewrite DMI module using a new syntax for the CLI
Pierre-Alexandre Meyer [Thu, 19 Mar 2009 03:22:58 +0000 (20:22 -0700)]
hdt: Rewrite DMI module using a new syntax for the CLI

Impact: Start refactoring the CLI.

In order to have an extensible CLI, the commands handling needs to be
refactored. This patch starts the migration by refactoring the DMI
module.

Note that the core of the new commands parser has been implemented.
Adapting other modules to use it simply requires to declare
new structures that maps the command string to the callback.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Reset buffer in cli
Pierre-Alexandre Meyer [Wed, 18 Mar 2009 23:22:46 +0000 (16:22 -0700)]
hdt: Reset buffer in cli

Impact: Fix buffer corruption in cli.

After displaying the line, cur_pos and cli_line need to be reset.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Handling CTRL+C
Erwan Velu [Wed, 18 Mar 2009 19:01:39 +0000 (20:01 +0100)]
hdt: Handling CTRL+C

Impact: User can use the CTRL+C

Basic Ctrl+C implementation

15 years agohdt: cli now uses the ansi raw interface
Erwan Velu [Tue, 17 Mar 2009 21:56:53 +0000 (22:56 +0100)]
hdt: cli now uses the ansi raw interface

Impact: cli is now managed char by char instead of line by line

This patch is a first step toward a new version of the cli.
Current code isn't scalable to manage a complex cli code.
First step is to manage input char by char.
It will now possible to implement :
- completion using tab,
- using special keys (F1-F12)
This patch implements F1 as "show help"

15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/boot/syslinux/syslinux
Erwan Velu [Tue, 17 Mar 2009 19:10:48 +0000 (20:10 +0100)]
Merge branch 'master' of git://git./boot/syslinux/syslinux

15 years agohdt: Adding vesa in available modes & help message
Erwan Velu [Tue, 17 Mar 2009 11:39:20 +0000 (12:39 +0100)]
hdt: Adding vesa in available modes & help message

Impact: Fixes CLI behavior. show vesa is a valid command

"help" command didn't reported vesa as possible mode
"show vesa" command was also missing even if already implemented

15 years agohdt: putting some vesa function static
Erwan Velu [Tue, 17 Mar 2009 09:31:00 +0000 (10:31 +0100)]
hdt: putting some vesa function static

Impact: none

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Making the build silent
Erwan Velu [Tue, 17 Mar 2009 09:29:44 +0000 (10:29 +0100)]
hdt: Making the build silent

Impact: Silence the build.

It is easier to detect warnings and errors if make doesn't print out the
commands before executing them.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years ago*/Makefile: fixes for older versions of NASM
H. Peter Anvin [Tue, 17 Mar 2009 04:32:32 +0000 (21:32 -0700)]
*/Makefile: fixes for older versions of NASM

Deal with issues that made older versions of nasm:

a) prevent "make spotless" from running
b) generate bad dependencies (no final newline)

15 years ago*/Makefile: use -include when including dependencies
H. Peter Anvin [Tue, 17 Mar 2009 04:19:37 +0000 (21:19 -0700)]
*/Makefile: use -include when including dependencies

This seems to have better behavior for "make spotless".

15 years agoRevert "memdisk: memdisk16.asm needs %ifndef DEPEND around %include"
H. Peter Anvin [Tue, 17 Mar 2009 04:18:42 +0000 (21:18 -0700)]
Revert "memdisk: memdisk16.asm needs %ifndef DEPEND around %include"

This reverts commit 8f3919c8f5dd37ccd3b7565d32ef1dac8b2522d5.
Wrong fix.

15 years agomemdisk: memdisk16.asm needs %ifndef DEPEND around %include
H. Peter Anvin [Tue, 17 Mar 2009 04:11:52 +0000 (21:11 -0700)]
memdisk: memdisk16.asm needs %ifndef DEPEND around %include

Older versions of NASM puke if there is an %include of a non-existent
file during dependency generation.  Make it more forgiving.

15 years agomemdisk: align .bss to a 16-byte boundary for better zeroing perf
H. Peter Anvin [Tue, 17 Mar 2009 02:20:02 +0000 (19:20 -0700)]
memdisk: align .bss to a 16-byte boundary for better zeroing perf

Some CPUs really want a reasonable alignment for a rep;stosl, so give
it to them...

15 years agomemdisk: zero the .bss section
H. Peter Anvin [Tue, 17 Mar 2009 02:17:57 +0000 (19:17 -0700)]
memdisk: zero the .bss section

It is just too confusing to have a .bss section that isn't zeroed, to
explicitly zero it.

15 years agomemdisk: move the floppy disk geometry code in parallel with the MBR code
H. Peter Anvin [Tue, 17 Mar 2009 02:05:03 +0000 (19:05 -0700)]
memdisk: move the floppy disk geometry code in parallel with the MBR code

Move the floppy disk geometry generation code into parallel with the
MBR code, which pretty much mimics the previous behavior.

15 years agomemdisk: don't key FAT vs MBR on the type of disk
H. Peter Anvin [Tue, 17 Mar 2009 01:50:36 +0000 (18:50 -0700)]
memdisk: don't key FAT vs MBR on the type of disk

We can't rely on the disk type to say if this is FAT vs MBR, since we
haven't determined that yet.  Thus, move the FAT test up before the
MBR test; both are heuristic, but the FAT test has much less
probability of false positives, and can be further tightened if
needed.

15 years agoSYSLINUX: fix handling of .bss files for FAT12/FAT16
H. Peter Anvin [Mon, 16 Mar 2009 23:16:39 +0000 (16:16 -0700)]
SYSLINUX: fix handling of .bss files for FAT12/FAT16

The size of the superblock is different for FAT12/FAT16 and FAT32.  We
should only copy the relevant portions of the superblock over.
Technically speaking, it is possible for FAT12/FAT16 to have an older,
smaller superblock as well (without the 0x29 boot signature); we don't
handle that at the moment.

15 years agoMerge commit 'hdt/master' syslinux-3.74-pre6
H. Peter Anvin [Mon, 16 Mar 2009 20:21:04 +0000 (13:21 -0700)]
Merge commit 'hdt/master'

15 years agomemdisk: auto-detect large floppy geometry if it is FAT
H. Peter Anvin [Mon, 16 Mar 2009 20:18:49 +0000 (13:18 -0700)]
memdisk: auto-detect large floppy geometry if it is FAT

If a "large floppy" image is formatted with a FAT filesystem, we can
use the headers in the FAT image to derive the geometry.  This is nice
and user-friendly, so do it that way.

15 years agoisolinux: split MaxTransfer for HD and CD modes
H. Peter Anvin [Mon, 16 Mar 2009 16:24:02 +0000 (09:24 -0700)]
isolinux: split MaxTransfer for HD and CD modes

The MaxTransfer for CD modes has to be smaller than for HD modes to
avoid 64K overrun (even though in theory it's permitted, we don't
trust it.)  Thus have separate variables for HD and CD modes.

15 years agohdt: Improving vesa output
Erwan Velu [Mon, 16 Mar 2009 15:23:47 +0000 (16:23 +0100)]
hdt: Improving vesa output

Impact: Use proper words to be better understood by users

Cosmetic fix.

15 years agohdt: Adding missing install target
Erwan Velu [Mon, 16 Mar 2009 15:20:28 +0000 (16:20 +0100)]
hdt: Adding missing install target

Impact: Allow the build process to complete properly

The install: target was missing and prevented the global make install to
end properly

15 years agohdt: Uploading missing vesa files
Erwan Velu [Sun, 15 Mar 2009 19:34:48 +0000 (20:34 +0100)]
hdt: Uploading missing vesa files

The vesa files were missing

15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/boot/syslinux/syslinux
Erwan Velu [Sun, 15 Mar 2009 19:28:23 +0000 (20:28 +0100)]
Merge branch 'master' of git://git./boot/syslinux/syslinux

15 years agohdt: Command-line arguments should be const
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 23:51:56 +0000 (16:51 -0700)]
hdt: Command-line arguments should be const

Impact: Fix compilation warnings, signatures changes.

argc and argv should be const.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Force cast when dereferencing menu->disk_sub_menu
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 23:36:09 +0000 (16:36 -0700)]
hdt: Force cast when dereferencing menu->disk_sub_menu

Impact: Fix compilation warning.

A cast is necessary in compute_disks.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Fix irq references
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 23:24:37 +0000 (16:24 -0700)]
hdt: Fix irq references

Impact: Fix build compilation

d213082d76a24d3ba2e033416891a170b39c1ded moved irq to dev_info struct.
Make the changes accordingly.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agocmd.c32: simplify by passing the unparsed command line
H. Peter Anvin [Sat, 14 Mar 2009 23:18:44 +0000 (16:18 -0700)]
cmd.c32: simplify by passing the unparsed command line

Instead of parsing and unparsing the command line, just pass the raw
command line the way we already have it.

15 years agohdt: Remove unused parameter in handle_vesa_commands
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 23:04:43 +0000 (16:04 -0700)]
hdt: Remove unused parameter in handle_vesa_commands

Impact: Signature change.

The cli mode information is already in the function name. No need to pass it
as a parameter.

Note: The file hdt-cli-vesa is missing for the tree. This change will need to
be propagated once the file is integrated.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: find_argument should return a const char*
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 22:58:36 +0000 (15:58 -0700)]
hdt: find_argument should return a const char*

Impact: Fix compilation warning, signature change.

Handle command line arguments as const. This fixes a compilation
warning.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Honor syslinux_version const qualifier
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 22:52:09 +0000 (15:52 -0700)]
hdt: Honor syslinux_version const qualifier

Impact: Fix compilation warning

syslinux_version returns a const pointer to a syslinux_version struct.
This fixes a compilation warning.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Fix duplicate struct entry
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 22:32:46 +0000 (15:32 -0700)]
hdt: Fix duplicate struct entry

Impact: fix compilation error

An entry was accidentally added twice in s_pxe causing the build to
fail.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Make compute_memory_module static
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 20:47:17 +0000 (13:47 -0700)]
hdt: Make compute_memory_module static

Impact: None.

compute_memory_module is only used in hdt-menu-dmi.c. Let's make it
static.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Make compute_pci_device static
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 20:44:27 +0000 (13:44 -0700)]
hdt: Make compute_pci_device static

Impact: None.

compute_pci_device is only used in hdt-menu-pci.c. Let's make it static.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Remove unused cli_mode parameter
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 19:59:11 +0000 (12:59 -0700)]
hdt: Remove unused cli_mode parameter

Impact: Signatures changes.

Uniform the main_show_* signatures by removing the parameter cli_mode from
main_show_dmi. The call to do_exit has been removed (it was useless anyway).

This allowed us to remove the cli_mode parameter from handle_hdt_commands
as well.

This change fixes all compilation warnings related to the cli.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Make main_show_summary static
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 19:49:08 +0000 (12:49 -0700)]
hdt: Make main_show_summary static

Impact: None.

main_show_summary is only used in hdt-cli.c. Let's make it static.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Remove unused parameters in start_cli_mode
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 19:46:29 +0000 (12:46 -0700)]
hdt: Remove unused parameters in start_cli_mode

Impact: Signature change.

argc and argv aren't used in start_cli_mode. This fixes 2 compilation
warnings.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Make show_cli_help static
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 19:43:44 +0000 (12:43 -0700)]
hdt: Make show_cli_help static

Impact: None.

show_cli_help is only used in hdt-cli.c. Let's make it static.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Make handle_hdt_commands static
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 19:39:43 +0000 (12:39 -0700)]
hdt: Make handle_hdt_commands static

Impact: None.

handle_hdt_commands is only used in hdt-cli.c. Let's make it static.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Make set_mode static
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 19:38:42 +0000 (12:38 -0700)]
hdt: Make set_mode static

Impact: None.

set_mode is only used in hdt-cli.c. Let's make it static.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Make pci_show static
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 18:58:31 +0000 (11:58 -0700)]
hdt: Make pci_show static

Impact: None.

pci_show is only used in hdt-cli-pci.c. Let's make it static.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Remove unused parameter in handle_pci_commands
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 18:57:16 +0000 (11:57 -0700)]
hdt: Remove unused parameter in handle_pci_commands

Impact: Signature change.

The cli mode information is already in the function name. No need to pass it
as a parameter. This fixes a compilation warning.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Make show_pci_devices static
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 18:54:34 +0000 (11:54 -0700)]
hdt: Make show_pci_devices static

Impact: None.

show_pci_devices is only used in hdt-cli-pci.c. Let's make it static.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Make show_pci_help static
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 18:53:01 +0000 (11:53 -0700)]
hdt: Make show_pci_help static

Impact: None.

show_pci_help is only used in hdt-cli-pci.c. Let's make it static.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Remove unused variables in main_show_pci
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 18:51:33 +0000 (11:51 -0700)]
hdt: Remove unused variables in main_show_pci

Impact: Cleanups.

This fixes 8 compilation warnings.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Make most dmi helpers static
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 18:47:03 +0000 (11:47 -0700)]
hdt: Make most dmi helpers static

Impact: None.

Most of the dmi helpers are only used in hdt-cli-dmi.c. Let's make them
static.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Remove unused parameter in handle_dmi_commands
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 18:38:10 +0000 (11:38 -0700)]
hdt: Remove unused parameter in handle_dmi_commands

Impact: Signature change.

The cli mode information is already in the function name. No need to pass it
as a parameter. This fixes a compilation warning.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Make show_dmi_help static
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 18:34:37 +0000 (11:34 -0700)]
hdt: Make show_dmi_help static

Impact: None.

show_dmi_help is only used in hdt-cli-dmi.c. Let's make it static.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Remove unused parameter in main_show_cpu
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 18:31:29 +0000 (11:31 -0700)]
hdt: Remove unused parameter in main_show_cpu

Impact: Signature change.

The cli mode information is already in the function name. No need to pass it
as a parameter. This fixes a compilation warning.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Make show_cpu_help static
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 18:28:57 +0000 (11:28 -0700)]
hdt: Make show_cpu_help static

Impact: None.

show_cpu_help is only used in hdt-cli-cpu.c. Let's make it static.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Remove unused parameter in handle_cpu_commands
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 18:27:15 +0000 (11:27 -0700)]
hdt: Remove unused parameter in handle_cpu_commands

Impact: Signature change.

The cli mode information is already in the function name. No need to pass it
as a parameter. This fixes a compilation warning.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
15 years agohdt: Make cpu_show static
Pierre-Alexandre Meyer [Sat, 14 Mar 2009 18:25:10 +0000 (11:25 -0700)]
hdt: Make cpu_show static

Impact: None.

cpu_show is only used in hdt-cli-cpu.c. Let's make it static.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>