projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ctf writer BSD compatibily: remove O_DIRECTORY
[babeltrace.git]
/
formats
/
ctf
/
writer
/
writer.c
diff --git
a/formats/ctf/writer/writer.c
b/formats/ctf/writer/writer.c
index 8529a1e31a4d07f6c0bb9d5d7c3fa4483124e548..5600a92a0a1debd22cfed2066edf5ee16bfae825 100644
(file)
--- a/
formats/ctf/writer/writer.c
+++ b/
formats/ctf/writer/writer.c
@@
-115,8
+115,7
@@
struct bt_ctf_writer *bt_ctf_writer_create(const char *path)
goto error_destroy;
}
goto error_destroy;
}
- writer->trace_dir_fd = open(path, O_RDONLY | O_DIRECTORY,
- S_IRWXU | S_IRWXG);
+ writer->trace_dir_fd = open(path, O_RDONLY, S_IRWXU | S_IRWXG);
if (writer->trace_dir_fd < 0) {
perror("open");
goto error_destroy;
if (writer->trace_dir_fd < 0) {
perror("open");
goto error_destroy;
@@
-168,11
+167,17
@@
void bt_ctf_writer_destroy(struct bt_ctf_ref *ref)
}
if (writer->trace_dir_fd > 0) {
}
if (writer->trace_dir_fd > 0) {
- close(writer->trace_dir_fd);
+ if (close(writer->trace_dir_fd)) {
+ perror("close");
+ abort();
+ }
}
if (writer->metadata_fd > 0) {
}
if (writer->metadata_fd > 0) {
- close(writer->metadata_fd);
+ if (close(writer->metadata_fd)) {
+ perror("close");
+ abort();
+ }
}
if (writer->environment) {
}
if (writer->environment) {
This page took
0.025937 seconds
and
4
git commands to generate.