On Thu, Sep 20, 2007 at 12:57:14PM -0500, Eric Sandeen wrote: > I changed this a bit so that if it's explicitly listed on the > commandline, the link itself gets chattr'd. I'm not quite sure > what is intended here; that the links are not *followed* or > that they are not chattr'd? Seems a little odd to me. Both; you can't chattr a symlink. You can try, but in fact what happens is that you end up chattr'ing the destination of the link, which is probably not what you want. > I tried to follow the way other recursive commands work, for example > chmod -R, and carry on in the face of any errors. If any error > was encountered, exit with an error. If no errors, exit 0. Yep, that makes sense. > Also, if both flags and -v (version) are specified, and the flag > set encounters an error, the version set is not attempted. Is this > ok or should both commands be tried? I think an atomic failure makes the most amount of sense. > Finally, I'm curious, the utility ignores anything that's not a link, > regular file, or dir, but the kernel code doesn't have these checks. > Should it? For better or for worse, the ext2/3/4 flags are set via an ioctl. This means it doesn't work for anything other than a regular file or a directory. For a symlink, it will fail, or follow the symlink. There's a bug in libe2p which I'll fix which causes it to not return EOPNOTSUPP for symlinks because it's using stat() when it should use lstat(). So we should be ignoring symbolic links, as well, since we can't change them. - Ted - To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html