MCPcopy Create free account
hub / github.com/coreutils/coreutils / calc_req_mask

Function calc_req_mask

src/ls.c:1162–1200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1160
1161ATTRIBUTE_PURE
1162static unsigned int
1163calc_req_mask (void)
1164{
1165 unsigned int mask = STATX_MODE;
1166
1167 if (print_inode)
1168 mask |= STATX_INO;
1169
1170 if (print_block_size)
1171 mask |= STATX_BLOCKS;
1172
1173 if (format == long_format) {
1174 mask |= STATX_NLINK | STATX_SIZE | time_type_to_statx ();
1175 if (print_owner || print_author)
1176 mask |= STATX_UID;
1177 if (print_group)
1178 mask |= STATX_GID;
1179 }
1180
1181 switch (sort_type)
1182 {
1183 case sort_none:
1184 case sort_name:
1185 case sort_version:
1186 case sort_extension:
1187 case sort_width:
1188 break;
1189 case sort_time:
1190 mask |= time_type_to_statx ();
1191 break;
1192 case sort_size:
1193 mask |= STATX_SIZE;
1194 break;
1195 case sort_numtypes: default:
1196 unreachable ();
1197 }
1198
1199 return mask;
1200}
1201
1202static int
1203do_statx (int fd, char const *name, struct stat *st, int flags,

Callers 2

do_statFunction · 0.85
do_lstatFunction · 0.85

Calls 1

time_type_to_statxFunction · 0.85

Tested by

no test coverage detected