// NOTE: fent cannot be locked int fskit_do_user_stat( struct fskit_core* core, char const* fs_path, struct fskit_entry* fent, struct stat* sb ) { int rc = 0; int cbrc = 0; char name[FSKIT_FILESYSTEM_NAMEMAX+1]; struct fskit_route_dispatch_args dargs; memset( name, 0, FSKIT_FILESYSTEM_NAMEMAX+1 ); fskit_basename( fs_path, name ); fskit_route_stat_args( &dargs, name, sb ); rc = fskit_route_call_stat( core, fs_path, fent, &dargs, &cbrc ); if( rc == -EPERM || rc == -ENOSYS ) { // no stat defined return 0; } else if( rc != 0 || cbrc != 0 ) { fskit_error("fskit_route_call_stat rc = %d, cbrc = %d\n", rc, cbrc ); } return cbrc; }
int fskit_do_user_stat( struct fskit_core* core, char const* fs_path, struct fskit_entry* fent, struct stat* sb ) { int rc = 0; int cbrc = 0; struct fskit_route_dispatch_args dargs; fskit_route_stat_args( &dargs, sb ); rc = fskit_route_call_stat( core, fs_path, fent, &dargs, &cbrc ); if( rc == -EPERM || rc == -ENOSYS ) { // no stat defined return 0; } else if( rc != 0 || cbrc != 0 ) { fskit_error("fskit_route_call_stat rc = %d, cbrc = %d\n", rc, cbrc ); } return cbrc; }