Lines Matching refs:st

177 	struct stat st;
179 result = Stat(&st);
181 fMaxFileSize = st.st_size;
480 Inode::Stat(struct stat* st, OpenAttrCookie* attr)
482 ASSERT(st != NULL);
485 return GetStat(st, attr);
489 return GetStat(st, NULL);
491 status_t result = fMetaCache.GetStat(st);
498 fMetaCache.GetStat(st);
506 Inode::GetStat(struct stat* st, OpenAttrCookie* attr)
508 ASSERT(st != NULL);
521 st->st_size = values[0].fData.fValue64;
524 st->st_mode = Type();
526 st->st_mode |= values[next].fData.fValue32;
529 st->st_mode = 777;
532 st->st_nlink = values[next].fData.fValue32;
535 st->st_nlink = 1;
540 st->st_uid = atoi(owner);
542 st->st_uid = gIdMapper->GetUserId(owner);
545 st->st_uid = 0;
550 st->st_gid = atoi(group);
552 st->st_gid = gIdMapper->GetGroupId(group);
555 st->st_gid = 0;
558 memcpy(&st->st_atim, values[next].fData.fPointer,
562 memset(&st->st_atim, 0, sizeof(timespec));
565 memcpy(&st->st_crtim, values[next].fData.fPointer,
569 memset(&st->st_crtim, 0, sizeof(timespec));
572 memcpy(&st->st_ctim, values[next].fData.fPointer,
576 memset(&st->st_ctim, 0, sizeof(timespec));
579 memcpy(&st->st_mtim, values[next].fData.fPointer,
583 memset(&st->st_mtim, 0, sizeof(timespec));
586 st->st_blksize = fFileSystem->Root()->IOSize();
587 st->st_blocks = st->st_size / st->st_blksize;
588 st->st_blocks += st->st_size % st->st_blksize == 0 ? 0 : 1;
595 Inode::WriteStat(const struct stat* st, uint32 mask, OpenAttrCookie* cookie)
597 ASSERT(st != NULL);
604 fMaxFileSize = st->st_size;
605 file_cache_set_size(fFileCache, st->st_size);
609 attr[i].fData.fValue64 = st->st_size;
616 attr[i].fData.fValue32 = st->st_mode;
623 attr[i].fData.fPointer = gIdMapper->GetOwner(st->st_uid);
630 attr[i].fData.fPointer = gIdMapper->GetOwnerGroup(st->st_gid);
637 attr[i].fData.fPointer = malloc(sizeof(st->st_atim));
638 memcpy(attr[i].fData.fPointer, &st->st_atim, sizeof(st->st_atim));
645 attr[i].fData.fPointer = malloc(sizeof(st->st_mtim));
646 memcpy(attr[i].fData.fPointer, &st->st_mtim, sizeof(st->st_mtim));
899 struct stat st;
900 Stat(&st);