public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: utils: chattr: do not default to CWD Date: Thu, 20 May 2021 20:40:05 +0000 (GMT) [thread overview] Message-ID: <20210520204005.7A1403987C36@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=3053632389c506143080b6ed5d559aaa1d6de114 commit 3053632389c506143080b6ed5d559aaa1d6de114 Author: Corinna Vinschen <corinna@vinschen.de> Date: Thu May 20 22:39:22 2021 +0200 Cygwin: utils: chattr: do not default to CWD Drop the unexpected behaviour to run chattr in the CWD if no file has been specified on the command line. Bail out with usage info instead. Signed-off-by: Corinna Vinschen <corinna@vinschen.de> Diff: --- winsup/utils/chattr.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/winsup/utils/chattr.c b/winsup/utils/chattr.c index eb60e5d3e..6942e11b0 100644 --- a/winsup/utils/chattr.c +++ b/winsup/utils/chattr.c @@ -320,12 +320,9 @@ next: if (sanity_check ()) return 1; if (optind > argc - 1) - { - chattr ("."); - if (Ropt) - chattr_dir ("."); - } - else for (; optind < argc; ++optind) + usage (stderr); + + for (; optind < argc; ++optind) { struct stat st;
reply other threads:[~2021-05-20 20:40 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210520204005.7A1403987C36@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).