about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/aix/linux/direntconv.c
blob: 620a0a071968cb459e1d8d8ac2ce09bffa586bfc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <dirent.h>
#include <string.h>
#include "linux-dirent.h"

#ifndef DT_UNKNOWN
# define DT_UNKNOWN 0
#endif


void
__dirent_aix_to_linux (const struct dirent *aixdir,
		       struct linuxdirent *linuxdir)
{
  linuxdir->d_ino = aixdir->d_ino;
  linuxdir->d_off = aixdir->d_off;
  linuxdir->d_reclen = aixdir->d_reclen;
  linuxdir->d_type = DT_UNKNOWN;
  strncpy (linuxdir->d_name, aixdir->d_name, 256);
}


void
__dirent64_aix_to_linux (const struct dirent64 *aixdir,
			 struct linuxdirent64 *linuxdir)
{
  linuxdir->d_ino = aixdir->d_ino;
  linuxdir->d_off = aixdir->d_off;
  linuxdir->d_reclen = aixdir->d_reclen;
  linuxdir->d_type = DT_UNKNOWN;
  strncpy (linuxdir->d_name, aixdir->d_name, 256);
}