History log of /freebsd/stand/common/commands.c (Results 1 – 17 of 17)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# ab08da53 05-Jun-2024 Ahmad Khalifa <ahmadkhalifa570@gmail.com>

loader: Increase buffer size to accommodate longer commands

The longest command we have is "efi-autoresizecons". That combined with
the two spaces before and after the command gives us a total of 23

loader: Increase buffer size to accommodate longer commands

The longest command we have is "efi-autoresizecons". That combined with
the two spaces before and after the command gives us a total of 23
characters including the null-terminator.

Also move the two trailing spaces to their own pager_output call so they
don't get truncated if the command is too long and increase the minimum
string length to 20 in order to fix alignment issues caused by the
increased buffer size.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1277

show more ...


Revision tags: release/14.1.0, release/13.3.0
# 3e15b01d 22-Feb-2024 Warner Losh <imp@FreeBSD.org>

libsa: Remove redundant sys/cdefs.h

Sponsored by: Netflix


Revision tags: release/14.0.0
# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0
# 88599604 11-Feb-2021 Mitchell Horne <mhorne@FreeBSD.org>

loader: always install help files

Address two issues with current help file logic:

The existing condition prevents the common help file from being
installed when there are no additional help files

loader: always install help files

Address two issues with current help file logic:

The existing condition prevents the common help file from being
installed when there are no additional help files defined. This results
in no loader.help on EFI platforms, for example.

Second, due to the fact that we build and install multiple loader types,
each successive install will clobber the previous loader.help. The
result is that we could lose type-specific commands, or possibly list
them in loaders that do not have such commands.

Instead, give each loader type a uniquely named help file. The EFI
loader will look for /boot/loader.help.efi, userboot will look for
/boot/loader.help.userboot, etc. The interpreter variant has no effect
on which help file is loaded.

This leaves the old /boot/loader.help unused.

Some credit for the final approach goes to Mathieu <sigsys@gmail.com>
for their version of the fix in https://reviews.freebsd.org/D22951.

PR: 267134
Reported by: Daniel O'Connor <darius@dons.net.au>
Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D28591

show more ...


# 2101541f 30-Jul-2022 Warner Losh <imp@FreeBSD.org>

stand: Move quit command to common commands

Since both EFI and the future kboot will benefit from a 'quit' command,
move it from efi/loader/main.c to common/commands.c. In EFI this command
exits bac

stand: Move quit command to common commands

Since both EFI and the future kboot will benefit from a 'quit' command,
move it from efi/loader/main.c to common/commands.c. In EFI this command
exits back to the boot loader (which will cause the next BootXXXX in the
BootOrder list to be attempted). In kboot, this will exit back to
whatever called loader.kboot. In uboot this will cause a reset (which
will restart uboot, not quite a simple exit, but will look similar)
and in OFW it will execute OF_exit which should return to the
openfirmware prompt.

Sponsored by: Netflix

show more ...


# 70661eaa 09-Dec-2021 Emmanuel Vadot <manu@FreeBSD.org>

loader: Add a readtest command

readtest will simply load the file in memory, useful for timing
loading on some filesystems.

Reviewed by: tsoome
MFC after: 2 weeks
Sponsored by: Beckhoff Automation

loader: Add a readtest command

readtest will simply load the file in memory, useful for timing
loading on some filesystems.

Reviewed by: tsoome
MFC after: 2 weeks
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D33411

show more ...


# 7b0d05d5 21-Aug-2021 Toomas Soome <tsoome@FreeBSD.org>

loader: loader_lua can run command_more twice

When we quit pager, the return value 1 is returned and command_more()
interprets it as error.

when lua loader gets error from command, it will try to
i

loader: loader_lua can run command_more twice

When we quit pager, the return value 1 is returned and command_more()
interprets it as error.

when lua loader gets error from command, it will try to
interpret it once more, so we get the same file shown once more.

There is no reason why we should return error from command_more().

MFC after: 1 week

show more ...


Revision tags: release/12.2.0, release/11.4.0, release/12.1.0
# a63915c2 28-Jul-2019 Alan Somers <asomers@FreeBSD.org>

MFHead @r350386

Sponsored by: The FreeBSD Foundation


# bbac74ca 18-Jul-2019 Simon J. Gerraty <sjg@FreeBSD.org>

loader: ignore some variable settings if input unverified

libsecureboot can tell us if the most recent file opened was
verfied or not.
If it's state is VE_UNVERIFIED_OK, skip if variable
matches one

loader: ignore some variable settings if input unverified

libsecureboot can tell us if the most recent file opened was
verfied or not.
If it's state is VE_UNVERIFIED_OK, skip if variable
matches one of the restricted prefixes.

Reviewed by: stevek
MFC after: 1 week
Sponsored by: Juniper Networks
Differential Revision: https://reviews.freebsd.org//D20909

show more ...


Revision tags: release/11.3.0, release/12.0.0, release/11.2.0
# b67d407a 16-Apr-2018 Toomas Soome <tsoome@FreeBSD.org>

loader: cstyle cleanup of command.c

just clean it up. no functional changes intended.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D15087


# 6d68f8ac 16-Apr-2018 Toomas Soome <tsoome@FreeBSD.org>

loader: make sure we do not return garbage from help_getnext

Since we do free subtopic and desc in help_getnext(), we need to set them also
NULL, so we make sure we dont get double free().

Approved

loader: make sure we do not return garbage from help_getnext

Since we do free subtopic and desc in help_getnext(), we need to set them also
NULL, so we make sure we dont get double free().

Approved by: bapt
Differential Revision: https://reviews.freebsd.org/D15082

show more ...


# 746dddb1 16-Apr-2018 Toomas Soome <tsoome@FreeBSD.org>

loader: command_errmsg should be const

Use const char * for command_errmsg.


# faa53063 16-Apr-2018 Toomas Soome <tsoome@FreeBSD.org>

loader: make sure we use snprintf() in commands.c

Safeguard against memory corruptions.


# 5276f604 16-Apr-2018 Toomas Soome <tsoome@FreeBSD.org>

loader: provide values in help_getnext()

With r328289 we attempt to make sure we free the resources allocated in
help_getnext(), however, it is possible that we get no resources allocated
and help_g

loader: provide values in help_getnext()

With r328289 we attempt to make sure we free the resources allocated in
help_getnext(), however, it is possible that we get no resources allocated
and help_getnext() will return early.

Make sure we have pointers set to NULL early in help_getnext().

Reported by: Andy Fiddaman

show more ...


# 74ecc441 23-Jan-2018 Warner Losh <imp@FreeBSD.org>

Don't leak memory when displaying help.

Right now, we'll leak memory when we display a help topic because we
don't free t, s, d that we've just used when breaking out of the loop.
NB: coverity just

Don't leak memory when displaying help.

Right now, we'll leak memory when we display a help topic because we
don't free t, s, d that we've just used when breaking out of the loop.
NB: coverity just reported t, but s and d also leak.

CID: 1007776

show more ...


# 55b1c6e7 15-Nov-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Merge ^/head r325663 through r325841.


# ca987d46 15-Nov-2017 Warner Losh <imp@FreeBSD.org>

Move sys/boot to stand. Fix all references to new location

Sponsored by: Netflix