File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -917,6 +917,8 @@ static int process_id(struct lsof_context *ctx, /* context */
917917 static int pathil = 0 ;
918918 char * rest ;
919919 int txts = 0 ;
920+ int enss_fd = 0 ;
921+ int enls_fd = 0 ;
920922
921923#if defined(HASSELINUX )
922924 cntxlist_t * cntxp ;
@@ -1206,13 +1208,15 @@ static int process_id(struct lsof_context *ctx, /* context */
12061208 } else {
12071209 if (HasNFS ) {
12081210 if (lstatsafely (ctx , path , & lsb )) {
1211+ enls_fd = errno ;
12091212 (void )statEx (ctx , pbuf , & lsb , & ls );
12101213 enls = errno ;
12111214 } else {
12121215 enls = 0 ;
12131216 ls = SB_ALL ;
12141217 }
12151218 if (statsafely (ctx , path , & sb )) {
1219+ enss_fd = errno ;
12161220 (void )statEx (ctx , pbuf , & sb , & ss );
12171221 enss = errno ;
12181222 } else {
@@ -1353,6 +1357,12 @@ static int process_id(struct lsof_context *ctx, /* context */
13531357 enter_nm (ctx , rest );
13541358 }
13551359
1360+ if ((Selflags & SELNLINK ) &&
1361+ (enss_fd == ESTALE || enls_fd == ESTALE )) {
1362+ Lf -> sf |= SELNLINK ;
1363+ (void )add_nma (ctx , " (STALE)" , 8 );
1364+ }
1365+
13561366 if (Lf -> sf )
13571367 link_lfile (ctx );
13581368 }
You can’t perform that action at this time.
0 commit comments