Project

General

Profile

Feature #6479

ZFS Diff Prints Carriage Returns

Added by Michael Talbott almost 5 years ago. Updated over 4 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2015-11-26
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

I've ran into a situation where some end users have put carriage returns in their filenames! I know, absolutely horrid practice, but, users are users. Unfortunately this makes the output of zfs diff commands not very parse friendly since zfs diff is outputting carriage returns as part of the output in stream_bytes() in libzfs_diff.c

I'd be forever grateful if someone could do a quick patch to output carriage returns found in file names as an octal code instead of actually outputting a carriage return.

Thanks


Related issues

Related to illumos gate - Bug #4448: zfs diff misprints unicode charactersClosedJoshua M. Clulow2014-01-09

Actions
#1

Updated by Yuri Pankov over 4 years ago

Do you mean ^M here (ie, a name like "a\rb")?

#2

Updated by Yuri Pankov over 4 years ago

Wonder if Joshua already fixed this in #4448:

altair:root:~# touch /diff/$(echo "a\rb")
altair:root:~# ll /diff/
total 1
b        8 -rw-r--r--   1 root           0 Feb 25 11:13 a
altair:root:~# zfs snapshot data/diff@now
altair:root:~# echo "123" > /diff/a^Mb
altair:root:~# zfs diff data/diff@now
M       /diff/a\015b
altair:root:~#

#3

Updated by Yuri Pankov over 4 years ago

  • Related to Bug #4448: zfs diff misprints unicode characters added
#4

Updated by Yuri Pankov over 4 years ago

  • Status changed from New to Feedback

Also available in: Atom PDF