aboutsummaryrefslogtreecommitdiff
path: root/libmpio
diff options
context:
space:
mode:
authorcrunchy <crunchy>2003-06-27 12:21:21 +0000
committercrunchy <crunchy>2003-06-27 12:21:21 +0000
commitc6c22c4fadb3000453389f3ecf471392674adfd1 (patch)
tree8e9b5720b0c8474226dae99decfbd4c82f657d8d /libmpio
parent021de49f8e3d1c3b9f8e6e13df0ee7f2552c7b7a (diff)
downloadmpiosh-c6c22c4fadb3000453389f3ecf471392674adfd1.tar.gz
mpiosh-c6c22c4fadb3000453389f3ecf471392674adfd1.tar.bz2
mpiosh-c6c22c4fadb3000453389f3ecf471392674adfd1.zip
add backup and restore commands; little bug fix and clean up. Need to be tested! Just give me 5 minutes, please!
Diffstat (limited to 'libmpio')
-rw-r--r--libmpio/src/mpio.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/libmpio/src/mpio.c b/libmpio/src/mpio.c
index 1dfa192..146b12e 100644
--- a/libmpio/src/mpio.c
+++ b/libmpio/src/mpio.c
@@ -1,5 +1,5 @@
/*
- * $Id: mpio.c,v 1.5 2003/06/26 19:53:58 germeier Exp $
+ * $Id: mpio.c,v 1.6 2003/06/27 12:21:21 crunchy Exp $
*
* libmpio - a library for accessing Digit@lways MPIO players
* Copyright (C) 2002, 2003 Markus Germeier
@@ -555,13 +555,12 @@ mpio_file_get_real(mpio_t *m, mpio_mem_t mem, mpio_filename_t filename,
if (f && p) {
filesize=fsize=mpio_dentry_get_filesize(m, mem, p);
- if (memory)
- {
- *memory = malloc(filesize);
- } else {
- unlink(filename);
- fd = open(as, (O_RDWR | O_CREAT), (S_IRWXU | S_IRGRP | S_IROTH));
- }
+ if (memory) {
+ *memory = malloc(filesize);
+ } else {
+ unlink( as );
+ fd = open(as, (O_RDWR | O_CREAT), (S_IRWXU | S_IRGRP | S_IROTH));
+ }
do
{