s = socket
b = block device
c = character device
+ p = FIFO (named pipe)
- = regular file
? = an error of some kind
- fixed logic; don't follow the path if a component is not directory
- fixed infinite loop of symbolic links; stack size is very limited
+2007-09-10 Li Zefan <lizf@cn.fujitsu.com>
+- added to identify FIFO
+
-------------------------------------------------------------*/
#include <stdio.h>
(void)printf(" s %s\n", buf);
break;
+ case S_IFIFO:
+ if (mflag)
+ printf(" p%s %s\n", pperm(stb.st_mode), buf);
+ else
+ printf(" p %s\n", buf);
+ break;
+
case S_IFREG:
if(mflag)
(void)printf(" -%s %s\n", pperm(stb.st_mode), buf);