mirror of
https://github.com/systemd/systemd
synced 2026-03-18 02:54:47 +01:00
Compare commits
No commits in common. "311fddcd8d994e8398357f53a07695fbbaf27a78" and "f7047b8c1cabca03fd8754abb3b13a6c26117b36" have entirely different histories.
311fddcd8d
...
f7047b8c1c
@ -813,8 +813,6 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHPEliteBook*:*
|
||||
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHPElite*x360*:*
|
||||
# HP Elite Dragonfly
|
||||
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHPEliteDragonfly*:*
|
||||
# HP EliteBoard
|
||||
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHPEliteBoard*:*
|
||||
# HP ProBook 440 G2
|
||||
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP440G2:*
|
||||
# HP ProBook
|
||||
|
||||
@ -588,12 +588,11 @@
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>RestartSteps=</varname></term>
|
||||
<listitem><para>Configures the number of exponential steps to take to increase the interval
|
||||
<listitem><para>Configures the number of steps to take to increase the interval
|
||||
of auto-restarts from <varname>RestartSec=</varname> to <varname>RestartMaxDelaySec=</varname>.
|
||||
Takes a positive integer or 0 to disable it. Defaults to 0.</para>
|
||||
|
||||
<para>This setting is effective only if <varname>RestartMaxDelaySec=</varname> is also set and
|
||||
<varname>RestartSec=</varname> is not zero.</para>
|
||||
<para>This setting is effective only if <varname>RestartMaxDelaySec=</varname> is also set.</para>
|
||||
|
||||
<xi:include href="version-info.xml" xpointer="v254"/></listitem>
|
||||
</varlistentry>
|
||||
@ -605,8 +604,7 @@
|
||||
in the same format as <varname>RestartSec=</varname>, or <literal>infinity</literal>
|
||||
to disable the setting. Defaults to <literal>infinity</literal>.</para>
|
||||
|
||||
<para>This setting is effective only if <varname>RestartSteps=</varname> is also set and
|
||||
<varname>RestartSec=</varname> is not zero.</para>
|
||||
<para>This setting is effective only if <varname>RestartSteps=</varname> is also set.</para>
|
||||
|
||||
<xi:include href="version-info.xml" xpointer="v254"/></listitem>
|
||||
</varlistentry>
|
||||
|
||||
@ -13,7 +13,6 @@
|
||||
#include "export-vars.h"
|
||||
#include "graphics.h"
|
||||
#include "initrd.h"
|
||||
#include "iovec-util-fundamental.h"
|
||||
#include "line-edit.h"
|
||||
#include "measure.h"
|
||||
#include "memory-util-fundamental.h"
|
||||
@ -2691,7 +2690,7 @@ static EFI_STATUS call_image_start(
|
||||
return log_error_status(err, "Error loading %ls: %m", entry->devicetree);
|
||||
}
|
||||
|
||||
err = initrd_register(&IOVEC_MAKE(PHYSICAL_ADDRESS_TO_POINTER(initrd_pages.addr), initrd_size), &initrd_handle);
|
||||
err = initrd_register(PHYSICAL_ADDRESS_TO_POINTER(initrd_pages.addr), initrd_size, &initrd_handle);
|
||||
if (err != EFI_SUCCESS)
|
||||
return log_error_status(err, "Error registering initrd: %m");
|
||||
}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "initrd.h"
|
||||
#include "iovec-util-fundamental.h"
|
||||
#include "proto/device-path.h"
|
||||
#include "proto/load-file.h"
|
||||
#include "util.h"
|
||||
@ -12,7 +11,8 @@
|
||||
/* extend LoadFileProtocol */
|
||||
struct initrd_loader {
|
||||
EFI_LOAD_FILE_PROTOCOL load_file;
|
||||
struct iovec data;
|
||||
const void *address;
|
||||
size_t length;
|
||||
};
|
||||
|
||||
/* static structure for LINUX_INITRD_MEDIA device path
|
||||
@ -52,21 +52,23 @@ static EFIAPI EFI_STATUS initrd_load_file(
|
||||
return EFI_UNSUPPORTED;
|
||||
|
||||
loader = (struct initrd_loader *) this;
|
||||
if (!iovec_is_set(&loader->data))
|
||||
|
||||
if (loader->length == 0 || !loader->address)
|
||||
return EFI_NOT_FOUND;
|
||||
|
||||
if (!buffer || *buffer_size < loader->data.iov_len) {
|
||||
*buffer_size = loader->data.iov_len;
|
||||
if (!buffer || *buffer_size < loader->length) {
|
||||
*buffer_size = loader->length;
|
||||
return EFI_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
||||
memcpy(buffer, loader->data.iov_base, loader->data.iov_len);
|
||||
*buffer_size = loader->data.iov_len;
|
||||
memcpy(buffer, loader->address, loader->length);
|
||||
*buffer_size = loader->length;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
EFI_STATUS initrd_register(
|
||||
const struct iovec *initrd,
|
||||
const void *initrd_address,
|
||||
size_t initrd_length,
|
||||
EFI_HANDLE *ret_initrd_handle) {
|
||||
|
||||
EFI_STATUS err;
|
||||
@ -76,10 +78,7 @@ EFI_STATUS initrd_register(
|
||||
|
||||
assert(ret_initrd_handle);
|
||||
|
||||
/* If no initrd is specified we'll not install any. This avoids registration of the protocol for that
|
||||
* case, leaving it open for something else. */
|
||||
|
||||
if (!iovec_is_set(initrd))
|
||||
if (!initrd_address || initrd_length == 0)
|
||||
return EFI_SUCCESS;
|
||||
|
||||
/* check if a LINUX_INITRD_MEDIA_GUID DevicePath is already registered.
|
||||
@ -93,7 +92,8 @@ EFI_STATUS initrd_register(
|
||||
loader = xnew(struct initrd_loader, 1);
|
||||
*loader = (struct initrd_loader) {
|
||||
.load_file.LoadFile = initrd_load_file,
|
||||
.data = *initrd,
|
||||
.address = initrd_address,
|
||||
.length = initrd_length
|
||||
};
|
||||
|
||||
/* create a new handle and register the LoadFile2 protocol with the InitrdMediaPath on it */
|
||||
|
||||
@ -4,7 +4,8 @@
|
||||
#include "efi.h"
|
||||
|
||||
EFI_STATUS initrd_register(
|
||||
const struct iovec *initrd,
|
||||
const void *initrd_address,
|
||||
size_t initrd_length,
|
||||
EFI_HANDLE *ret_initrd_handle);
|
||||
|
||||
EFI_STATUS initrd_unregister(EFI_HANDLE initrd_handle);
|
||||
|
||||
@ -96,7 +96,7 @@ static EFI_STATUS load_via_boot_services(
|
||||
}
|
||||
|
||||
_cleanup_(cleanup_initrd) EFI_HANDLE initrd_handle = NULL;
|
||||
err = initrd_register(initrd, &initrd_handle);
|
||||
err = initrd_register(initrd->iov_base, initrd->iov_len, &initrd_handle);
|
||||
if (err != EFI_SUCCESS)
|
||||
return log_error_status(err, "Error registering initrd: %m");
|
||||
|
||||
@ -315,7 +315,7 @@ EFI_STATUS linux_exec(
|
||||
}
|
||||
|
||||
_cleanup_(cleanup_initrd) EFI_HANDLE initrd_handle = NULL;
|
||||
err = initrd_register(initrd, &initrd_handle);
|
||||
err = initrd_register(initrd->iov_base, initrd->iov_len, &initrd_handle);
|
||||
if (err != EFI_SUCCESS)
|
||||
return log_error_status(err, "Error registering initrd: %m");
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user