Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1452601 > unrolled thread
| Started by | Allen Hubbe <allenbh@gmail.com> |
|---|---|
| First post | 2016-07-30 00:30 +0200 |
| Last post | 2016-07-30 01:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] checkpatch: if no filenames then read stdin Allen Hubbe <allenbh@gmail.com> - 2016-07-30 00:30 +0200
Re: [PATCH] checkpatch: if no filenames then read stdin Joe Perches <joe@perches.com> - 2016-07-30 01:40 +0200
| From | Allen Hubbe <allenbh@gmail.com> |
|---|---|
| Date | 2016-07-30 00:30 +0200 |
| Subject | [PATCH] checkpatch: if no filenames then read stdin |
| Message-ID | <s0os2-2mC-11@gated-at.bofh.it> |
If no filenames are given, then read the patch from stdin.
Signed-off-by: Allen Hubbe <allenbh@gmail.com>
---
scripts/checkpatch.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 90e1edc8dd42..b0659f1e9b09 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -178,9 +178,9 @@ if ($^V && $^V lt $minimum_perl_version) {
}
}
+#if no filenames are given, push '-' to read patch from stdin
if ($#ARGV < 0) {
- print "$P: no input files\n";
- exit(1);
+ push(@ARGV, '-');
}
sub hash_save_array_words {
--
2.9.1
[toc] | [next] | [standalone]
| From | Joe Perches <joe@perches.com> |
|---|---|
| Date | 2016-07-30 01:40 +0200 |
| Message-ID | <s0pxM-31M-7@gated-at.bofh.it> |
| In reply to | #1452601 |
On Fri, 2016-07-29 at 18:27 -0400, Allen Hubbe wrote:
> If no filenames are given, then read the patch from stdin.
Yes, that should work. Thanks Allen.
Acked-by: Joe Perches <joe@perches.com>
Got anymore?
> Signed-off-by: Allen Hubbe <allenbh@gmail.com>
> ---
> scripts/checkpatch.pl | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 90e1edc8dd42..b0659f1e9b09 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -178,9 +178,9 @@ if ($^V && $^V lt $minimum_perl_version) {
> }
> }
>
> +#if no filenames are given, push '-' to read patch from stdin
> if ($#ARGV < 0) {
> - print "$P: no input files\n";
> - exit(1);
> + push(@ARGV, '-');
> }
>
> sub hash_save_array_words {
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web