Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1271596
| From | Joshua Clayton <stillcompiling@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/8] Documentation/spi/spidev_test.c: accept input from a file |
| Date | 2015-11-17 20:30 +0100 |
| Message-ID | <qvU70-N7-33@gated-at.bofh.it> (permalink) |
| References | <qvQmJ-6NX-7@gated-at.bofh.it> <qvQmK-6NX-15@gated-at.bofh.it> <qvTaW-bm-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tuesday, November 17, 2015 07:26:54 PM Anton Bondarenko wrote:
> On 17.11.2015 16:24, Joshua Clayton wrote:
> > + if (sb.st_size > 4096)
> > + pabort("input file exceeds spidev's 4k limit");
> This is not a true. IIRC PAGE_SIZE is the default buffer size for
> spidev, but can be changed using bufsiz module parameter.
> Just 'insmod spidev bufsiz=X', where X is number of bytes.
You are right. I will drop this. As Mark suggests.
The ioctl gives a nice error code if the buffer is too big.
...
> > + tx = malloc(sb.st_size);
> It would be good to check new allocations for fail.
I will add a check for this.
--
~Joshua Clayton
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/8] spi: Add file i/o to spidev_test Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 16:30 +0100
[PATCH 8/8] spi: Move spi code from Documentation to tools Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 16:30 +0100
Re: [PATCH 8/8] spi: Move spi code from Documentation to tools Mark Brown <broonie@kernel.org> - 2015-11-17 19:20 +0100
[PATCH 5/8] Documentation/spi/spidev_test.c: check error Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 16:30 +0100
[PATCH 3/8] Documentation/spi/spidev_test.c: accept input from a file Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 16:30 +0100
Re: [PATCH 3/8] Documentation/spi/spidev_test.c: accept input from a file Anton Bondarenko <anton.bondarenko.sama@gmail.com> - 2015-11-17 19:30 +0100
Re: [PATCH 3/8] Documentation/spi/spidev_test.c: accept input from a file Mark Brown <broonie@kernel.org> - 2015-11-17 19:50 +0100
Re: [PATCH 3/8] Documentation/spi/spidev_test.c: accept input from a file Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 20:30 +0100
[PATCH 7/8] tools/Makefile: minor whitespace cleanup Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 16:30 +0100
Re: [PATCH 7/8] tools/Makefile: minor whitespace cleanup Mark Brown <broonie@kernel.org> - 2015-11-17 19:10 +0100
Re: [PATCH 7/8] tools/Makefile: minor whitespace cleanup Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 20:50 +0100
[PATCH 6/8] Documentation/spi/spidev_test.c: fix whitespace Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 16:30 +0100
[PATCH 2/8] Documentation/spi/spidev_test.c: clean up input_tx Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 16:30 +0100
Re: [PATCH 2/8] Documentation/spi/spidev_test.c: clean up input_tx Mark Brown <broonie@kernel.org> - 2015-11-17 18:50 +0100
Re: [PATCH 2/8] Documentation/spi/spidev_test.c: clean up input_tx Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 20:30 +0100
Re: [PATCH 2/8] Documentation/spi/spidev_test.c: clean up input_tx Mark Brown <broonie@kernel.org> - 2015-11-18 00:00 +0100
Re: [PATCH 0/8] spi: Add file i/o to spidev_test Mark Brown <broonie@kernel.org> - 2015-11-17 16:40 +0100
Re: [PATCH 0/8] spi: Add file i/o to spidev_test Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 17:20 +0100
Re: [PATCH 0/8] spi: Add file i/o to spidev_test Mark Brown <broonie@kernel.org> - 2015-11-17 18:00 +0100
[PATCH v2 0/6] spi: Add file i/o to spidev_test Joshua Clayton <stillcompiling@gmail.com> - 2015-11-18 23:40 +0100
[PATCH v2 1/6] spi: Move spi code from Documentation to tools Joshua Clayton <stillcompiling@gmail.com> - 2015-11-18 23:40 +0100
[PATCH v2 6/6] spi: spidev_test: fix whitespace Joshua Clayton <stillcompiling@gmail.com> - 2015-11-18 23:40 +0100
[PATCH v2 5/6] spi: spidev_test: check error Joshua Clayton <stillcompiling@gmail.com> - 2015-11-18 23:40 +0100
[PATCH v2 2/6] spi: spidev_test: transfer_escaped_string function Joshua Clayton <stillcompiling@gmail.com> - 2015-11-18 23:40 +0100
[PATCH v2 4/6] spi: spidev_test: output to a file Joshua Clayton <stillcompiling@gmail.com> - 2015-11-18 23:40 +0100
csiph-web