| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit 1697594b61f9a8f9d092996afc0e2c80bbb2a20a, some commands are
said to be "nomodule" like "say".
This patch was adding a check if the nomodule flag was set but didn't
checked that the associated structure did exist leading to false
positive detection.
As a result, the commands were not executed meaning the CLI was unsuable
since ... 3 years.... *shame*
This commit simply avoid considering the nomodule flag if the structure
is not allocated
|
|
|
|
|
|
|
| |
argv shall be passed as a pointer to avoid a crash when running
command like "dmi".
Thanks genec for pointing this out.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code was passing sizeof(const char *) - not the length of the string
or the size of the buffer - as the length to strncmp(). These two cases
don't need the length, so switch to strcmp.
Fixes the warning: argument to 'sizeof' in 'strncmp' call is the same
expression as the second source; did you mean to provide an explicit
length?
Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
|
|
|
|
|
|
|
| |
The dynamically alloc'd string to protect from strtok modification
has not been free'd on start_auto_mode() function.
This patch insure the free is done properly.
|
|
|
|
|
|
|
|
| |
We need to be allocating sizeof(char *) (4) not sizeof(char) (1) for
'new_argv'.
Cc: Erwan Velu <erwanaliasr1@gmail.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
| |
Using more_printf allow to manage more easily several pages printing.
|
|
|
|
|
|
|
|
|
|
| |
Some new commands might need being able to manage the argv directly
instead of the much more oriented scheme we had until now.
This commit add a .nomodule option to cli object to explically tell they
don't have a module as parameter but only arguments.
This will be needed for the 'say' command.
|
|
|
|
| |
Sizeof(char *) is definetly wrong for getting the length of a string.
|
|
|
|
|
| |
Adding more debug traces in the cli management to ease debugging &
feature adding.
|
|
|
|
|
| |
That's a nice info to know that some output were generated by the
automatic mode.
|
|\
| |
| |
| |
| | |
Conflicts:
com32/hdt/hdt.h
|
| |
| |
| |
| |
| | |
As reported by hpa, strlcpy is safer and could prevent some bugs.
So I replaced all strncpy by strlcpy calls.
|
| |
| |
| |
| |
| |
| | |
-Werror cleanup.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|\ \
| |/ |
|
| |
| |
| |
| | |
print_history have to follow the exec prototype
|
| |
| |
| |
| |
| |
| |
| |
| | |
() means the same as (...) in C, not the same as (void) as it does in
C++. It is generally misused to mean (void), though. Actually write
what we mean... this is C, after all.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
| |
| |
| |
| |
| | |
Impact: Hardware detection path is simplified
Hardware is detected once, at boot time
|
| |
| |
| |
| |
| |
| | |
Impact: new acpi mode
Adding a new ACPI mode, still lots of work to do
|
| |
| |
| |
| |
| |
| |
| | |
Impact: none
Parsing have to be done the spec says ;)
Let's found the RSDP first
|
|/
|
|
|
|
| |
Impact: adding madt stuff
Trying to add some madt stuff
|
|
|
|
|
|
| |
Impact: prior to that commit, cycling the history failed
When we enter more than 32 commands, let's cycle the history
|
|
|
|
|
|
| |
Impact: managing scrolling in history()
History can generates some scrolling, so let's use more_printf
|
|
|
|
|
|
| |
Impact: history usage is more obvious
History (up/down) is more intiutive and copy bash's behavior
|
|
|
|
|
|
| |
Impact: new command 'history'
This command allow to see the content of the history
|
|
|
|
|
|
| |
Impact: avoid history corruption
No need to copy history to input. We can directly use the history stack.
|
|
|
|
|
|
| |
Impact: Visual cleanup
HDT now uses the same indent as syslinux
|
|
|
|
|
|
|
|
|
|
| |
More memory corruption with overlooked. parse_command_line and
expand_aliases both allocate memory (for command, module, argc and argv).
We did fix the memory corruption for the autocompletion feature but
but didn't do it for the actual execution of the commands.
Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>
|
|
|
|
|
|
| |
Remove a typo. This fixes a compilation warning.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|
|
|
|
|
|
|
|
| |
A cli_module_descr can be defined with no modules (only a default
callback). Cf. the syslinux module for instance.
This patch adds a check for NULL structures before trying to dereference them.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|
|
|
|
|
|
|
| |
Ralf Carl has reported some corruption in the autocompletion feature
of the CLI. This patch fixes it.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|
|
|
|
|
|
| |
Impact: Avoid warning during compilation
Avoid warning during gcc compilation
|
|
|
|
|
|
|
| |
Impact: visual
The output generated by the auto mode should stay in coherence with the
default cli mode.
|
|
|
|
|
|
| |
Impact: "quiet" keyword also a quiet display
quiet is a new keyword to prevent HDT beeing too much verbose
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Pass 'debug' on the kernel command line for the output to be more verbose.
Making hdt quiet is really helpful in auto mode, when a lot of information
is flowing.
This fixes #21.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|
|/
|
|
|
|
| |
Impact: prevent running stupid commands
The code didn't prevents from executing stupid "'" commands
|
|
|
|
|
|
| |
Impact: Visual
This debugging info isn't interesting
|
|
|
|
|
|
| |
Impact: Visual
This patch enhance the readibility of the auto mode
|
|
|
|
|
|
|
| |
Impact: Freeing memory
We have to be more careful about the malloc & free. We also have to
remove spaces around commands
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Impact: HDT can be controlled via the cmdline
When the auto= parameter is set, HDT execute a set of commands and
return to the cli after.
i.e auto='show summary; show pci' will show the summary then the pci and
return to the cli.
Note that the auto= feature, requires a the "'" char to define the
complete set of commands and the ";" char to separate commands.
Some more examples:
auto='show syslinux; exit' -> this will show the syslinux release and
then exit to return to the bootloader
auto='show summary; reboot' -> this will show the summary and
then reboot the computer
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
com32/hdt/hdt-cli-disk.c
com32/hdt/hdt-common.c
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
HDT and cmenu are currently duplicating code: they both define their
own mini ansi library.
This patch extracts the HDT ansi lib into gpllib as a first step towards
unification.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|
|/
|
|
|
|
| |
We are missing a const qualifier.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|
|\
| |
| |
| | |
ssh://terminus.zytor.com//pub/git/users/pam/hdt-pierre
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
Impact: Improve user experience
After some commands, the cursor was disapearing. That could confuse
users. This commit resolve this weird cases.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|