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

Function format_to_mask

src/stat.c:1346–1362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1344
1345ATTRIBUTE_PURE
1346static unsigned int
1347format_to_mask (char const *format)
1348{
1349 unsigned int mask = 0;
1350
1351 for (char const *b = format; *b; b++)
1352 {
1353 if (*b != '%')
1354 continue;
1355
1356 b += format_code_offset (b);
1357 if (*b == '\0')
1358 break;
1359 mask |= fmt_to_mask (*b);
1360 }
1361 return mask;
1362}
1363
1364/* statx the file and print what we find */
1365NODISCARD

Callers 1

do_statFunction · 0.85

Calls 2

format_code_offsetFunction · 0.85
fmt_to_maskFunction · 0.85

Tested by

no test coverage detected