From ebab5a9e5958d6c885f76f02bc8b195d5ca48924 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sat, 28 Nov 2009 04:50:01 +0100 Subject: [PATCH 2/2] [afc] afc_truncate: use uint64_t instead of off_t This makes afc_truncate look more like afc_file_truncate which is also using uint64_t for the file size. --- include/libiphone/afc.h | 2 +- src/AFC.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/libiphone/afc.h b/include/libiphone/afc.h index 94eb02e..7eff678 100644 --- a/include/libiphone/afc.h +++ b/include/libiphone/afc.h @@ -103,7 +103,7 @@ afc_error_t afc_file_truncate(afc_client_t client, uint64_t handle, uint64_t new afc_error_t afc_remove_path(afc_client_t client, const char *path); afc_error_t afc_rename_path(afc_client_t client, const char *from, const char *to); afc_error_t afc_make_directory(afc_client_t client, const char *dir); -afc_error_t afc_truncate(afc_client_t client, const char *path, off_t newsize); +afc_error_t afc_truncate(afc_client_t client, const char *path, uint64_t newsize); afc_error_t afc_make_link(afc_client_t client, afc_link_type_t linktype, const char *target, const char *linkname); afc_error_t afc_set_file_time(afc_client_t client, const char *path, uint64_t mtime); diff --git a/src/AFC.c b/src/AFC.c index 15d746e..956c8fc 100644 --- a/src/AFC.c +++ b/src/AFC.c @@ -1157,7 +1157,7 @@ afc_error_t afc_file_truncate(afc_client_t client, uint64_t handle, uint64_t new * @return AFC_E_SUCCESS if everything went well, AFC_E_INVALID_ARGUMENT * if arguments are NULL or invalid, AFC_E_NOT_ENOUGH_DATA otherwise. */ -afc_error_t afc_truncate(afc_client_t client, const char *path, off_t newsize) +afc_error_t afc_truncate(afc_client_t client, const char *path, uint64_t newsize) { char *response = NULL; char *send = (char *) malloc(sizeof(char) * (strlen(path) + 1 + 8)); -- 1.6.3.3