From 00e6c3a4d580fcee169eaa6b1d44c75073de8d2f Mon Sep 17 00:00:00 2001 From: fcambus Date: Sat, 22 Sep 2018 09:12:36 +0000 Subject: [PATCH] Harmonize spacing after ellipses in displayed messages. We were using spacing after ellipses in an inconsistent way in the installer. Standardize on using "... " everywhere and take into account the cursor position while we are waiting for the task to complete: the cursor is now always positioned after the last dot, and the space is added when displaying completion confirmation. While there, also take cursor position into account in vfs_shutdown(), and remove the extra leading space before ticks in dhclient. OK deraadt@ --- distrib/miniroot/install.sub | 20 ++++++++++---------- sbin/dhclient/dhclient.c | 4 ++-- sys/kern/vfs_subr.c | 8 ++++---- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 869c42c1a4c..bce1fa50358 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1103 2018/09/18 17:43:40 naddy Exp $ +# $OpenBSD: install.sub,v 1.1104 2018/09/22 09:12:36 fcambus Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer @@ -2522,10 +2522,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 /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. @@ -2797,8 +2797,8 @@ set -A _KERNV -- \$(sysctl -n kern.version | 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:" @@ -3076,7 +3076,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 @@ -3130,11 +3130,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 diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index b7762c763e9..763f5b86d8e 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.576 2018/08/13 14:10:26 patrick Exp $ */ +/* $OpenBSD: dhclient.c,v 1.577 2018/09/22 09:12:36 fcambus Exp $ */ /* * Copyright 2004 Henning Brauer @@ -2771,7 +2771,7 @@ tick_msg(const char *preamble, int success, time_t start, time_t stop) 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; } diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 1e1ed6e6ace..930d31bfe3c 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.279 2018/09/17 14:56:37 visa Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.280 2018/09/22 09:12:36 fcambus Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -1682,7 +1682,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. */ @@ -1695,9 +1695,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"); } /* -- 2.20.1