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(). |
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.
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().
int hlp__lstat | ( | const char * | fn, | |
struct sstat_t * | st | |||
) |
A wrapper for lstat().
Definition at line 341 of file helper.c.
References DEBUGP, hlp__copy_stats(), and S_IFGARBAGE.
Referenced by cb__add_entry(), ci__work(), cs__compare_file(), delay__work(), dir__enumerator(), exp__work(), ops__update_single_entry(), prp__s_work(), rev___handle_dir_mtime(), rev__install_file(), rev__merge(), sync__progress(), sync__work(), up__add_directory(), up__close_directory(), up__close_file(), up__set_meta_data(), waa__dir_enum(), waa__init(), waa__open(), and waa__partial_update().