mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-17 16:44:27 -04:00
[ext2fs] automated persistence set up for Debian Live & Ubuntu
* Only UEFI boot for now (GRUB) & requires a post 2019.07.26 ISO for Ubuntu. * This adds the relevant persistence/persistent kernel option to the conf file, sets the expected volume label and creates a /persistence.conf file where needed. * Also improve token parsing by ensuring a token is followed by at least one white space.
This commit is contained in:
parent
307e2f7075
commit
fcb15ab6e9
11 changed files with 331 additions and 23 deletions
|
@ -1090,7 +1090,7 @@ char* replace_in_token_data(const char* filename, const char* token, const char*
|
|||
wchar_t *wtoken = NULL, *wfilename = NULL, *wtmpname = NULL, *wsrc = NULL, *wrep = NULL, bom = 0;
|
||||
wchar_t buf[1024], *torep;
|
||||
FILE *fd_in = NULL, *fd_out = NULL;
|
||||
size_t i, size;
|
||||
size_t i, ns, size;
|
||||
int mode = 0;
|
||||
char *ret = NULL, tmp[2];
|
||||
|
||||
|
@ -1180,8 +1180,11 @@ char* replace_in_token_data(const char* filename, const char* token, const char*
|
|||
// Token was found, move past token
|
||||
i += wcslen(wtoken);
|
||||
|
||||
// Skip spaces
|
||||
i += wcsspn(&buf[i], wspace);
|
||||
// Skip whitespaces after token (while making sure there's at least one)
|
||||
ns = wcsspn(&buf[i], wspace);
|
||||
if (ns == 0)
|
||||
continue;
|
||||
i += ns;
|
||||
|
||||
torep = wcsstr(&buf[i], wsrc);
|
||||
if (torep == NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue