# HG changeset patch
# User Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
# Date 1390760223 0
# Node ID e17bb881831818b1f3130d4d169cc37e1d3e3b3d
# Parent  024042383a26b33ad7a15cbfbe94dae313f488c3
tiffs ls: show read-only file flag

diff -r 024042383a26 -r e17bb8818318 ffstools/tiffs-rd/ls.c
--- a/ffstools/tiffs-rd/ls.c	Sun Jan 26 11:47:13 2014 +0000
+++ b/ffstools/tiffs-rd/ls.c	Sun Jan 26 18:17:03 2014 +0000
@@ -43,18 +43,25 @@
 {
 	struct inode_info *inf = inode_info[ino];
 	u_long size;
+	char readonly;
 
+	if (inf->type & 0x10)
+		readonly = ' ';
+	else
+		readonly = 'r';
 	switch (inf->type) {
 	case 0xE1:
 	case 0xF1:
 		size = get_file_size(ino, 0);
-		printf("f %7lu %s\n", size, pathname);
+		printf("f%c %7lu %s\n", readonly, size, pathname);
 		return;
+	case 0xE2:
 	case 0xF2:
-		printf("d         %s\n", pathname);
+		printf("d%c         %s\n", readonly, pathname);
 		return;
+	case 0xE3:
 	case 0xF3:
-		printf("l         %s\n", pathname);
+		printf("l%c         %s\n", readonly, pathname);
 		return;
 	default:
 		fprintf(stderr,