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

Function should_dereference

src/copy.c:1575–1582  ·  view source on GitHub ↗

Return true if the current file should be (tried to be) dereferenced: either for DEREF_ALWAYS or for DEREF_COMMAND_LINE_ARGUMENTS in the case where the current file is a COMMAND_LINE_ARG; otherwise return false. */

Source from the content-addressed store, hash-verified

1573 either for DEREF_ALWAYS or for DEREF_COMMAND_LINE_ARGUMENTS in the case
1574 where the current file is a COMMAND_LINE_ARG; otherwise return false. */
1575ATTRIBUTE_PURE
1576static inline bool
1577should_dereference (const struct cp_options *x, bool command_line_arg)
1578{
1579 return x->dereference == DEREF_ALWAYS
1580 || (x->dereference == DEREF_COMMAND_LINE_ARGUMENTS
1581 && command_line_arg);
1582}
1583
1584/* Return true if the source file with basename SRCBASE and status SRC_ST
1585 is likely to be the simple backup file for DST_DIRFD+DST_RELNAME. */

Callers 1

copy_internalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected