This is a hppa specific bug.  It turns out the errno's for
ENOTSUP and EOPNOTSUPP are not the same:

#define EOPNOTSUPP      223     /* Operation not supported on transport endpoint
*/
#define ENOTSUP         252     /* Function not implemented (POSIX.4 / HPUX) */

The manpage says getfilecon should return ENOTSUP but EOPNOTSUPP is
actually returned:

(gdb) bt
#0  __error (status=0, errnum=223, message=0x28610 "%s") at error.c:221
#1  0x00016e68 in gobble_file (name=0x3184b "uname.o", type=normal, 
    inode=1532062, command_line_arg=false, dirname=0x31768 ".")
    at ../../coreutils-6.12/src/ls.c:2718
#2  0x00015ddc in print_dir (name=0x31768 ".", realname=0x0, 
    command_line_arg=true) at ../../coreutils-6.12/src/ls.c:2407
#3  0x00012ee8 in main (argc=2, argv=0xfb1ee6cc)
    at ../../coreutils-6.12/src/ls.c:1328

The attached change fixes the problem with ls, but doesn't fix the
errno problem.

Dave
-- 
J. David Anglin                                  [EMAIL PROTECTED]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

--- ls.c.orig   2008-05-26 02:40:32.000000000 -0400
+++ ls.c        2008-08-04 00:20:01.000000000 -0400
@@ -2700,7 +2700,7 @@
                 ls fail just because the file (even a command line argument)
                 isn't on the right type of file system.  I.e., a getfilecon
                 failure isn't in the same class as a stat failure.  */
-             if (errno == ENOTSUP || errno == ENODATA)
+             if (errno == ENOTSUP || errno == EOPNOTSUPP || errno == ENODATA)
                err = 0;
            }
 



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to