On Tue, Aug 14, 2018 at 11:31:30AM +0200, Frederic Cambus wrote:
> We are using spacing after ellipses in displayed messages in an
> inconsistant way.
Here is an improved diff which takes into account the cursor position
while we are waiting for the task to complete, as pointed out by
deraadt@.
In this version the cursor is always positioned after the last dot, and
the space is added when displaying completion confirmation.
This also fixes the extra leading space in dhclient messages.
Comments? OK?
Index: distrib/miniroot/install.sub
===================================================================
RCS file: /cvs/src/distrib/miniroot/install.sub,v
retrieving revision 1.1100
diff -u -p -r1.1100 install.sub
--- distrib/miniroot/install.sub 19 Aug 2018 20:35:51 -0000 1.1100
+++ distrib/miniroot/install.sub 21 Aug 2018 14:27:17 -0000
@@ -2517,10 +2517,10 @@ check_fs() {
((_passno > 0)) || continue
echo -n "fsck -${_f}p $_dev..."
if ! fsck -${_f}p $_dev >/dev/null 2>&1; then
- echo "FAILED. You must fsck $_dev manually."
+ echo " FAILED. You must fsck $_dev manually."
_fail=y
else
- echo "OK."
+ echo " OK."
fi
done </etc/fstab
@@ -2724,7 +2724,7 @@ finish_up() {
sh MAKEDEV $_dev
done
)
- echo "done."
+ echo " done."
# We may run some programs in chroot, and some of them might be
# dynamic. That is highly discouraged, but let us play it safe.
@@ -2769,7 +2769,7 @@ finish_up() {
rm -f $_kernel_dir.tgz
chroot /mnt /bin/ksh -e -c "cd ${_kernel_dir#/mnt}/$_kernel; \
make newbsd; make newinstall"
- ) >/dev/null 2>&1 && echo "done." || echo "failed."
+ ) >/dev/null 2>&1 && echo " done." || echo " failed."
fi
# Ensure that sysmerge in batch mode is run on reboot.
@@ -2791,8 +2791,8 @@ set -A _KERNV -- \$(sysctl -n kern.versi
sed 's/^OpenBSD \([0-9]\.[0-9]\)\([^ ]*\).*/\1 \2/;q')
if ((\${#_KERNV[*]} == 1)) && [[ -s /etc/installurl ]] &&
_CKPATCH=\$(mktemp /tmp/_ckpatch.XXXXXXXXXX); then
- echo -n "Checking for available binary patches... "
- syspatch -c > \$_CKPATCH && echo -n "done."
+ echo -n "Checking for available binary patches..."
+ syspatch -c > \$_CKPATCH && echo -n " done."
echo
if [[ -s \$_CKPATCH ]]; then
echo "Run syspatch(8) to install:"
@@ -3070,7 +3070,7 @@ do_install() {
[[ -f $_f && -s $_f ]] && mv $_f /mnt/etc/.
done)
- echo "done."
+ echo " done."
# Apply configuration settings based on information from questions().
apply
@@ -3124,11 +3124,11 @@ do_upgrade() {
echo -n "Checking root filesystem (fsck -fp /dev/$ROOTDEV)..."
fsck -fp /dev/$ROOTDEV >/dev/null 2>&1 || { echo "FAILED."; exit; }
- echo "OK."
+ echo " OK."
echo -n "Mounting root filesystem (mount -o ro /dev/$ROOTDEV /mnt)..."
mount -o ro /dev/$ROOTDEV /mnt || { echo "FAILED."; exit; }
- echo "OK."
+ echo " OK."
# The fstab and myname files are required.
for _f in /mnt/etc/{fstab,myname}; do
Index: sys/kern/vfs_subr.c
===================================================================
RCS file: /cvs/src/sys/kern/vfs_subr.c,v
retrieving revision 1.277
diff -u -p -r1.277 vfs_subr.c
--- sys/kern/vfs_subr.c 13 Jul 2018 09:25:23 -0000 1.277
+++ sys/kern/vfs_subr.c 21 Aug 2018 14:27:20 -0000
@@ -1691,7 +1691,7 @@ vfs_shutdown(struct proc *p)
acct_shutdown();
#endif
- printf("syncing disks... ");
+ printf("syncing disks...");
if (panicstr == 0) {
/* Sync before unmount, in case we hang on something. */
@@ -1704,9 +1704,9 @@ vfs_shutdown(struct proc *p)
#endif
if (vfs_syncwait(p, 1))
- printf("giving up\n");
+ printf(" giving up\n");
else
- printf("done\n");
+ printf(" done\n");
}
/*
Index: sbin/dhclient/dhclient.c
===================================================================
RCS file: /cvs/src/sbin/dhclient/dhclient.c,v
retrieving revision 1.576
diff -u -p -r1.576 dhclient.c
--- sbin/dhclient/dhclient.c 13 Aug 2018 14:10:26 -0000 1.576
+++ sbin/dhclient/dhclient.c 21 Aug 2018 14:27:21 -0000
@@ -2771,7 +2771,7 @@ tick_msg(const char *preamble, int succe
return;
if (preamble_sent == 0) {
- fprintf(stderr, "%s: no %s ...", log_procname, preamble);
+ fprintf(stderr, "%s: no %s...", log_procname, preamble);
fflush(stderr);
preamble_sent = 1;
}