This patchset allows a user to update an existing grub variable on the commandline.
v2: - Split into 3 patches. - fix "=value" bug. An additional consequence of this is that the value pointer p in set_variable() cannot underflow. - make grub_envblk_iterate return an int and fix return values. - add "+=" functionality - Changes suggested by David Kiper: Change name to grub_envblk_extend(), capitalize comments, use standard GRUB error enum, change goto from "out" to "err", drop cast in grub_strlen() call, use grub_snprintf() instead of strcpy & memcpy. - Instead of parsing envblk separately, use grub_envblk_iterate() - use a case statement in set_variable() error handling, and add a comment about deleting the "=" sign. Signed-off-by: Prarit Bhargava <pra...@redhat.com> Cc: mleit...@redhat.com Cc: pjo...@redhat.com Cc: javi...@redhat.com Cc: ar...@redhat.com Cc: Daniel Kiper <dki...@net-space.pl> Prarit Bhargava (3): grub-editenv: Verify the variable size grub: Make grub_envblk_iterate() return an int grub: add extend variable functionality grub-core/commands/loadenv.c | 6 +-- grub-core/lib/envblk.c | 17 ++++--- include/grub/err.h | 4 +- include/grub/lib/envblk.h | 6 +-- util/grub-editenv.c | 86 ++++++++++++++++++++++++++++++++++-- 5 files changed, 100 insertions(+), 19 deletions(-) -- 2.17.2 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel