log-handler: Set the end of the file as the file size

The file descriptor is lost after system AC cycle.
The log file will grow indefinitely if the log recorded does not exceed
the maximum log size after each AC cycle.

Change-Id: If23d68b08817d54731dd6eff8a42e9eb476b6437
Fixes: 46d9ef298f2e ("Do not truncate log files after reboot")
Signed-off-by: Marshall Zhan <marshall.zhan.wiwynn@gmail.com>
diff --git a/log-handler.c b/log-handler.c
index 571fba6..1ea1cdf 100644
--- a/log-handler.c
+++ b/log-handler.c
@@ -136,7 +136,7 @@
 		warn("Can't open log buffer file %s", lh->log_filename);
 		return -1;
 	}
-	pos = lseek(lh->fd, 0, SEEK_CUR);
+	pos = lseek(lh->fd, 0, SEEK_END);
 	if (pos < 0) {
 		warn("Can't query log position for file %s", lh->log_filename);
 		close(lh->fd);