kxylxp / grub4dos-chenall

Automatically exported from code.google.com/p/grub4dos-chenall
0 stars 0 forks source link

Enhancement: add dd if=\dev\zero equivalent #129

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Fill whole file with 0 (or preferably specified byte value or two-byte value)

What is the expected output? What do you see instead?
if=\dev\zero not supported

What version of the product are you using? On what operating system?

Please provide any additional information below.
Currently I have to copy a file full of spaces to the output file.
This means I have to ensure that the input file is same length or longer than 
the output file. It also takes longer to open both files.

dd if=(0)/ of=()/fred.iso
or
dd if=(0)/0x0d0a of=()/fred.iso
dd if=(0)/0x00 of=()/fred.iso
dd if=(0)/0x20 of=()/fred.iso

would be very useful?
Don't mind what syntax...
Thanks
Steve

Original issue reported on code.google.com by Steve6375 on 1 May 2013 at 2:42

GoogleCodeExporter commented 8 years ago
Hi Chenall
Do you think this would be possible? Just a fill of 00h would be fine and very 
useful.
Thanks
Steve

Original comment by Steve6375 on 21 May 2013 at 8:18

GoogleCodeExporter commented 8 years ago
I can't ,maybe tinybit or others can.

Original comment by chenall.cn on 23 May 2013 at 3:11

GoogleCodeExporter commented 8 years ago
Alternate way using memory
# fill (rd) with 0's , 0x82d0 is rd-base mem address, Fn24 is memset - fill 
memory  <addr> <string> <size>
map (md)0x300+200 (rd) > nul ;; read 0x82d0  > nul ;; call Fn.24  %@retval% 
0x00  102400  > nul  
dd if=(rd)+1 of=()/ABC.xml

Original comment by Steve6375 on 16 Oct 2013 at 2:49

GoogleCodeExporter commented 8 years ago
Thanks.
using memset fill a block memory will zero. That is a good idea.

Original comment by chenall.cn on 17 Oct 2013 at 7:19