File: ext2_readdir.c

package info (click to toggle)
openbios-sparc 1.0%2Bsvn640-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 4,412 kB
  • ctags: 12,091
  • sloc: ansic: 57,249; asm: 2,680; xml: 1,335; cpp: 414; makefile: 224; sh: 190
file content (25 lines) | stat: -rw-r--r-- 454 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 *
 * (c) 2008-2009 Laurent Vivier <Laurent@lvivier.info>
 *
 * This file has been copied from EMILE, http://emile.sf.net
 *
 */

#include "libext2.h"
#include "ext2_utils.h"

static struct ext2_dir_entry_2 entry;

struct ext2_dir_entry_2 *ext2_readdir(ext2_DIR *dir)
{
	int ret;

	ret = ext2_dir_entry(dir->volume, dir->inode, dir->index, &entry);
	if (ret == -1)
		return NULL;
	dir->index = ret;

	entry.name[entry.name_len] = 0;
	return &entry;
}