aboutsummaryrefslogtreecommitdiff
path: root/sbin/dump/dump.h
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2011-10-18 18:42:26 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2011-10-18 18:42:26 +0000
commit23ad9069cbe6c94f331410c4638f5d6194b05676 (patch)
tree07bb98aae180c3f4abf32873834f1e96c3e30b6d /sbin/dump/dump.h
parent162c8b19e379fcafa76c84fbb8efa0a50f304b5e (diff)
downloadsrc-23ad9069cbe6c94f331410c4638f5d6194b05676.tar.gz
src-23ad9069cbe6c94f331410c4638f5d6194b05676.zip
The current /etc/dumpdates file restricts device names to 32 characters.
With the addition of various GEOM layers some device names now exceed this length, for example /dev/mirror/encrypted.elig.journal. This change expands the field to 53 bytes which brings the /etc/dumpdates lines to 80 characters. Exceeding 80 characters makes the /etc/dumpdates file much less human readable. A test is added to dump so that it verifies that the device name will fit in the 53 character field failing the dump if it is too long. This change has been checked to verify that its /etc/dumpdates file is compatible with older versions of dump. Reported by: Martin Sugioarto <martin@sugioarto.com> PR: kern/160678 MFC after: 3 weeks
Notes
Notes: svn path=/head/; revision=226520
Diffstat (limited to 'sbin/dump/dump.h')
-rw-r--r--sbin/dump/dump.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/dump/dump.h b/sbin/dump/dump.h
index efef7f7fadef..2a65865aab3d 100644
--- a/sbin/dump/dump.h
+++ b/sbin/dump/dump.h
@@ -171,9 +171,10 @@ void putdumptime(void);
if (ddatev != NULL) \
for (ddp = ddatev[i = 0]; i < nddates; ddp = ddatev[++i])
-#define DUMPOUTFMT "%-32s %d %s" /* for printf */
+#define DUMPFMTLEN 53 /* max device pathname length */
+#define DUMPOUTFMT "%-*s %d %s" /* for printf */
/* name, level, ctime(date) */
-#define DUMPINFMT "%32s %d %[^\n]\n" /* inverse for scanf */
+#define DUMPINFMT "%s %d %[^\n]\n" /* inverse for scanf */
void sig(int signo);