We need to use _kern_open() on BeOS incompatible systems, if we want
to be able to open symlinks. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22182 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
16df02e515
commit
363d1373f4
@ -1107,10 +1107,16 @@ static int set_file_attrs( const char *name,
|
||||
ptr = (unsigned char *)attr_buff;
|
||||
guard = ptr + attr_size;
|
||||
|
||||
#ifdef HAIKU_USE_KERN_OPEN
|
||||
fd = _kern_open( -1, name, O_RDONLY | O_NOTRAVERSE, 0 );
|
||||
if( fd < 0 )
|
||||
return fd;
|
||||
#else
|
||||
fd = open( name, O_RDONLY | O_NOTRAVERSE );
|
||||
if( fd < 0 ) {
|
||||
return errno; /* should it be -fd ? */
|
||||
}
|
||||
#endif
|
||||
|
||||
while( ptr < guard ) {
|
||||
ssize_t wrote_bytes;
|
||||
|
@ -28,4 +28,8 @@
|
||||
# ifndef EOK
|
||||
# define EOK B_OK
|
||||
# endif
|
||||
#endif // __BEOS__
|
||||
|
||||
# define HAIKU_USE_KERN_OPEN 1
|
||||
extern int _kern_open(int fd, const char *path, int openMode, int perms);
|
||||
|
||||
#endif // !__BEOS__
|
||||
|
Loading…
Reference in New Issue
Block a user