Satoru Takeuchi
48fcc3ff7d
btrfs: label should not contain return char
Rediffed remaining parts of original patch from Anand Jain. This makes
sure to avoid trailing newlines in the btrfs label output
reproducer.sh:
===============================================================================
TEST_DEV=/dev/vdb
TEST_DIR=/home/sat/mnt
umount /home/sat/mnt
mkfs.btrfs -f $TEST_DEV
UUID=$(btrfs fi show $TEST_DEV | head -1 | sed -e 's/.*uuid: \([-0-9a-z]*\)$/\1/')
mount $TEST_DEV $TEST_DIR
LABELFILE=/sys/fs/btrfs/$UUID/label
echo "Test for empty label..." >&2
LINES="$(cat $LABELFILE | wc -l | awk '{print $1}')"
RET=0
if [ $LINES -eq 0 ] ; then
echo '[PASS] Trailing \n is removed correctly.' >&2
else
echo '[FAIL] Trailing \n still exists.' >&2
RET=1
fi
echo "Test for non-empty label..." >&2
echo testlabel >$LABELFILE
LINES="$(cat $LABELFILE | wc -l | awk '{print $1}')"
if [ $LINES -eq 1 ] ; then
echo '[PASS] Trailing \n is removed correctly.' >&2
else
echo '[FAIL] Trailing \n still exists.' >&2
RET=1
fi
exit $RET
===============================================================================
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
2014-09-17 13:37:25 -07:00
..
2014-06-13 09:52:24 -07:00
2014-06-09 17:20:42 -07:00
2014-08-24 07:17:02 -07:00
2014-08-24 07:17:02 -07:00
2014-09-17 13:37:14 -07:00
2014-06-09 17:21:17 -07:00
2014-08-15 07:43:42 -07:00
2014-09-17 13:37:17 -07:00
2013-11-24 16:33:41 -07:00
2014-09-17 13:37:17 -07:00
2013-05-06 15:55:23 -04:00
2014-09-17 13:37:14 -07:00
2014-09-17 13:37:14 -07:00
2014-09-17 13:37:12 -07:00
2014-01-28 13:20:09 -08:00
2014-06-09 17:20:48 -07:00
2014-06-09 17:20:48 -07:00
2014-06-28 13:48:44 -07:00
2012-12-12 17:15:41 -05:00
2014-09-17 13:37:12 -07:00
2014-09-17 13:37:14 -07:00
2014-09-17 13:37:11 -07:00
2014-09-17 13:37:12 -07:00
2008-09-25 11:04:06 -04:00
2014-09-17 13:37:12 -07:00
2014-06-19 14:20:28 -07:00
2014-06-19 14:20:55 -07:00
2014-06-19 14:20:55 -07:00
2014-09-17 13:37:16 -07:00
2014-09-17 13:37:12 -07:00
2014-09-17 13:37:17 -07:00
2014-09-17 13:37:17 -07:00
2013-11-11 21:51:33 -05:00
2014-01-28 13:20:31 -08:00
2014-01-28 13:20:31 -08:00
2014-09-17 13:37:12 -07:00
2014-09-17 13:37:09 -07:00
2011-04-25 16:46:11 +08:00
2014-09-17 13:37:12 -07:00
2014-09-17 13:37:23 -07:00
2014-01-28 13:20:31 -08:00
2014-06-19 14:19:55 -07:00
2013-03-14 14:57:10 -04:00
2014-09-17 13:37:17 -07:00
2014-06-09 17:20:49 -07:00
2012-12-11 13:31:30 -05:00
2014-08-24 07:17:02 -07:00
2014-08-15 07:43:42 -07:00
2014-09-17 13:37:12 -07:00
2014-09-17 13:37:14 -07:00
2013-05-06 15:55:23 -04:00
2014-01-28 13:20:24 -08:00
2014-01-28 13:20:24 -08:00
2014-09-17 13:37:14 -07:00
2014-08-15 07:43:14 -07:00
2014-09-17 13:37:17 -07:00
2013-02-01 14:24:23 -05:00
2012-06-14 21:29:16 -04:00
2014-09-17 13:37:14 -07:00
2014-09-17 13:37:14 -07:00
2014-06-09 17:20:40 -07:00
2014-09-17 13:37:14 -07:00
2014-06-09 17:21:00 -07:00
2013-05-06 15:55:23 -04:00
2012-07-23 16:28:06 -04:00
2014-09-17 13:37:19 -07:00
2014-09-17 13:37:25 -07:00
2014-06-28 13:48:43 -07:00
2014-09-17 13:37:14 -07:00
2014-08-15 07:43:42 -07:00
2014-06-09 17:20:40 -07:00
2014-09-17 13:37:14 -07:00
2014-09-08 13:56:43 -07:00
2014-01-29 07:06:27 -08:00
2014-08-15 07:43:19 -07:00
2014-01-28 13:20:05 -08:00
2014-09-17 13:37:12 -07:00
2014-06-19 14:20:56 -07:00
2014-09-17 13:37:12 -07:00
2014-01-25 23:58:18 -05:00
2014-09-17 13:37:17 -07:00