On Wed, Nov 4, 2020 at 8:42 PM Matteo Croce wrote:
> +#ifdef CONFIG_SYSFS
> +
> +#define STARTS_WITH(s, sc) (!strncmp(s, sc, sizeof(sc)))
> +
Just noticed an off-by-one here, it should be sizeof(sc)-1 because of
the null terminator.
This way, the CR usually added by echo will be skipped.
Regards
From: Matteo Croce
The kernel cmdline reboot= option offers some sort of control
on how the reboot is issued.
Add handles in sysfs to allow setting these reboot options, so they
can be changed when the system is booted, other than at boot time.
The handlers are under /kernel/reboot, can be read
2 matches
Mail list logo