diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2004-12-23 10:32:23 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2004-12-23 10:32:23 +0000 |
commit | f1e684a20272b159226e20e25fb0d6d0a7c77867 (patch) | |
tree | c45a03486e29818cdc6df4d984098922ffae21a5 /store | |
parent | 18a6c0b56a003cd882e082f8d5f74ebf7a3e5608 (diff) |
INTEGRATION: CWS mhu05 (1.2.78); FILE MERGED
2004/12/09 18:03:24 mhu 1.2.78.1: #i38646# Disabled internal commit (sync) to disk (STORE_FEATURE_COMMIT). Improved propagation of errors from fsync() and close() calls.
Diffstat (limited to 'store')
-rw-r--r-- | store/source/fileos2.hxx | 20 | ||||
-rw-r--r-- | store/source/filestd.hxx | 19 |
2 files changed, 27 insertions, 12 deletions
diff --git a/store/source/fileos2.hxx b/store/source/fileos2.hxx index 9e681872cb37..d3ebc0c8ed19 100644 --- a/store/source/fileos2.hxx +++ b/store/source/fileos2.hxx @@ -2,9 +2,9 @@ * * $RCSfile: fileos2.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: hr $ $Date: 2003-03-27 14:06:31 $ + * last change: $Author: vg $ $Date: 2004-12-23 11:32:11 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -264,17 +264,25 @@ inline storeError __store_ftrunc (HSTORE h, sal_uInt32 n) /* * __store_fsync. */ -inline void __store_fsync (HSTORE h) +inline storeError __store_fsync (HSTORE h) { - ::DosResetBuffer (h); + APIRET result = ::DosResetBuffer (h); + if (result) + return ERROR_FROM_NATIVE(result); + else + return store_E_None; } /* * __store_fclose. */ -inline void __store_fclose (HSTORE h) +inline storeError __store_fclose (HSTORE h) { - ::DosClose (h); + APIRET result = ::DosClose (h); + if (result) + return ERROR_FROM_NATIVE(result); + else + return store_E_None; } #endif /* INCLUDED_STORE_FILEOS2_HXX */ diff --git a/store/source/filestd.hxx b/store/source/filestd.hxx index 9816f620ce6d..6db09ae6f0d8 100644 --- a/store/source/filestd.hxx +++ b/store/source/filestd.hxx @@ -2,9 +2,9 @@ * * $RCSfile: filestd.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: hr $ $Date: 2003-03-27 14:06:32 $ + * last change: $Author: vg $ $Date: 2004-12-23 11:32:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -92,6 +92,7 @@ static const __store_errcode_mapping_st __store_errcode_map[] = { EDEADLOCK, store_E_LockingViolation }, { EBADF, store_E_InvalidHandle }, { EINVAL, store_E_InvalidParameter }, + { ENOSPC, store_E_OutOfSpace }, }; /* @@ -250,17 +251,23 @@ inline storeError __store_ftrunc (HSTORE h, sal_uInt32 n) /* * __store_fsync. */ -inline void __store_fsync (HSTORE h) +inline storeError __store_fsync (HSTORE h) { - ::fflush (h); + if (::fflush (h) < 0) + return ERROR_FROM_NATIVE(errno); + else + return store_E_None; } /* * __store_fclose. */ -inline void __store_fclose (HSTORE h) +inline storeError __store_fclose (HSTORE h) { - ::fclose (h); + if (::fclose (h) < 0) + return ERROR_FROM_NATIVE(errno); + else + return store_E_None; } #endif /* INCLUDED_STORE_FILESTD_HXX */ |