diff --git a/drivers/ddk/io/create.c b/drivers/ddk/io/create.c index 69c73fde2c..23141de7a4 100644 --- a/drivers/ddk/io/create.c +++ b/drivers/ddk/io/create.c @@ -2,11 +2,13 @@ int create_file(const char *path) { - int err=0; - ksys70_t k; - k.p00 = 2; - k.p12 = 0; - k.p20 = 0; - k.p21 = path; + int err; + ksys70_t k; + k.p00 = 2; + k.p04dw = 0; + k.p08dw = 0; + k.p12 = 0; + k.p20 = 0; + k.p21 = path; return FS_Service(&k, &err); }; diff --git a/drivers/ddk/io/finfo.c b/drivers/ddk/io/finfo.c index 68dd2b4abf..5370af65d0 100644 --- a/drivers/ddk/io/finfo.c +++ b/drivers/ddk/io/finfo.c @@ -57,12 +57,14 @@ typedef struct int get_fileinfo(const char *path, FILEINFO *info) { - ksys70_t k; - int err; - k.p00 = 5; - k.bdfe = info; - k.p20 = 0; - k.p21 = path; + int err; + ksys70_t k; + k.p00 = 5; + k.p04dw = 0; + k.p08dw = 0; + k.p12 = 0; + k.bdfe = info; + k.p20 = 0; + k.p21 = path; return FS_Service(&k, &err); } - diff --git a/drivers/ddk/io/ssize.c b/drivers/ddk/io/ssize.c index ac95a8334b..8b2afe2d34 100644 --- a/drivers/ddk/io/ssize.c +++ b/drivers/ddk/io/ssize.c @@ -2,9 +2,9 @@ int set_file_size(const char *path, unsigned size) { - ksys70_t k; + ksys70_t k; int err; - k.p00 = 4; + k.p00 = 4; k.p04dw = size; k.p08dw = 0; k.p20 = 0; diff --git a/drivers/ddk/io/write.c b/drivers/ddk/io/write.c index 726acfc203..b486a9a118 100644 --- a/drivers/ddk/io/write.c +++ b/drivers/ddk/io/write.c @@ -10,11 +10,5 @@ int write_file(const char *path,const void *buff, k.cbuf16 = buff; k.p20 = 0; k.p21 = path; - int status; - unsigned bytes_written_v; - FS_Service(&k, &bytes_written_v); - if (!status){ - *writes = bytes_written_v; - } - return status; + return FS_Service(&k, writes); }