* Re: Fwd: reiser4progs
[not found] ` <ee5afd760810271230v7487969wd7eedee194533d9b@mail.gmail.com>
@ 2008-10-27 23:04 ` Edward Shishkin
0 siblings, 0 replies; only message in thread
From: Edward Shishkin @ 2008-10-27 23:04 UTC (permalink / raw)
To: Jan de Kruyf; +Cc: Reiserfs mailing list
Jan de Kruyf wrote:
> hallo Edward
hello
>
> I give up. tried to send this to the list. But the list, gmail, and I
> dont agree somehow.
it seems, the list doesn't like html signatures created by gmail
> Perhaps you are willing to pass it on?
>
> jan.
>
> ---------- Forwarded message ----------
[...]
>
>
> hallo,
> Could someone please point me in the right direction here:
>
> How do I find out if a directory entry is a (sub-)directory itself in
> the following piece of code:
> (lifted from demos/ls.c)
reiser4_object_readdir() extracts directory
entries, and every such entry (cde) is a pair:
. stat-data key (without offset);
. null-terminated name.
IMHO this is not enough to make sure that
directory entry is a directory. You might also
want to find stat-data of each entry by its key.
>
> reiser4_object_t *object;
> entry_hint_t entry;
>
>
> if (reiser4_psobj(object)->p.id.group == DIR_OBJECT) {
> while (reiser4_object_readdir(object, &entry) > 0) {
> printf("[%s] %s\n", reiser4_print_key(&entry.object),
This is only a lightweight non-recursive version of "ls",
which just types file names - it is not suitable for you..
I am sure there are proper tools for your needs. Unfortunately,
I can not drop you a quick detailed hint: I am not a specialist in
reiser4progs..
Thanks,
Edward.
>
> }
>
> as background: I am writing grub2 file system code for a reiser4 boot
> partition, with help from libreiser4 and friends.
>
> regards
>
> Jan de Kruyf.
>
>
^ permalink raw reply [flat|nested] only message in thread