copy_flash: update window size

When a pnor partition is copied to a window, update the window size with
the actual number of blocks copied. This is required in the response of
the V2 Read Window Command.

Change-Id: I2c158df1bd261a4e62b9cbb2765e7623a7fb3dc9
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/mboxd_windows.c b/mboxd_windows.c
index 451ecd1..1755c4a 100644
--- a/mboxd_windows.c
+++ b/mboxd_windows.c
@@ -417,7 +417,6 @@
 		context->current->age = 0;
 	}
 
-	context->current->size = context->windows.default_size;
 	context->current = NULL;
 	context->current_is_write = false;
 }
@@ -627,6 +626,7 @@
 		reset_window(context, cur);
 		return rc;
 	}
+	cur->size = rc;
 
 	/*
 	 * Since for V1 windows aren't constrained to start at multiples of