mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-12-03 21:30:11 -05:00
checkpoint
This commit is contained in:
parent
eaa2593a4b
commit
a5a6b45463
18 changed files with 581 additions and 645 deletions
|
|
@ -235,7 +235,7 @@ static int may_unmount(const char *mnt, int quiet)
|
|||
*/
|
||||
static int check_is_mount_child(void *p)
|
||||
{
|
||||
const char **a = p;
|
||||
const char **a = (const char**)p;
|
||||
const char *last = a[0];
|
||||
const char *mnt = a[1];
|
||||
int res;
|
||||
|
|
@ -817,10 +817,10 @@ static int do_mount(const char *mnt, char **typep, mode_t rootmode,
|
|||
fuse_mnt_check_empty(progname, mnt, rootmode, rootsize) == -1)
|
||||
goto err;
|
||||
|
||||
source = malloc((fsname ? strlen(fsname) : 0) +
|
||||
(subtype ? strlen(subtype) : 0) + strlen(dev) + 32);
|
||||
source = (char*)malloc((fsname ? strlen(fsname) : 0) +
|
||||
(subtype ? strlen(subtype) : 0) + strlen(dev) + 32);
|
||||
|
||||
type = malloc((subtype ? strlen(subtype) : 0) + 32);
|
||||
type = (char*)malloc(((subtype != NULL) ? strlen(subtype) : 0) + 32);
|
||||
if (!type || !source) {
|
||||
fprintf(stderr, "%s: failed to allocate memory\n", progname);
|
||||
goto err;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ static void add_arg(char **cmdp, const char *opt)
|
|||
{
|
||||
size_t optlen = strlen(opt);
|
||||
size_t cmdlen = *cmdp ? strlen(*cmdp) : 0;
|
||||
char *cmd = xrealloc(*cmdp, cmdlen + optlen * 4 + 4);
|
||||
char *cmd = (char*)xrealloc(*cmdp, cmdlen + optlen * 4 + 4);
|
||||
char *s;
|
||||
s = cmd + cmdlen;
|
||||
if (*cmdp)
|
||||
|
|
@ -63,7 +63,7 @@ static char *add_option(const char *opt, char *options)
|
|||
{
|
||||
int oldlen = options ? strlen(options) : 0;
|
||||
|
||||
options = xrealloc(options, oldlen + 1 + strlen(opt) + 1);
|
||||
options = (char*)xrealloc(options, oldlen + 1 + strlen(opt) + 1);
|
||||
if (!oldlen)
|
||||
strcpy(options, opt);
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue