update: example programs
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user