forked from enlightenment/efl
parent
e8ca19f09c
commit
fc2aaf9935
|
@ -124,8 +124,8 @@ struct _Eio_Progress
|
||||||
{
|
{
|
||||||
Eio_File_Op op; /**< IO type */
|
Eio_File_Op op; /**< IO type */
|
||||||
|
|
||||||
off_t current; /**< Current step in the IO operation */
|
long long current; /**< Current step in the IO operation */
|
||||||
off_t max; /**< Number of step to do to complete this IO */
|
long long max; /**< Number of step to do to complete this IO */
|
||||||
float percent; /**< Percent done of the IO operation */
|
float percent; /**< Percent done of the IO operation */
|
||||||
|
|
||||||
const char *source; /**< source of the IO operation */
|
const char *source; /**< source of the IO operation */
|
||||||
|
|
|
@ -293,7 +293,7 @@ _eio_dir_recursiv_ls(Ecore_Thread *thread, Eio_Dir_Copy *copy, const char *targe
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_eio_dir_init(Ecore_Thread *thread,
|
_eio_dir_init(Ecore_Thread *thread,
|
||||||
off_t *step, off_t *count,
|
long long *step, long long *count,
|
||||||
int *length_source, int *length_dest,
|
int *length_source, int *length_dest,
|
||||||
Eio_Dir_Copy *order,
|
Eio_Dir_Copy *order,
|
||||||
Eio_File_Progress *progress)
|
Eio_File_Progress *progress)
|
||||||
|
@ -353,7 +353,7 @@ _eio_dir_target(Eio_Dir_Copy *order, char *target, const char *dir, int length_s
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_eio_dir_mkdir(Ecore_Thread *thread, Eio_Dir_Copy *order,
|
_eio_dir_mkdir(Ecore_Thread *thread, Eio_Dir_Copy *order,
|
||||||
off_t *step, off_t count,
|
long long *step, long long count,
|
||||||
int length_source, int length_dest)
|
int length_source, int length_dest)
|
||||||
{
|
{
|
||||||
const char *dir;
|
const char *dir;
|
||||||
|
@ -387,7 +387,7 @@ _eio_dir_mkdir(Ecore_Thread *thread, Eio_Dir_Copy *order,
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_eio_dir_link(Ecore_Thread *thread, Eio_Dir_Copy *order,
|
_eio_dir_link(Ecore_Thread *thread, Eio_Dir_Copy *order,
|
||||||
off_t *step, off_t count,
|
long long *step, long long count,
|
||||||
int length_source, int length_dest)
|
int length_source, int length_dest)
|
||||||
{
|
{
|
||||||
const char *link;
|
const char *link;
|
||||||
|
@ -448,7 +448,7 @@ _eio_dir_link(Ecore_Thread *thread, Eio_Dir_Copy *order,
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_eio_dir_chmod(Ecore_Thread *thread, Eio_Dir_Copy *order,
|
_eio_dir_chmod(Ecore_Thread *thread, Eio_Dir_Copy *order,
|
||||||
off_t *step, off_t count,
|
long long *step, long long count,
|
||||||
int length_source, int length_dest,
|
int length_source, int length_dest,
|
||||||
Eina_Bool rmdir_source)
|
Eina_Bool rmdir_source)
|
||||||
{
|
{
|
||||||
|
@ -514,8 +514,8 @@ _eio_dir_copy_heavy(void *data, Ecore_Thread *thread)
|
||||||
|
|
||||||
int length_source = 0;
|
int length_source = 0;
|
||||||
int length_dest = 0;
|
int length_dest = 0;
|
||||||
off_t count;
|
long long count;
|
||||||
off_t step;
|
long long step;
|
||||||
|
|
||||||
/* list all the content that should be copied */
|
/* list all the content that should be copied */
|
||||||
if (!_eio_dir_recursiv_ls(thread, copy, copy->progress.source))
|
if (!_eio_dir_recursiv_ls(thread, copy, copy->progress.source))
|
||||||
|
@ -636,8 +636,8 @@ _eio_dir_move_heavy(void *data, Ecore_Thread *thread)
|
||||||
|
|
||||||
int length_source;
|
int length_source;
|
||||||
int length_dest;
|
int length_dest;
|
||||||
off_t count;
|
long long count;
|
||||||
off_t step;
|
long long step;
|
||||||
|
|
||||||
/* just try a rename, maybe we are lucky... */
|
/* just try a rename, maybe we are lucky... */
|
||||||
if (rename(move->progress.source, move->progress.dest) == 0)
|
if (rename(move->progress.source, move->progress.dest) == 0)
|
||||||
|
@ -741,8 +741,8 @@ _eio_dir_rmrf_heavy(void *data, Ecore_Thread *thread)
|
||||||
const char *file = NULL;
|
const char *file = NULL;
|
||||||
const char *dir = NULL;
|
const char *dir = NULL;
|
||||||
|
|
||||||
off_t count;
|
long long count;
|
||||||
off_t step;
|
long long step;
|
||||||
|
|
||||||
/* list all the content that should be moved */
|
/* list all the content that should be moved */
|
||||||
if (!_eio_dir_recursiv_ls(thread, rmrf, rmrf->progress.source))
|
if (!_eio_dir_recursiv_ls(thread, rmrf, rmrf->progress.source))
|
||||||
|
|
|
@ -268,10 +268,10 @@ _eio_file_write(int fd, void *mem, ssize_t length)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_eio_file_copy_mmap(Ecore_Thread *thread, Eio_File_Progress *op, int in, int out, off_t size)
|
_eio_file_copy_mmap(Ecore_Thread *thread, Eio_File_Progress *op, int in, int out, long long size)
|
||||||
{
|
{
|
||||||
char *m = MAP_FAILED;
|
char *m = MAP_FAILED;
|
||||||
off_t i;
|
long long i;
|
||||||
|
|
||||||
for (i = 0; i < size; i += EIO_PACKET_SIZE * EIO_PACKET_COUNT)
|
for (i = 0; i < size; i += EIO_PACKET_SIZE * EIO_PACKET_COUNT)
|
||||||
{
|
{
|
||||||
|
@ -320,11 +320,11 @@ _eio_file_copy_mmap(Ecore_Thread *thread, Eio_File_Progress *op, int in, int out
|
||||||
|
|
||||||
#ifdef EFL_HAVE_SPLICE
|
#ifdef EFL_HAVE_SPLICE
|
||||||
static int
|
static int
|
||||||
_eio_file_copy_splice(Ecore_Thread *thread, Eio_File_Progress *op, int in, int out, off_t size)
|
_eio_file_copy_splice(Ecore_Thread *thread, Eio_File_Progress *op, int in, int out, long long size)
|
||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
off_t count;
|
long long count;
|
||||||
off_t i;
|
long long i;
|
||||||
int pipefd[2];
|
int pipefd[2];
|
||||||
|
|
||||||
if (pipe(pipefd) < 0)
|
if (pipe(pipefd) < 0)
|
||||||
|
|
|
@ -122,7 +122,7 @@ eio_progress_free(Eio_Progress *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
eio_progress_send(Ecore_Thread *thread, Eio_File_Progress *op, off_t current, off_t max)
|
eio_progress_send(Ecore_Thread *thread, Eio_File_Progress *op, long long current, long long max)
|
||||||
{
|
{
|
||||||
Eio_Progress *progress;
|
Eio_Progress *progress;
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,8 @@
|
||||||
# include <features.h>
|
# include <features.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _FILE_OFFSET_BITS
|
#undef _FILE_OFFSET_BITS
|
||||||
# define _FILE_OFFSET_BITS 64
|
#define _FILE_OFFSET_BITS 64
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -190,7 +189,7 @@ Eio_Progress *eio_progress_malloc(void);
|
||||||
void eio_progress_free(Eio_Progress *progress);
|
void eio_progress_free(Eio_Progress *progress);
|
||||||
|
|
||||||
void eio_progress_send(Ecore_Thread *thread, Eio_File_Progress *op,
|
void eio_progress_send(Ecore_Thread *thread, Eio_File_Progress *op,
|
||||||
off_t current, off_t max);
|
long long current, long long max);
|
||||||
void eio_progress_cb(Eio_Progress *progress, Eio_File_Progress *op);
|
void eio_progress_cb(Eio_Progress *progress, Eio_File_Progress *op);
|
||||||
|
|
||||||
Eina_Bool eio_file_copy_do(Ecore_Thread *thread, Eio_File_Progress *copy);
|
Eina_Bool eio_file_copy_do(Ecore_Thread *thread, Eio_File_Progress *copy);
|
||||||
|
|
Loading…
Reference in New Issue