summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHajo Möller <[email protected]>2015-05-15 23:14:56 +0200
committerBrian Behlendorf <[email protected]>2015-05-18 17:14:07 -0700
commit141b6381d38a16a6178edcec8ace28d1f23b884e (patch)
tree4b6d8ee88f9f1f31b149cbaec38d5f5bd618f26e /lib
parent01fcbec52d2e808e7122d70218ecf1fbc94ed9b3 (diff)
Change 3-digit octal escapes to 4-digit ones
Prefixing an octal value with a leading zero is the standard way to disambiguate it. This change only impacts the `zfs diff` output and is therefore very limited in scope. Signed-off-by: Hajo M<C3><B6>ller <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #3417
Diffstat (limited to 'lib')
-rw-r--r--lib/libzfs/libzfs_diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libzfs/libzfs_diff.c b/lib/libzfs/libzfs_diff.c
index ea37285fe..b5fa5853f 100644
--- a/lib/libzfs/libzfs_diff.c
+++ b/lib/libzfs/libzfs_diff.c
@@ -129,7 +129,7 @@ get_stats_for_obj(differ_info_t *di, const char *dsname, uint64_t obj,
*
* Prints a file name out a character at a time. If the character is
* not in the range of what we consider "printable" ASCII, display it
- * as an escaped 3-digit octal value. ASCII values less than a space
+ * as an escaped 4-digit octal value. ASCII values less than a space
* are all control characters and we declare the upper end as the
* DELete character. This also is the last 7-bit ASCII character.
* We choose to treat all 8-bit ASCII as not printable for this
@@ -142,7 +142,7 @@ stream_bytes(FILE *fp, const char *string)
if (*string > ' ' && *string != '\\' && *string < '\177')
(void) fprintf(fp, "%c", *string++);
else
- (void) fprintf(fp, "\\%03o", (unsigned char)*string++);
+ (void) fprintf(fp, "\\%04o", (unsigned char)*string++);
}
}