K 10 svn:author V 7 dchagin K 8 svn:date V 27 2009-06-21T19:02:32.200393Z K 7 svn:log V 1084 MFC r164890 (by jkim): Fixes for 'blocking in fifoor state' problem of LTP tests. linux_*stat*() functions were opening files with O_RDONLY to get major/minor pair for char/block special files. Unfortunately, when these functions are used against fifo, it is blocked forever because there is no writer. Instead, we only open char/block special files for major/minor conversion. We have to get rid of kern_open() entirely from translate_path_major_minor() but today is not the day. While I am here, add checks for errors before calling translate_path_major_minor(). MFC r179651: d_ino member of linux_dirent structure should be unsigned long. MFC r182892: Getdents requires padding with 2 bytes instead of 1 byte as with getdents64. The last byte is used for storing the d_type, add this to plain getdents case where it was missing before. Also change the code to use strlcpy instead of plain strcpy. MFC r188572: Fix an edge-case of the linux readdir: We need the size of a linux dirent structure, not the size of a pointer to it. PR: kern/113939 Approved by: kib (mentor) END