From: Richard W.M. Jones <"Richard W.M. Jones "> Date: Sat, 9 Feb 2008 13:32:19 +0000 (+0000) Subject: Non-canonical fstab lines need newline character after them. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=7195b2538fa56122c6afd98e0586ee5288ddc3e8;p=virt-p2v.git Non-canonical fstab lines need newline character after them. - /etc/fstab lines which don't match canonical form (eg. comments) were being written without a trailing \n, resulting in the following line being corrupted. (Reported by Terry Johnson.) --- diff --git a/virt-p2v b/virt-p2v index ad9e159..755e4a8 100755 --- a/virt-p2v +++ b/virt-p2v @@ -537,7 +537,8 @@ let rewrite_fstab state devices_to_send = fprintf chan "%-23s %-23s %-7s %-15s %s %s\n" dev mountpoint fstype options freq passno | line -> - output_string chan (String.concat " " line) + output_string chan (String.concat " " line); + output_char chan '\n' ) lines; close_out chan )