Re: [OpenWrt-Devel] [PATCH] maccalc: add option to read mac from temp file

2011-09-18 Thread Alexander Gordeev
В Fri, 16 Sep 2011 18:06:15 +0300 Roman Yeryomin leroi.li...@gmail.com пишет: On 16 September 2011 17:51, Alexander Gordeev lasa...@lvk.cs.msu.su wrote: В Fri, 16 Sep 2011 17:41:37 +0300 Roman Yeryomin leroi.li...@gmail.com пишет: On 16 September 2011 01:40, Alexander Gordeev

Re: [OpenWrt-Devel] [PATCH] maccalc: add option to read mac from temp file

2011-09-18 Thread Roman Yeryomin
On 18 September 2011 20:51, Alexander Gordeev lasa...@lvk.cs.msu.su wrote: В Fri, 16 Sep 2011 18:06:15 +0300 Roman Yeryomin leroi.li...@gmail.com пишет: On 16 September 2011 17:51, Alexander Gordeev lasa...@lvk.cs.msu.su wrote: В Fri, 16 Sep 2011 17:41:37 +0300 Roman Yeryomin

Re: [OpenWrt-Devel] [PATCH] maccalc: add option to read mac from temp file

2011-09-18 Thread Alexander Gordeev
В Sun, 18 Sep 2011 21:30:09 +0300 Roman Yeryomin leroi.li...@gmail.com пишет: On 18 September 2011 20:51, Alexander Gordeev lasa...@lvk.cs.msu.su wrote: В Fri, 16 Sep 2011 18:06:15 +0300 Roman Yeryomin leroi.li...@gmail.com пишет: On 16 September 2011 17:51, Alexander Gordeev

Re: [OpenWrt-Devel] [PATCH] maccalc: add option to read mac from temp file

2011-09-18 Thread Gert Doering
Hi, On Sun, Sep 18, 2011 at 09:30:09PM +0300, Roman Yeryomin wrote: I think how it can be that you can't read 6 bytes from stdin in one attempt but can do it from file? pipe semantics are different from file semantics. A pipe read will return as soon as everything that has been written so far

Re: [OpenWrt-Devel] [PATCH] maccalc: add option to read mac from temp file

2011-09-18 Thread Gert Doering
Hi, On Sun, Sep 18, 2011 at 10:58:23PM +0400, Alexander Gordeev wrote: BTW you shouldn't even expect to read() 6 bytes from file at once. For normal files, read() will never read less than requested, unless you hit an error or eof. $ strace -f -e trace=read,write sh -c 'dd if=/dev/urandom

Re: [OpenWrt-Devel] [PATCH] maccalc: add option to read mac from temp file

2011-09-16 Thread Roman Yeryomin
On 16 September 2011 01:40, Alexander Gordeev lasa...@lvk.cs.msu.su wrote: В Fri, 26 Aug 2011 04:30:43 +0300 Roman Yeryomin leroi.li...@gmail.com пишет: This method is much more stable than reading dd's output via stdin. What kind of problems do you have with piping dd's output to stdin?

Re: [OpenWrt-Devel] [PATCH] maccalc: add option to read mac from temp file

2011-09-16 Thread Alexander Gordeev
В Fri, 16 Sep 2011 17:41:37 +0300 Roman Yeryomin leroi.li...@gmail.com пишет: On 16 September 2011 01:40, Alexander Gordeev lasa...@lvk.cs.msu.su wrote: В Fri, 26 Aug 2011 04:30:43 +0300 Roman Yeryomin leroi.li...@gmail.com пишет: This method is much more stable than reading dd's output

Re: [OpenWrt-Devel] [PATCH] maccalc: add option to read mac from temp file

2011-09-16 Thread Florian Fainelli
On Friday 16 September 2011 16:51:16 Alexander Gordeev wrote: В Fri, 16 Sep 2011 17:41:37 +0300 Roman Yeryomin leroi.li...@gmail.com пишет: On 16 September 2011 01:40, Alexander Gordeev lasa...@lvk.cs.msu.su wrote: В Fri, 26 Aug 2011 04:30:43 +0300 Roman Yeryomin

Re: [OpenWrt-Devel] [PATCH] maccalc: add option to read mac from temp file

2011-09-16 Thread Roman Yeryomin
On 16 September 2011 17:51, Alexander Gordeev lasa...@lvk.cs.msu.su wrote: В Fri, 16 Sep 2011 17:41:37 +0300 Roman Yeryomin leroi.li...@gmail.com пишет: On 16 September 2011 01:40, Alexander Gordeev lasa...@lvk.cs.msu.su wrote: В Fri, 26 Aug 2011 04:30:43 +0300 Roman Yeryomin

Re: [OpenWrt-Devel] [PATCH] maccalc: add option to read mac from temp file

2011-09-15 Thread Alexander Gordeev
В Fri, 26 Aug 2011 04:30:43 +0300 Roman Yeryomin leroi.li...@gmail.com пишет: This method is much more stable than reading dd's output via stdin. What kind of problems do you have with piping dd's output to stdin? -- Alexander signature.asc Description: PGP signature

Re: [OpenWrt-Devel] [PATCH] maccalc: add option to read mac from temp file

2011-09-12 Thread Roman Yeryomin
On 26 August 2011 04:30, Roman Yeryomin leroi.li...@gmail.com wrote: This method is much more stable than reading dd's output via stdin. Signed-off-by: Roman Yeryomin ro...@advem.lv Index: package/maccalc/src/main.c === ---

[OpenWrt-Devel] [PATCH] maccalc: add option to read mac from temp file

2011-08-25 Thread Roman Yeryomin
This method is much more stable than reading dd's output via stdin. Signed-off-by: Roman Yeryomin ro...@advem.lv Index: package/maccalc/src/main.c === --- a/package/maccalc/src/main.c(revision 28007) +++