HomeSort by relevance Sort by last modified time
    Searched refs:stat_buf (Results 1 - 25 of 100) sorted by null

1 2 3 4

  /external/f2fs-tools/mkfs/
f2fs_format_utils.c 48 struct stat *stat_buf; local
53 stat_buf = malloc(sizeof(struct stat));
54 if (fstat(fd, stat_buf) < 0 ) {
56 free(stat_buf);
65 if (S_ISREG(stat_buf->st_mode)) {
72 free(stat_buf);
74 } else if (S_ISBLK(stat_buf->st_mode)) {
76 free(stat_buf);
84 (unsigned long)stat_buf->st_size >> 20);
85 free(stat_buf);
    [all...]
  /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/
26-1.c 33 struct stat stat_buf; local
42 if (fstat(fd, &stat_buf) != 0) {
47 old_mode = stat_buf.st_mode;
56 if (fstat(fd, &stat_buf) != 0) {
64 if (stat_buf.st_mode == old_mode) {
26-2.c 42 struct stat stat_buf; local
63 if (fstat(fd, &stat_buf) != 0) {
68 old_uid = stat_buf.st_uid;
69 old_gid = stat_buf.st_gid;
104 if (fstat(fd, &stat_buf) != 0) {
114 if (stat_buf.st_uid == old_uid && stat_buf.st_gid == old_gid) {
119 if (stat_buf.st_uid != old_uid)
121 if (stat_buf.st_gid != old_gid)
16-1.c 30 struct stat stat_buf; local
46 result = fstat(fd, &stat_buf);
55 if (stat_buf.st_uid == geteuid()) {
17-1.c 30 struct stat stat_buf; local
46 result = fstat(fd, &stat_buf);
55 if (stat_buf.st_gid == getegid()) {
21-1.c 28 struct stat stat_buf; local
44 result = fstat(fd, &stat_buf);
53 if (stat_buf.st_size == 0) {
18-1.c 42 struct stat stat_buf; local
60 result = fstat(fd, &stat_buf);
71 * stat_buf.st_mode are set if and only if the same bits of MOD_FLAGS
73 * ALL_MOD_FLAGS & (stat_buf.st_mode ^ (MOD_FLAGS & ~UMASK_FLAGS)) == 0
75 if (!(ALL_MOD_FLAGS & (stat_buf.st_mode ^ (MOD_FLAGS & ~UMASK_FLAGS)))) {
25-1.c 37 struct stat stat_buf; local
58 if (fstat(fd, &stat_buf) != 0) {
66 if (stat_buf.st_size == 0) {
  /external/ltp/testcases/kernel/syscalls/fstat/
fstat02.c 52 struct stat stat_buf; local
55 TEST(fstat(fildes, &stat_buf));
62 if (stat_buf.st_uid != user_id) {
63 tst_resm(TINFO, "stat_buf.st_uid = %i expected %i",
64 stat_buf.st_uid, user_id);
68 if (stat_buf.st_gid != group_id) {
69 tst_resm(TINFO, "stat_buf.st_gid = %i expected %i",
70 stat_buf.st_gid, group_id);
74 if (stat_buf.st_size != FILE_SIZE) {
75 tst_resm(TINFO, "stat_buf.st_size = %li expected %i"
    [all...]
  /external/ltp/testcases/kernel/syscalls/stat/
stat01.c 52 struct stat stat_buf; local
55 TEST(stat(TESTFILE, &stat_buf));
62 if (stat_buf.st_uid != user_id) {
63 tst_resm(TINFO, "stat_buf.st_uid = %i expected %i",
64 stat_buf.st_uid, user_id);
68 if (stat_buf.st_gid != group_id) {
69 tst_resm(TINFO, "stat_buf.st_gid = %i expected %i",
70 stat_buf.st_gid, group_id);
74 if (stat_buf.st_size != FILE_SIZE) {
75 tst_resm(TINFO, "stat_buf.st_size = %li expected %i"
    [all...]
stat02.c 102 struct stat stat_buf; /* stat structure buffer */ local
117 TEST(stat(TESTFILE, &stat_buf));
121 "stat(%s, &stat_buf) Failed, errno=%d : %s",
124 stat_buf.st_mode &= ~S_IFREG;
129 if ((stat_buf.st_uid != user_id) ||
130 (stat_buf.st_gid != group_id) ||
131 (stat_buf.st_size != FILE_SIZE) ||
132 ((stat_buf.st_mode & MASK) != NEW_MODE)) {
  /external/ltp/testcases/kernel/syscalls/lstat/
lstat03.c 63 struct stat stat_buf; local
73 TEST(lstat(SFILE, &stat_buf));
80 if ((stat_buf.st_uid != user_id) ||
81 (stat_buf.st_gid != group_id) ||
82 ((stat_buf.st_mode & S_IFMT) != S_IFLNK) ||
83 (stat_buf.st_size != strlen(TESTFILE))) {
  /external/libchrome/base/test/
test_file_util_posix.cc 28 struct stat stat_buf; local
29 if (stat(path.value().c_str(), &stat_buf) != 0)
31 stat_buf.st_mode &= ~permission;
33 int rv = HANDLE_EINTR(chmod(path.value().c_str(), stat_buf.st_mode));
44 struct stat stat_buf; local
45 if (stat(path.value().c_str(), &stat_buf) != 0)
50 *mode = stat_buf.st_mode & ~S_IFMT; // Filter out file/path kind.
  /external/ltp/testcases/kernel/syscalls/fchown/
fchown02.c 72 struct stat stat_buf; local
81 SAFE_FSTAT(cleanup, *t->fd, &stat_buf);
83 if ((stat_buf.st_uid != t->user_id) ||
84 (stat_buf.st_gid != t->group_id)) {
88 stat_buf.st_uid, stat_buf.st_gid);
93 if (((stat_buf.st_mode & (S_ISUID | S_ISGID)))) {
102 if ((!(stat_buf.st_mode & S_ISGID))) {
107 stat_buf.st_mode, NEW_PERMS2);
fchown03.c 62 struct stat stat_buf; local
85 SAFE_FSTAT(cleanup, fildes, &stat_buf);
87 if ((stat_buf.st_uid != user_id) ||
88 (stat_buf.st_gid != group_id)) {
95 if (stat_buf.st_mode != FCHOWN_PERMS) {
98 stat_buf.st_mode, FCHOWN_PERMS);
  /cts/tests/tests/security/jni/
android_security_cts_MMapExecutableTest.cpp 48 struct stat stat_buf; local
49 if (fstat(fd, &stat_buf) == -1) {
54 if (stat_buf.st_size < kOffset) {
60 mmap(NULL, stat_buf.st_size - kOffset,
67 if (munmap(mem, stat_buf.st_size - kOffset) == -1) {
  /external/ltp/testcases/kernel/syscalls/chmod/
chmod01.c 94 struct stat stat_buf; local
120 if (stat(TESTFILE, &stat_buf) < 0)
123 stat_buf.st_mode &= ~S_IFREG;
125 if (stat_buf.st_mode == mode)
132 TESTFILE, stat_buf.st_mode,
  /external/ltp/testcases/kernel/syscalls/fchmod/
fchmod07.c 93 struct stat stat_buf; /* stat(2) struct contents */ local
127 if (fstat(fd, &stat_buf) < 0) {
133 stat_buf.st_mode &= ~S_IFREG;
139 if (stat_buf.st_mode == mode) {
147 TESTFILE, stat_buf.st_mode,
  /external/ltp/testcases/kernel/syscalls/chown/
chown03.c 101 struct stat stat_buf; /* stat(2) struct contents */ local
125 if (stat(TESTFILE, &stat_buf) == -1)
129 if (stat_buf.st_uid != user_id ||
130 stat_buf.st_gid != group_id)
133 TESTFILE, stat_buf.st_uid,
134 stat_buf.st_gid, user_id, group_id);
136 if (stat_buf.st_mode !=
140 stat_buf.st_mode,
chown02.c 117 struct stat stat_buf; /* stat(2) struct contents */ local
155 if (stat(file_name, &stat_buf) < 0) {
165 if (stat_buf.st_uid != user_id ||
166 stat_buf.st_gid != group_id) {
179 (stat_buf.st_mode & (S_ISUID | S_ISGID)) != 0) {
186 && (stat_buf.st_mode & S_ISGID) == 0) {
191 stat_buf.st_mode, NEW_PERMS2);
  /external/libxkbcommon/xkbcommon/src/
utils.c 37 struct stat stat_buf; local
43 if (fstat(fd, &stat_buf) != 0)
46 string = mmap(NULL, stat_buf.st_size, PROT_READ, MAP_SHARED, fd, 0);
51 *size_out = stat_buf.st_size;
  /external/ltp/testcases/kernel/syscalls/utime/
utime04.c 99 struct stat stat_buf; /* struct buffer to hold file info. */ local
126 SAFE_STAT(cleanup, TEMP_FILE, &stat_buf);
127 modf_time = stat_buf.st_mtime;
128 access_time = stat_buf.st_atime;
utime05.c 105 struct stat stat_buf; /* struct buffer to hold file info. */ local
132 SAFE_STAT(cleanup, TEMP_FILE, &stat_buf);
133 modf_time = stat_buf.st_mtime;
134 access_time = stat_buf.st_atime;
  /external/ltp/testcases/kernel/syscalls/ftruncate/
ftruncate02.c 97 struct stat stat_buf; /* stat(2) struct contents */ local
129 if (fstat(fd, &stat_buf) < 0) {
134 stat_buf.st_mode &= ~S_IFREG;
135 file_length1 = stat_buf.st_size;
163 if (fstat(fd, &stat_buf) < 0) {
168 stat_buf.st_mode &= ~S_IFREG;
169 file_length2 = stat_buf.st_size;
  /external/valgrind/coregrind/
m_commandline.c 58 struct vg_stat stat_buf; local
69 Int res = VG_(fstat)( sr_Res(fd), &stat_buf );
73 && stat_buf.uid == VG_(geteuid)()
74 && VKI_S_ISREG(stat_buf.mode)
75 && !(stat_buf.mode & VKI_S_IWOTH)) {
76 if ( stat_buf.size > 0 ) {
77 f_clo = VG_(malloc)("commandline.rdv.1", stat_buf.size+1);
78 Int n = VG_(read)(sr_Res(fd), f_clo, stat_buf.size);
80 vg_assert(n >= 0 && n <= stat_buf.size+1);

Completed in 309 milliseconds

1 2 3 4