mirror of
https://github.com/clearlinux/clr-boot-manager.git
synced 2026-10-03 23:38:21 +00:00
Increase maximum size of 'type' field
In practice, the filename limit was overly small, this change allows us to better describe the content of some kernels currently in use. Signed-off-by: Murilo Belluzzo <murilo.belluzzo@intel.com>
This commit is contained in:
committed by
William Douglas
parent
531ab87256
commit
b05a3f49b3
@@ -46,7 +46,7 @@ Kernel *boot_manager_inspect_kernel(BootManager *self, char *path)
|
||||
{
|
||||
Kernel *kern = NULL;
|
||||
autofree(char) *cmp = NULL;
|
||||
char type[15] = { 0 };
|
||||
char type[32] = { 0 };
|
||||
char version[15] = { 0 };
|
||||
int release = 0;
|
||||
autofree(char) *parent = NULL;
|
||||
@@ -72,7 +72,7 @@ Kernel *boot_manager_inspect_kernel(BootManager *self, char *path)
|
||||
bcp = basename(cmp);
|
||||
|
||||
/* org.clearlinux.kvm.4.2.1-121 */
|
||||
r = sscanf(bcp, KERNEL_NAMESPACE ".%15[^.].%15[^-]-%d", type, version, &release);
|
||||
r = sscanf(bcp, KERNEL_NAMESPACE ".%32[^.].%15[^-]-%d", type, version, &release);
|
||||
if (r != 3) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user