Faking root stat

20 views
Skip to first unread message

Frédéric SERGENT

unread,
Feb 16, 2012, 1:18:07 PM2/16/12
to uf...@googlegroups.com
Hi Ricky,

another subject: faking the info about "/" in uffs_GetObjectInfo is a good thing. Before you did that, I ran into a crash when calling uffs_stat on "/" and "", but did not have time to investigate why, so thanks for this too.

Not a crucial point, but I have a question about that:

I assume the root dir is the only object affected by this (no other has (obj->parent == PARENT_OF_ROOT), do they?).

So I suppose we might as well set the info->info.attr?

   * FILE_ATTR_DIR for sure, I guess
   * maybe even FILE_ATTR_WRITE, as I suppose "/" is always writable?

Unless other paths could need this faking part?

Regards,
Fred


Frédéric SERGENT

unread,
Feb 16, 2012, 1:33:50 PM2/16/12
to uf...@googlegroups.com


To be more precise, I tried to replace:
           
            (...)
            info->serial = obj->serial;
            if (err)
            (...)

by:
            (...)
            info->serial = obj->serial;
            info->info.attr |= FILE_ATTR_DIR;
            info->info.attr |= FILE_ATTR_WRITE;
            if (err)
            (...)

Frédéric SERGENT

unread,
Feb 22, 2012, 5:22:19 AM2/22/12
to uf...@googlegroups.com
Hi Ricky,

any idea on that?

Regards,
Fred
Reply all
Reply to author
Forward
0 new messages