Re: [PATCHv5] grub-install: Add backup and restore

2021-05-28 Thread Daniel Kiper
Ugh... I have just realized that this will not build properly if HAVE_ATEXIT is not defined. Please look below... On Mon, May 24, 2021 at 10:59:34AM +0100, Dimitri John Ledkov wrote: > From: Dimitri John Ledkov > > Refactor clean_grub_dir to create a backup of all the files, instead > of just irr

Re: [PATCHv5] grub-install: Add backup and restore

2021-05-25 Thread Daniel Kiper
On Mon, May 24, 2021 at 10:59:34AM +0100, Dimitri John Ledkov wrote: > From: Dimitri John Ledkov > > Refactor clean_grub_dir to create a backup of all the files, instead > of just irrevocably removing them as the first action. If available, > register atexit handle to restore the backup if errors

[PATCHv5] grub-install: Add backup and restore

2021-05-24 Thread Dimitri John Ledkov
From: Dimitri John Ledkov Refactor clean_grub_dir to create a backup of all the files, instead of just irrevocably removing them as the first action. If available, register atexit handle to restore the backup if errors occur before point of no return, or remove the backup if everything was succes