fix all applets to return -ENOTSUP if it's unrecognized

The return -1 seems to have been left over from earlier code, and
could have been treated as -EPERM. This helps to fix the other command
line handling that potentially require changing.
cute-signatures
Timo Teräs 2019-06-05 09:32:29 +03:00
parent b0be9f610c
commit c3a93a4aa5
5 changed files with 5 additions and 5 deletions

View File

@ -416,7 +416,7 @@ static int option_parse_applet(void *pctx, struct apk_db_options *dbopts, int op
ctx->subaction_mask = 0xffffffff;
break;
default:
return -1;
return -ENOTSUP;
}
return 0;
}

View File

@ -220,7 +220,7 @@ static int option_parse_applet(void *pctx, struct apk_db_options *dbopts, int op
ctx->match_providers = 1;
break;
default:
return -1;
return -ENOTSUP;
}
return 0;

View File

@ -103,7 +103,7 @@ static int option_parse_applet(void *ctx, struct apk_db_options *dbopts, int opt
ictx->show_all = 1;
break;
default:
return -1;
return -ENOTSUP;
}
return 0;
}

View File

@ -42,7 +42,7 @@ static int option_parse_applet(void *ctx, struct apk_db_options *dbopts, int opt
uctx->solver_flags |= APK_SOLVERF_LATEST;
break;
default:
return -1;
return -ENOTSUP;
}
return 0;
}

View File

@ -90,7 +90,7 @@ static int option_parse_applet(void *ctx, struct apk_db_options *dbopts, int opt
ictx->all_tags = 1;
break;
default:
return -1;
return -ENOTSUP;
}
return 0;
}