On 12/18/2013 07:41 PM, Pádraig Brady wrote: > I need to look into this some more, > but we should at least reword the warning to something more generic
BTW: the diagnostic in du(1) has been improved in 8.20 by commit http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=cf7e1b5b but chcon, chmod, chown, chgrp, rm, and mv are affected, too: $ git grep emit_cycle_warning | cat src/chcon.c: emit_cycle_warning (file_full_name); src/chmod.c: emit_cycle_warning (file_full_name); src/chown-core.c: emit_cycle_warning (file_full_name); src/du.c: emit_cycle_warning (file); src/remove.c: emit_cycle_warning (ent->fts_path); src/system.h:#define emit_cycle_warning(file_name) \ e.g. $ mount -t tmpfs tmpfs /mnt $ mkdir /mnt/mnt $ mount --bind /mnt /mnt/mnt $ du /mnt du: mount point ‘/mnt/mnt’ already traversed 0 /mnt $ chown -R root /mnt chown: WARNING: Circular directory structure. This almost certainly means that you have a corrupted file system. NOTIFY YOUR SYSTEM MANAGER. The following directory is part of the cycle: ‘/mnt/mnt’ Just for the record, non-FTS ls(1) uses a different diagnostic: $ ls -R /mnt /mnt: mnt ls: /mnt/mnt: not listing already-listed directory It seems that there is still room for improvement. Have a nice day, Berny
