Lines 17-23
Link Here
|
17 |
#include <stdlib.h> |
17 |
#include <stdlib.h> |
18 |
#include <stdio.h> |
18 |
#include <stdio.h> |
19 |
|
19 |
|
20 |
#include <dal/file_dal.h> |
20 |
#include <dal/file.h> |
21 |
#include <reiserfs/reiserfs.h> |
21 |
#include <reiserfs/reiserfs.h> |
22 |
|
22 |
|
23 |
#if (PYTHON_API_VERSION >= 1011) |
23 |
#if (PYTHON_API_VERSION >= 1011) |
Lines 46-53
Link Here
|
46 |
|
46 |
|
47 |
if (!dal) return; |
47 |
if (!dal) return; |
48 |
|
48 |
|
49 |
close((int)(unsigned long)dal->dev); |
49 |
dal_close(dal); |
50 |
dal_free(dal); |
|
|
51 |
} |
50 |
} |
52 |
|
51 |
|
53 |
/* reiser file object */ |
52 |
/* reiser file object */ |
Lines 195-201
Link Here
|
195 |
if (fs->fs != NULL) |
194 |
if (fs->fs != NULL) |
196 |
{ |
195 |
{ |
197 |
reiserfs_fs_close(fs->fs); |
196 |
reiserfs_fs_close(fs->fs); |
198 |
file_dal_close(fs->dal); |
197 |
file_close(fs->dal); |
199 |
fs->fs = NULL; |
198 |
fs->fs = NULL; |
200 |
} |
199 |
} |
201 |
Py_INCREF(Py_None); |
200 |
Py_INCREF(Py_None); |
Lines 218-230
Link Here
|
218 |
return NULL; |
217 |
return NULL; |
219 |
} |
218 |
} |
220 |
|
219 |
|
221 |
if (!(dal = file_dal_open(name, block_size, O_RDONLY))) { |
220 |
if (!(dal = file_open(name, block_size, O_RDONLY))) { |
222 |
PyErr_SetString(PyExc_ValueError, "Couldn't create device abstraction"); |
221 |
PyErr_SetString(PyExc_ValueError, "Couldn't create device abstraction"); |
223 |
return NULL; |
222 |
return NULL; |
224 |
} |
223 |
} |
225 |
|
224 |
|
226 |
if (!(rfs = reiserfs_fs_open_fast(dal, dal))) { |
225 |
if (!(rfs = reiserfs_fs_open_fast(dal, dal))) { |
227 |
file_dal_close(dal); |
226 |
file_close(dal); |
228 |
PyErr_SetString(PyExc_ValueError, "unable to open file"); |
227 |
PyErr_SetString(PyExc_ValueError, "unable to open file"); |
229 |
return NULL; |
228 |
return NULL; |
230 |
} |
229 |
} |
Lines 265-271
Link Here
|
265 |
if (fs->fs != NULL) |
264 |
if (fs->fs != NULL) |
266 |
{ |
265 |
{ |
267 |
reiserfs_fs_close(fs->fs); |
266 |
reiserfs_fs_close(fs->fs); |
268 |
file_dal_close(fs->dal); |
267 |
file_close(fs->dal); |
269 |
fs->fs = NULL; |
268 |
fs->fs = NULL; |
270 |
} |
269 |
} |
271 |
PyObject_DEL(fs); |
270 |
PyObject_DEL(fs); |