typo
[qemu] / linux-user / syscall_defs.h
index ac12b52..4e2dd17 100644 (file)
@@ -48,7 +48,7 @@
 #define TARGET_IOC_NRBITS      8
 #define TARGET_IOC_TYPEBITS    8
 
-#if defined(TARGET_I386) || defined(TARGET_ARM)
+#if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SH4)
 
 #define TARGET_IOC_SIZEBITS    14
 #define TARGET_IOC_DIRBITS     2
@@ -293,7 +293,7 @@ struct target_sigaction;
 int do_sigaction(int sig, const struct target_sigaction *act,
                  struct target_sigaction *oact);
 
-#if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC) || defined(TARGET_PPC) || defined(TARGET_MIPS)
+#if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC) || defined(TARGET_PPC) || defined(TARGET_MIPS) || defined (TARGET_SH4)
 
 #if defined(TARGET_SPARC)
 #define TARGET_SA_NOCLDSTOP    8u
@@ -863,7 +863,7 @@ struct target_winsize {
 #define TARGET_MAP_NORESERVE   0x4000          /* don't check for reservations */
 #endif
 
-#if defined(TARGET_I386) || defined(TARGET_ARM)
+#if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SH4)
 struct target_stat {
        unsigned short st_dev;
        unsigned short __pad1;
@@ -924,6 +924,38 @@ struct target_stat64 {
        unsigned long long      st_ino;
 } __attribute__((packed));
 
+#ifdef TARGET_ARM
+struct target_eabi_stat64 {
+        unsigned long long st_dev;
+        unsigned int    __pad1;
+        unsigned long   __st_ino;
+        unsigned int    st_mode;
+        unsigned int    st_nlink;
+
+        unsigned long   st_uid;
+        unsigned long   st_gid;
+
+        unsigned long long st_rdev;
+        unsigned int    __pad2[2];
+
+        long long       st_size;
+        unsigned long   st_blksize;
+        unsigned int    __pad3;
+        unsigned long long st_blocks;
+
+        unsigned long   target_st_atime;
+        unsigned long   target_st_atime_nsec;
+
+        unsigned long   target_st_mtime;
+        unsigned long   target_st_mtime_nsec;
+
+        unsigned long   target_st_ctime;
+        unsigned long   target_st_ctime_nsec;
+
+        unsigned long long st_ino;
+} __attribute__ ((packed));
+#endif
+
 #elif defined(TARGET_SPARC)
 
 struct target_stat {
@@ -1102,6 +1134,68 @@ struct target_stat64 {
 #error unsupported CPU
 #endif
 
+#ifdef TARGET_MIPS
+struct target_statfs {
+       target_long             f_type;
+       target_long             f_bsize;
+       target_long             f_frsize;       /* Fragment size - unsupported */
+       target_long             f_blocks;
+       target_long             f_bfree;
+       target_long             f_files;
+       target_long             f_ffree;
+       target_long             f_bavail;
+
+       /* Linux specials */
+       int     f_fsid;
+       target_long             f_namelen;
+       target_long             f_spare[6];
+};
+
+struct target_statfs64 {
+       uint32_t        f_type;
+       uint32_t        f_bsize;
+       uint32_t        f_frsize;       /* Fragment size - unsupported */
+       uint32_t        __pad;
+       uint64_t        f_blocks;
+       uint64_t        f_bfree;
+       uint64_t        f_files;
+       uint64_t        f_ffree;
+       uint64_t        f_bavail;
+       int f_fsid;
+       uint32_t        f_namelen;
+       uint32_t        f_spare[6];
+};
+#else
+struct target_statfs {
+       uint32_t f_type;
+       uint32_t f_bsize;
+       uint32_t f_blocks;
+       uint32_t f_bfree;
+       uint32_t f_bavail;
+       uint32_t f_files;
+       uint32_t f_ffree;
+       int f_fsid;
+       uint32_t f_namelen;
+       uint32_t f_frsize;
+       uint32_t f_spare[5];
+};
+
+struct target_statfs64 {
+       uint32_t f_type;
+       uint32_t f_bsize;
+       uint64_t f_blocks;
+       uint64_t f_bfree;
+       uint64_t f_bavail;
+       uint64_t f_files;
+       uint64_t f_ffree;
+       int f_fsid;
+        uint32_t f_namelen;
+       uint32_t f_frsize;
+       uint32_t f_spare[5];
+};
+#endif
+
+
 #define TARGET_F_DUPFD         0       /* dup */
 #define TARGET_F_GETFD         1       /* get close_on_exec */
 #define TARGET_F_SETFD         2       /* set/clear close_on_exec */
@@ -1236,8 +1330,18 @@ struct target_flock64 {
        unsigned long long l_start;
        unsigned long long l_len;
        int  l_pid;
-};
+}__attribute__((packed));
 
+#ifdef TARGET_ARM
+struct target_eabi_flock64 {
+       short  l_type;
+       short  l_whence;
+        int __pad;
+       unsigned long long l_start;
+       unsigned long long l_len;
+       int  l_pid;
+}__attribute__((packed));
+#endif
 
 /* soundcard defines */
 /* XXX: convert them all to arch indepedent entries */