diff options
author | Jim Meyering <meyering@redhat.com> | 2009-11-05 08:32:09 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-11-05 08:32:31 +0100 |
commit | 38cb824673a53062ab0d2ee843cdf58affc17e04 (patch) | |
tree | 31c7237ea915b746632ac347ced05714867817e9 /src/system.h | |
parent | d4b96c26ce0e79cb64fc99dda56d795765d5656d (diff) | |
download | coreutils-38cb824673a53062ab0d2ee843cdf58affc17e04.tar.xz |
maint: factor out cycle warning, now that du will use it, too
* src/system.h (emit_cycle_warning): Define. Factored out of...
* src/remove.c (rm_fts): ...here. Use the new macro.
Diffstat (limited to 'src/system.h')
-rw-r--r-- | src/system.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/system.h b/src/system.h index b4d5e774f..be7811b48 100644 --- a/src/system.h +++ b/src/system.h @@ -672,6 +672,18 @@ io_blksize (struct stat sb) void usage (int status) ATTRIBUTE_NORETURN; +#define emit_cycle_warning(file_name) \ + do \ + { \ + error (0, 0, _("\ +WARNING: Circular directory structure.\n\ +This almost certainly means that you have a corrupted file system.\n\ +NOTIFY YOUR SYSTEM MANAGER.\n\ +The following directory is part of the cycle:\n %s\n"), \ + quote (file_name)); \ + } \ + while (0) + #ifndef ARRAY_CARDINALITY # define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array)) #endif |