Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

writer: Set errno for unknown format #268

Merged
merged 1 commit into from
Mar 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion libcomposefs/lcfs-writer.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ static struct lcfs_ctx_s *lcfs_new_ctx(struct lcfs_node_s *root,
break;

default:
errno = EINVAL;
ret = NULL;
}

Expand All @@ -101,6 +102,7 @@ static struct lcfs_ctx_s *lcfs_new_ctx(struct lcfs_node_s *root,
ret->fsverity_ctx = lcfs_fsverity_context_new();
if (ret->fsverity_ctx == NULL) {
lcfs_close(ret);
errno = ENOMEM;
return NULL;
}
}
Expand Down Expand Up @@ -377,7 +379,6 @@ int lcfs_write_to(struct lcfs_node_s *root, struct lcfs_write_options_s *options

ctx = lcfs_new_ctx(root, options);
if (ctx == NULL) {
errno = ENOMEM;
return -1;
}

Expand Down
Loading