mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
helpers: fix detection of partition in non-subdirboot layout
Origin commit data
------------------
Branch: ni/coolstream
Commit: 78fc37b0b1
Author: vanhofen <vanhofen@gmx.de>
Date: 2023-01-13 (Fri, 13 Jan 2023)
Origin message was:
------------------
- helpers: fix detection of partition in non-subdirboot layout
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -2203,6 +2203,7 @@ int getActivePartition()
|
||||
if (strncmp("linuxrootfs", p, 11) == 0)
|
||||
{
|
||||
c = atoi(p + 11);
|
||||
dprintf(DEBUG_NORMAL, "Current subdirboot partition: %d\n", c);
|
||||
break;
|
||||
}
|
||||
p = strtok(NULL, " =");
|
||||
@@ -2218,7 +2219,10 @@ int getActivePartition()
|
||||
{
|
||||
if (fseek(f, -2, SEEK_END) == 0)
|
||||
{
|
||||
c = (int)fgetc(f);
|
||||
char c2[2] = {0};
|
||||
c2[0] = fgetc(f);
|
||||
c = atoi(c2);
|
||||
dprintf(DEBUG_NORMAL, "Current partition: %d\n", c);
|
||||
}
|
||||
fclose(f);
|
||||
}
|
||||
|
Reference in New Issue
Block a user