diag/geodsp: zero-fill sectors in -1 mode
authorH. Peter Anvin <hpa@zytor.com>
Mon, 25 Apr 2011 21:32:08 +0000 (14:32 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Mon, 25 Apr 2011 21:32:08 +0000 (14:32 -0700)
In -1 mode, zero-fill the sector instead of writing whatever garbage
was in the buffer already.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
diag/geodsp/mk-lba-img.c

index ed5a7ed..eb1c339 100644 (file)
@@ -74,6 +74,8 @@ int main(int argc, char *argv[])
                lba++;
        }
 
+       memset(b, 0, sizeof b);
+
        while (lba < NUM_SECT) {
                if (one) {
                        b[0] = lba;