Stat()-Wrappers.

These functions wrap the syscalls lstat() and fstat(), to return the "normalized" 0 for success and an error number otherwise. More...

Functions

int hlp__lstat (const char *fn, struct sstat_t *st)
 A wrapper for lstat().
int hlp__fstat (int fd, struct sstat_t *st)
 A wrapper for fstat().

Detailed Description

These functions wrap the syscalls lstat() and fstat(), to return the "normalized" 0 for success and an error number otherwise.

Furthermore they return their result in a struct sstat_t pointer.

The copying done in these functions hurts a bit, but the space wasted by the normal struct stat64 hurts much more. GHz are cheap, memory doesn't scale as much.

Note:
As we want to store symlinks as such, we never use stat() calls - these would follow the symlinks and return the wrong meta-data.

Function Documentation

int hlp__fstat ( int  fd,
struct sstat_t st 
)

A wrapper for fstat().

Definition at line 381 of file helper.c.

References DEBUGP, sstat_t::dev, sstat_t::gid, hlp__copy_stats(), sstat_t::ino, sstat_t::mode, sstat_t::rdev, sstat_t::size, and sstat_t::uid.

Referenced by dir__get_dir_size(), and res__remove_aux_files().

Here is the call graph for this function:

Here is the caller graph for this function:

int hlp__lstat ( const char *  fn,
struct sstat_t st 
)

Generated for fsvs by  doxygen 1.6.1