From 2e33b27e7d4683062f21a3082ec634a440ff9387 Mon Sep 17 00:00:00 2001
From: Thomas Wolff <[email protected]>
Date: Mon, 2 Mar 2020 22:36:56 +0100
Subject: [PATCH] avoid ragged output of /proc/partitions
---
winsup/cygwin/fhandler_proc.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc
index 605a8443f..3373f3ef5 100644
--- a/winsup/cygwin/fhandler_proc.cc
+++ b/winsup/cygwin/fhandler_proc.cc
@@ -1491,7 +1491,7 @@ format_proc_partitions (void *, char *&destbuf)
}
if (!got_one)
{
- print ("major minor #blocks name win-mounts\n\n");
+ print ("major minor #blocks name win-mounts\n\n");
got_one = true;
}
/* Fetch partition info for the entire disk to get its size. */
@@ -1514,7 +1514,7 @@ format_proc_partitions (void *, char *&destbuf)
size = 0;
}
device dev (drive_num, 0);
- bufptr += __small_sprintf (bufptr, "%5d %5d %9U %s\n",
+ bufptr += __small_sprintf (bufptr, "%5d %5d %11U %s\n",
dev.get_major (), dev.get_minor (),
size >> 10, dev.name () + 5);
/* Fetch drive layout info to get size of all partitions on the disk. */
@@ -1561,7 +1561,7 @@ format_proc_partitions (void *, char *&destbuf)
continue;
device dev (drive_num, part_num);
- bufptr += __small_sprintf (bufptr, "%5d %5d %9U %s",
+ bufptr += __small_sprintf (bufptr, "%5d %5d %11U %s",
dev.get_major (), dev.get_minor (),
size >> 10, dev.name () + 5);
/* Check if the partition is mounted in Windows and, if so,
--
2.21.0