[syslinux] tftp-hpa enhancement

Mickey Malone mickey.malone at me.com
Sun Jan 29 15:49:26 PST 2012


Attached is the patch file that moves most of the info/error messages to stderr. If - is ever given 
at the end of a get command, we will assume stdout instead of a file.

This only works if - is used with -c. 

If it is ever used without -c, then - is the file name keeping the same functionality that exists today.

This is how it would be used:
tftp -m binary 69 -c get initramfs - | gzip -dc | cpio -id

It can be tested by getting the same file using both methods and running a checksum against them:
tftp -m binary 69 -c get testfile file1
tftp -m binary 69 -c get testfile - > file2

md5sum file1 && md5sum file2

Pass: if they match.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tftp-hpa-stdout2.patch
Type: application/octet-stream
Size: 17533 bytes
Desc: not available
URL: <http://www.zytor.com/pipermail/syslinux/attachments/20120129/214ada3c/attachment.obj>
-------------- next part --------------

On Jan 29, 2012, at 3:56 PM, H. Peter Anvin wrote:

> On 01/29/2012 12:53 PM, Mickey Malone wrote:
>> The existing code does not support it from my initial tests. It just saves the output off to a file called "-".
>> I will look into this. Keeping that convention is cleaner.
>> How do you feel about moving all error/info output to stderr? 
>> This will leave stdout clean, which is needed if the data is being streamed to stdout or else it will get dirty.
> Yes, please make sure stdout is clean, at least when run with -c.
> 	-hpa
> -- 
> H. Peter Anvin, Intel Open Source Technology Center
> I work for Intel.  I don't speak on their behalf.

More information about the Syslinux mailing list