update: example programs
This commit is contained in:
parent
61ab7f66ac
commit
bb1f5a61b2
@ -1,5 +1,5 @@
|
||||
# libmp | MatterLinux package management library
|
||||
The core library for [`mp`](https://git.matterlinux.xyz/Matter/mp), it has
|
||||
The core library for [`matt`](https://git.matterlinux.xyz/Matter/matt), it has
|
||||
components for transferring, installing, updating and removing packages.
|
||||
|
||||
### Installation
|
||||
|
@ -17,7 +17,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
lm_entry_init(&entry);
|
||||
|
||||
if (!lm_ctx_init(&ctx, ROOT_DIR, NULL, DATA_DIR)) {
|
||||
if (!lm_ctx_new(&ctx, ROOT_DIR, NULL, DATA_DIR)) {
|
||||
printf("failed to init the ctx: %s (%d)\n", lm_strerror(), lm_error());
|
||||
goto end;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ int main(int argc, char *argv[]) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!lm_ctx_init(&ctx, ROOT_DIR, TEMP_DIR, DATA_DIR)) {
|
||||
if (!lm_ctx_new(&ctx, ROOT_DIR, TEMP_DIR, DATA_DIR)) {
|
||||
printf("failed to init the ctx: %s (%d)\n", lm_strerror(), lm_error());
|
||||
goto end;
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
lm_entry_init(&entry);
|
||||
|
||||
if (!lm_ctx_init(&ctx, NULL, NULL, DATA_DIR)) {
|
||||
if (!lm_ctx_new(&ctx, NULL, NULL, DATA_DIR)) {
|
||||
printf("failed to set data dir: %s (%d)\n", lm_strerror(), lm_error());
|
||||
goto end;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ int main(int argc, char *argv[]) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!lm_ctx_init(&ctx, ROOT_DIR, TEMP_DIR, DATA_DIR)) {
|
||||
if (!lm_ctx_new(&ctx, ROOT_DIR, TEMP_DIR, DATA_DIR)) {
|
||||
printf("failed to init the ctx: %s (%d)\n", lm_strerror(), lm_error());
|
||||
goto end;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ int main(int argc, char *argv[]) {
|
||||
char pooldir[strlen(TEMP_DIR) + 10];
|
||||
sprintf(pooldir, "%s/%s", DATA_DIR, "pool");
|
||||
|
||||
if (!lm_ctx_init(&ctx, ROOT_DIR, TEMP_DIR, DATA_DIR)) {
|
||||
if (!lm_ctx_new(&ctx, ROOT_DIR, TEMP_DIR, DATA_DIR)) {
|
||||
printf("failed to init the ctx: %s (%d)\n", lm_strerror(), lm_error());
|
||||
goto end;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ int main(int argc, char *argv[]) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!lm_ctx_init(&ctx, NULL, TEMP_DIR, NULL)) {
|
||||
if (!lm_ctx_new(&ctx, NULL, TEMP_DIR, NULL)) {
|
||||
printf("failed to init the ctx: %s (%d)\n", lm_strerror(), lm_error());
|
||||
goto end;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user