Messages in this thread Patch in this message | | | Date | Tue, 12 Aug 1997 23:24:43 -0400 (EDT) | From | "Albert D. Cahalan" <> | Subject | patch for deleted files |
| |
I think this patch will fix the ambiguity. It is shorter and faster code too. :-) (uuencoded copy follows plain text)
--- linux/fs/orig/dcache.c Tue Aug 12 23:04:30 1997 +++ linux/fs/dcache.c Tue Aug 12 23:02:54 1997 @@ -384,11 +384,6 @@ *--end = '\0'; buflen--; - if (dentry->d_parent != dentry && list_empty(&dentry->d_hash)) { - buflen -= 10; - end -= 10; - memcpy(end, " (deleted)", 10); - } /* Get '/' right */ retval = end-1; @@ -414,6 +409,10 @@ retval = end; dentry = parent; } + + /* If file is deleted (not a valid path!) skip the leading slash */ + if (dentry->d_parent != dentry && list_empty(&dentry->d_hash)) + retval++; return retval; }
begin 644 dcache.diff.gz M'XL("%#L\#,"`V1C86-H92YD:69F`*603T^#0!3$S_`IICT4Z++"MOBG)1@\ M&>\>31J$I6RDE,!B;$R_NV\+2>/!DR>6R;QY\WN<<]2J&;Z"L@^.G=H'19[E ME;S)K==!XFG80ZRP6F_#:+L.(3:;>YLQ=IWYR[[:WD:C/4W!UP^1+P28^=XA M36W8L):<RZ9``N<M=&(2WH>RE@WGL<TM5<(M9*.[$W\L=FW6T1NS!*.&Q8(J M]'HG#ZT^N8NKL\KZRO/P31%3'G@"$9I,RZR[_AWD(6]/+HD^YF9;+;4LO+E/ M!L\XSI>:P1+/4L,)'-!]*HUE0&HG]6=64WD:YR*^4$;"T+$HW/@BO%!:OWR& MT9H`$HQ,1CO;S&9FSTN)4M42JL?4!FYSU,A`&:J@$5W-//0?JH6N)&J9%:K9 AHZ^)VO1B_[P;!4R-&8M'RJ%K,$HDF(O\`#57AQ\S`@`` ` end
| |