summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1cd3dec)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- snprintf(trace_path, PATH_MAX, "%s/%s",
+ snprintf(trace_path, PATH_MAX, "%s" G_DIR_SEPARATOR_S "%s",
writer_component->base_path->str,
trace_name);
/*
writer_component->base_path->str,
trace_name);
/*
- snprintf(trace_path, PATH_MAX, "%s/%s-%d",
+ snprintf(trace_path, PATH_MAX, "%s" G_DIR_SEPARATOR_S "%s-%d",
writer_component->base_path->str,
trace_name, ++i);
} while (g_file_test(trace_path, G_FILE_TEST_EXISTS) && i < INT_MAX);
writer_component->base_path->str,
trace_name, ++i);
} while (g_file_test(trace_path, G_FILE_TEST_EXISTS) && i < INT_MAX);
if (!strcmp(basename, CTF_FS_METADATA_FILENAME)) {
/* Ignore the metadata stream. */
if (!strcmp(basename, CTF_FS_METADATA_FILENAME)) {
/* Ignore the metadata stream. */
- BT_LOGD("Ignoring metadata file `%s/%s`",
+ BT_LOGD("Ignoring metadata file `%s" G_DIR_SEPARATOR_S "%s`",
ctf_fs_trace->path->str, basename);
continue;
}
if (basename[0] == '.') {
ctf_fs_trace->path->str, basename);
continue;
}
if (basename[0] == '.') {
- BT_LOGD("Ignoring hidden file `%s/%s`",
+ BT_LOGD("Ignoring hidden file `%s" G_DIR_SEPARATOR_S "%s`",
ctf_fs_trace->path->str, basename);
continue;
}
ctf_fs_trace->path->str, basename);
continue;
}
/* Create the file. */
file = ctf_fs_file_create();
if (!file) {
/* Create the file. */
file = ctf_fs_file_create();
if (!file) {
- BT_LOGE("Cannot create stream file object for file `%s/%s`",
+ BT_LOGE("Cannot create stream file object for file `%s" G_DIR_SEPARATOR_S "%s`",
ctf_fs_trace->path->str, basename);
goto error;
}
/* Create full path string. */
ctf_fs_trace->path->str, basename);
goto error;
}
/* Create full path string. */
- g_string_append_printf(file->path, "%s/%s",
+ g_string_append_printf(file->path, "%s" G_DIR_SEPARATOR_S "%s",
ctf_fs_trace->path->str, basename);
if (!g_file_test(file->path->str, G_FILE_TEST_IS_REGULAR)) {
BT_LOGD("Ignoring non-regular file `%s`",
ctf_fs_trace->path->str, basename);
if (!g_file_test(file->path->str, G_FILE_TEST_IS_REGULAR)) {
BT_LOGD("Ignoring non-regular file `%s`",
- g_string_printf(metadata_path, "%s/%s", path, CTF_FS_METADATA_FILENAME);
+ g_string_printf(metadata_path, "%s" G_DIR_SEPARATOR_S "%s", path, CTF_FS_METADATA_FILENAME);
if (g_file_test(metadata_path->str, G_FILE_TEST_IS_REGULAR)) {
ret = 1;
if (g_file_test(metadata_path->str, G_FILE_TEST_IS_REGULAR)) {
ret = 1;
+ // FIXME: Remove or ifdef for __MINGW32__
if (strcmp(norm_path->str, "/") == 0) {
BT_LOGE("Opening a trace in `/` is not supported.");
ret = -1;
if (strcmp(norm_path->str, "/") == 0) {
BT_LOGE("Opening a trace in `/` is not supported.");
ret = -1;
- g_string_printf(sub_path, "%s/%s", start_path, basename);
+ g_string_printf(sub_path, "%s" G_DIR_SEPARATOR_S "%s", start_path, basename);
ret = ctf_fs_find_traces(trace_paths, sub_path->str);
g_string_free(sub_path, TRUE);
if (ret) {
ret = ctf_fs_find_traces(trace_paths, sub_path->str);
g_string_free(sub_path, TRUE);
if (ret) {
- g_string_append(metadata_path, "/" CTF_FS_METADATA_FILENAME);
+ g_string_append(metadata_path, G_DIR_SEPARATOR_S CTF_FS_METADATA_FILENAME);
fp = fopen(metadata_path->str, "rb");
g_string_free(metadata_path, TRUE);
end:
fp = fopen(metadata_path->str, "rb");
g_string_free(metadata_path, TRUE);
end:
}
g_string_append(file->path, trace_path);
}
g_string_append(file->path, trace_path);
- g_string_append(file->path, "/" CTF_FS_METADATA_FILENAME);
+ g_string_append(file->path, G_DIR_SEPARATOR_S CTF_FS_METADATA_FILENAME);
if (ctf_fs_file_open(file, "rb")) {
goto error;
if (ctf_fs_file_open(file, "rb")) {
goto error;