kernel-install: fix return value check for getline
getline returns the number of characters read, so check for ret < 0 instead of ret. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
40d89c4977
commit
bbc70303c7
|
@ -1026,7 +1026,7 @@ static int do_remove_kernel(void)
|
|||
do_list_entries();
|
||||
printf("which kernel do you like to remove?\n");
|
||||
ret = getline(&input, &insize, stdin);
|
||||
if (ret)
|
||||
if (ret < 0)
|
||||
return -errno;
|
||||
if (!strlen(input))
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Reference in New Issue