Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39955 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -37,10 +37,11 @@
|
||||
#include "lock.h"
|
||||
#include "ntfsdir.h"
|
||||
|
||||
|
||||
//callback function for readdir()
|
||||
static int _ntfs_dirent_filler(void *_dirent, const ntfschar *name,
|
||||
const int name_len, const int name_type, const s64 pos,
|
||||
const MFT_REF mref, const unsigned dt_type)
|
||||
const int name_len, const int name_type, const s64 pos, const MFT_REF mref,
|
||||
const unsigned dt_type)
|
||||
{
|
||||
char *filename = NULL;
|
||||
dircookie *cookie = (dircookie*)_dirent;
|
||||
@@ -48,7 +49,8 @@ static int _ntfs_dirent_filler(void *_dirent, const ntfschar *name,
|
||||
if (name_type == FILE_NAME_DOS)
|
||||
return 0;
|
||||
|
||||
if (MREF(mref) == FILE_root || MREF(mref) >= FILE_first_user || cookie->show_sys_files) {
|
||||
if (MREF(mref) == FILE_root || MREF(mref) >= FILE_first_user
|
||||
|| cookie->show_sys_files) {
|
||||
if (cookie->readed == 1) {
|
||||
cookie->pos=pos;
|
||||
cookie->readed = 0;
|
||||
@@ -63,12 +65,15 @@ static int _ntfs_dirent_filler(void *_dirent, const ntfschar *name,
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
fs_free_dircookie(fs_volume *_vol, fs_vnode *vnode, void *cookie)
|
||||
{
|
||||
@@ -86,6 +91,7 @@ fs_free_dircookie( fs_volume *_vol, fs_vnode *vnode, void *cookie )
|
||||
return B_NO_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
fs_opendir(fs_volume *_vol, fs_vnode *_node, void** _cookie)
|
||||
{
|
||||
@@ -118,9 +124,9 @@ fs_opendir( fs_volume *_vol, fs_vnode *_node, void** _cookie )
|
||||
cookie->name[0] = 0;
|
||||
cookie->show_sys_files = ns->show_sys_files;
|
||||
*_cookie = (void*)cookie;
|
||||
}
|
||||
else
|
||||
} else
|
||||
result = ENOMEM;
|
||||
|
||||
exit:
|
||||
if (ni)
|
||||
ntfs_inode_close(ni);
|
||||
@@ -132,6 +138,7 @@ exit:
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
fs_closedir(fs_volume *_vol, fs_vnode *_node, void *cookie)
|
||||
{
|
||||
@@ -163,6 +170,7 @@ exit:
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
fs_readdir(fs_volume *_vol, fs_vnode *_node, void *_cookie, struct dirent *buf,
|
||||
size_t bufsize, uint32 *num)
|
||||
@@ -229,6 +237,7 @@ exit:
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
fs_rewinddir(fs_volume *_vol, fs_vnode *vnode, void *_cookie)
|
||||
{
|
||||
@@ -247,10 +256,10 @@ fs_rewinddir( fs_volume *_vol, fs_vnode *vnode, void *_cookie )
|
||||
cookie->name[0] = 0;
|
||||
result = B_NO_ERROR;
|
||||
}
|
||||
|
||||
ERRPRINT("fs_rewinddir - EXIT, result is %s\n", strerror(result));
|
||||
|
||||
UNLOCK_VOL(ns);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user