-
Notifications
You must be signed in to change notification settings - Fork 84
Windows support #510
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
base: v2.4-stable
Are you sure you want to change the base?
Windows support #510
Changes from 20 commits
184d916
f3a4e82
3bd0ba0
8b88246
81b2ff4
15e69c6
a7a2591
80395fa
9b03b94
f2ed251
c8c70bf
46488e1
c49d6b6
b68e771
ba335dc
2ef6dec
ebbb858
092238d
14a7620
757a2ed
83f8380
35760f9
45662c0
961c2b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1742,7 +1742,7 @@ ssize_t _unified_insert_new_request(const char *buf, off_t offset, size_t count, | |
{ | ||
int ret; | ||
struct dentry_priv *dpr = d->iosched_priv; | ||
struct write_request *new_req; | ||
struct write_request *new_req = NULL; | ||
size_t copy_count; | ||
|
||
if (! (*cache)) { | ||
|
@@ -1764,7 +1764,7 @@ ssize_t _unified_insert_new_request(const char *buf, off_t offset, size_t count, | |
memcpy(cache_manager_get_object_data(*cache), buf, copy_count); | ||
|
||
/* Store new write request */ | ||
new_req = calloc(1, sizeof(struct write_request)); | ||
new_req = (struct write_request*)calloc(1, sizeof(struct write_request)); | ||
if (! new_req) { | ||
ltfsmsg(LTFS_ERR, 13018E); | ||
_unified_cache_free(*cache, 0, priv); | ||
|
@@ -2307,10 +2307,10 @@ int unified_set_profiler(char *work_dir, bool enable, void *iosched_handle) | |
{ | ||
int rc = 0; | ||
char *path; | ||
FILE *p; | ||
FILE * p = NULL; | ||
struct timer_info timerinfo; | ||
struct unified_data *priv = iosched_handle; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not keep the leading spaces in an empty line. |
||
if (enable) { | ||
if (priv->profiler) | ||
return 0; | ||
|
@@ -2325,7 +2325,7 @@ int unified_set_profiler(char *work_dir, bool enable, void *iosched_handle) | |
return -LTFS_NO_MEMORY; | ||
} | ||
|
||
p = fopen(path, PROFILER_FILE_MODE); | ||
arch_fopen(path, PROFILER_FILE_MODE,p); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why |
||
|
||
free(path); | ||
|
||
|
@@ -2361,6 +2361,7 @@ struct iosched_ops unified_ops = { | |
.set_profiler = unified_set_profiler, | ||
}; | ||
|
||
|
||
struct iosched_ops *iosched_get_ops(void) | ||
{ | ||
return &unified_ops; | ||
|
@@ -2370,6 +2371,7 @@ struct iosched_ops *iosched_get_ops(void) | |
extern char iosched_unified_dat[]; | ||
#endif | ||
|
||
|
||
const char *iosched_get_message_bundle_name(void **message_data) | ||
{ | ||
#ifndef mingw_PLATFORM | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,11 +49,11 @@ | |
|
||
#include "libltfs/kmi_ops.h" | ||
#include "libltfs/ltfs_fuse_version.h" | ||
#include <fuse.h> | ||
#include "key_format_ltfs.h" | ||
|
||
#include <fuse.h> | ||
#ifdef mingw_PLATFORM | ||
#include "libltfs/arch/win/win_util.h" | ||
#include "arch/win/win_util.h" | ||
|
||
#endif | ||
|
||
struct kmi_simple_options_data { | ||
|
@@ -193,20 +193,20 @@ int simple_parse_opts(void *opt_args) | |
+ strlen((char *) key[i].dk) + strlen(":") + strlen((char *) key[i].dki) + 1; | ||
|
||
if (priv.dk_list) | ||
priv.dk_list = realloc(priv.dk_list, dk_list_len); | ||
priv.dk_list = (char*)realloc(priv.dk_list, dk_list_len); | ||
else | ||
priv.dk_list = calloc(dk_list_len, sizeof(unsigned char)); | ||
priv.dk_list = (char*)calloc(dk_list_len, sizeof(unsigned char)); | ||
if (priv.dk_list == NULL) { | ||
ltfsmsg(LTFS_ERR, 10001E, __FUNCTION__); | ||
return -LTFS_NO_MEMORY; | ||
} | ||
*(priv.dk_list + original_dk_list_len) = '\0'; | ||
|
||
if (original_dk_list_len) | ||
strcat((char *) priv.dk_list, "/"); | ||
strcat((char *) priv.dk_list, (char *) key[i].dk); | ||
strcat((char *) priv.dk_list, ":"); | ||
strcat((char *) priv.dk_list, (char *) key[i].dki); | ||
arch_strcat((char *) priv.dk_list, dk_list_len, "/"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I cannot understand why If you have a reason please explain it by comment and add |
||
arch_strcat((char *) priv.dk_list, dk_list_len,(char *) key[i].dk); | ||
arch_strcat((char *) priv.dk_list, dk_list_len, ":"); | ||
arch_strcat((char *) priv.dk_list, dk_list_len,(char *) key[i].dki); | ||
} | ||
|
||
return 0; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why this cast is needed.