📄 syscall_defs.h
字号:
#define TARGET_CDROMREADALL 0x5318 /* read all 2646 bytes *//* * These ioctls are (now) only in ide-cd.c for controlling * drive spindown time. They should be implemented in the * Uniform driver, via generic packet commands, GPCMD_MODE_SELECT_10, * GPCMD_MODE_SENSE_10 and the GPMODE_POWER_PAGE... * -Erik */#define TARGET_CDROMGETSPINDOWN 0x531d#define TARGET_CDROMSETSPINDOWN 0x531e/* * These ioctls are implemented through the uniform CD-ROM driver * They _will_ be adopted by all CD-ROM drivers, when all the CD-ROM * drivers are eventually ported to the uniform CD-ROM driver interface. */#define TARGET_CDROMCLOSETRAY 0x5319 /* pendant of CDROMEJECT */#define TARGET_CDROM_SET_OPTIONS 0x5320 /* Set behavior options */#define TARGET_CDROM_CLEAR_OPTIONS 0x5321 /* Clear behavior options */#define TARGET_CDROM_SELECT_SPEED 0x5322 /* Set the CD-ROM speed */#define TARGET_CDROM_SELECT_DISC 0x5323 /* Select disc (for juke-boxes) */#define TARGET_CDROM_MEDIA_CHANGED 0x5325 /* Check is media changed */#define TARGET_CDROM_DRIVE_STATUS 0x5326 /* Get tray position, etc. */#define TARGET_CDROM_DISC_STATUS 0x5327 /* Get disc type, etc. */#define TARGET_CDROM_CHANGER_NSLOTS 0x5328 /* Get number of slots */#define TARGET_CDROM_LOCKDOOR 0x5329 /* lock or unlock door */#define TARGET_CDROM_DEBUG 0x5330 /* Turn debug messages on/off */#define TARGET_CDROM_GET_CAPABILITY 0x5331 /* get capabilities *//* Note that scsi/scsi_ioctl.h also uses 0x5382 - 0x5386. * Future CDROM ioctls should be kept below 0x537F *//* This ioctl is only used by sbpcd at the moment */#define TARGET_CDROMAUDIOBUFSIZ 0x5382 /* set the audio buffer size */ /* conflict with SCSI_IOCTL_GET_IDLUN *//* DVD-ROM Specific ioctls */#define TARGET_DVD_READ_STRUCT 0x5390 /* Read structure */#define TARGET_DVD_WRITE_STRUCT 0x5391 /* Write structure */#define TARGET_DVD_AUTH 0x5392 /* Authentication */#define TARGET_CDROM_SEND_PACKET 0x5393 /* send a packet to the drive */#define TARGET_CDROM_NEXT_WRITABLE 0x5394 /* get next writable block */#define TARGET_CDROM_LAST_WRITTEN 0x5395 /* get last block written on disc *//* HD commands *//* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x030n/0x031n */#define TARGET_HDIO_GETGEO 0x0301 /* get device geometry */#define TARGET_HDIO_GET_UNMASKINTR 0x0302 /* get current unmask setting */#define TARGET_HDIO_GET_MULTCOUNT 0x0304 /* get current IDE blockmode setting */#define TARGET_HDIO_GET_KEEPSETTINGS 0x0308 /* get keep-settings-on-reset flag */#define TARGET_HDIO_GET_32BIT 0x0309 /* get current io_32bit setting */#define TARGET_HDIO_GET_NOWERR 0x030a /* get ignore-write-error flag */#define TARGET_HDIO_GET_DMA 0x030b /* get use-dma flag */#define TARGET_HDIO_GET_IDENTITY 0x030d /* get IDE identification info */#define TARGET_HDIO_DRIVE_CMD 0x031f /* execute a special drive command *//* hd/ide ctl's that pass (arg) non-ptr values are numbered 0x032n/0x033n */#define TARGET_HDIO_SET_MULTCOUNT 0x0321 /* change IDE blockmode */#define TARGET_HDIO_SET_UNMASKINTR 0x0322 /* permit other irqs during I/O */#define TARGET_HDIO_SET_KEEPSETTINGS 0x0323 /* keep ioctl settings on reset */#define TARGET_HDIO_SET_32BIT 0x0324 /* change io_32bit flags */#define TARGET_HDIO_SET_NOWERR 0x0325 /* change ignore-write-error flag */#define TARGET_HDIO_SET_DMA 0x0326 /* change use-dma flag */#define TARGET_HDIO_SET_PIO_MODE 0x0327 /* reconfig interface to new speed *//* from asm/termbits.h */#define TARGET_NCC 8struct target_termio { unsigned short c_iflag; /* input mode flags */ unsigned short c_oflag; /* output mode flags */ unsigned short c_cflag; /* control mode flags */ unsigned short c_lflag; /* local mode flags */ unsigned char c_line; /* line discipline */ unsigned char c_cc[TARGET_NCC]; /* control characters */};struct target_winsize { unsigned short ws_row; unsigned short ws_col; unsigned short ws_xpixel; unsigned short ws_ypixel;};#include "termbits.h"#define TARGET_MAP_SHARED 0x01 /* Share changes */#define TARGET_MAP_PRIVATE 0x02 /* Changes are private */#define TARGET_MAP_TYPE 0x0f /* Mask for type of mapping */#define TARGET_MAP_FIXED 0x10 /* Interpret addr exactly */#if defined(TARGET_MIPS)#define TARGET_MAP_ANONYMOUS 0x0800 /* don't use a file */#define TARGET_MAP_GROWSDOWN 0x1000 /* stack-like segment */#define TARGET_MAP_DENYWRITE 0x2000 /* ETXTBSY */#define TARGET_MAP_EXECUTABLE 0x4000 /* mark it as an executable */#define TARGET_MAP_LOCKED 0x8000 /* pages are locked */#define TARGET_MAP_NORESERVE 0x0400 /* don't check for reservations */#else#define TARGET_MAP_ANONYMOUS 0x20 /* don't use a file */#define TARGET_MAP_GROWSDOWN 0x0100 /* stack-like segment */#define TARGET_MAP_DENYWRITE 0x0800 /* ETXTBSY */#define TARGET_MAP_EXECUTABLE 0x1000 /* mark it as an executable */#define TARGET_MAP_LOCKED 0x2000 /* pages are locked */#define TARGET_MAP_NORESERVE 0x4000 /* don't check for reservations */#endif#if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SH4)struct target_stat { unsigned short st_dev; unsigned short __pad1; target_ulong st_ino; unsigned short st_mode; unsigned short st_nlink; unsigned short st_uid; unsigned short st_gid; unsigned short st_rdev; unsigned short __pad2; target_ulong st_size; target_ulong st_blksize; target_ulong st_blocks; target_ulong target_st_atime; target_ulong __unused1; target_ulong target_st_mtime; target_ulong __unused2; target_ulong target_st_ctime; target_ulong __unused3; target_ulong __unused4; target_ulong __unused5;};/* This matches struct stat64 in glibc2.1, hence the absolutely * insane amounts of padding around dev_t's. */struct target_stat64 { unsigned short st_dev; unsigned char __pad0[10];#define TARGET_STAT64_HAS_BROKEN_ST_INO 1 target_ulong __st_ino; unsigned int st_mode; unsigned int st_nlink; target_ulong st_uid; target_ulong st_gid; unsigned short st_rdev; unsigned char __pad3[10]; long long st_size; target_ulong st_blksize; target_ulong st_blocks; /* Number 512-byte blocks allocated. */ target_ulong __pad4; /* future possible st_blocks high bits */ target_ulong target_st_atime; target_ulong __pad5; target_ulong target_st_mtime; target_ulong __pad6; target_ulong target_st_ctime; target_ulong __pad7; /* will be high 32 bits of ctime someday */ unsigned long long st_ino;} __attribute__((packed));#ifdef TARGET_ARMstruct 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 { unsigned short st_dev; target_ulong st_ino; unsigned short st_mode; short st_nlink; unsigned short st_uid; unsigned short st_gid; unsigned short st_rdev; target_long st_size; target_long target_st_atime; target_ulong __unused1; target_long target_st_mtime; target_ulong __unused2; target_long target_st_ctime; target_ulong __unused3; target_long st_blksize; target_long st_blocks; target_ulong __unused4[2];};struct target_stat64 { unsigned char __pad0[6]; unsigned short st_dev; uint64_t st_ino; unsigned int st_mode; unsigned int st_nlink; unsigned int st_uid; unsigned int st_gid; unsigned char __pad2[6]; unsigned short st_rdev; unsigned char __pad3[8]; int64_t st_size; unsigned int st_blksize; unsigned char __pad4[8]; unsigned int st_blocks; unsigned int target_st_atime; unsigned int __unused1; unsigned int target_st_mtime; unsigned int __unused2; unsigned int target_st_ctime; unsigned int __unused3; unsigned int __unused4; unsigned int __unused5;};#elif defined(TARGET_PPC)struct target_stat { unsigned short st_dev; target_ulong st_ino; unsigned int st_mode; unsigned short st_nlink; unsigned int st_uid; unsigned int st_gid; unsigned short st_rdev; target_ulong st_size; target_ulong st_blksize; target_ulong st_blocks; target_ulong target_st_atime; target_ulong __unused1; target_ulong target_st_mtime; target_ulong __unused2; target_ulong target_st_ctime; target_ulong __unused3; target_ulong __unused4; target_ulong __unused5;};struct target_stat64 { unsigned long long st_dev; unsigned long long st_ino; unsigned int st_mode; unsigned int st_nlink; unsigned int st_uid; unsigned int st_gid; unsigned long long st_rdev; long long pad0; long long st_size; target_ulong st_blksize; target_ulong pad1; long long st_blocks; /* Number 512-byte blocks allocated. */ target_ulong target_st_atime; target_ulong target_st_atime_nsec; target_ulong target_st_mtime; target_ulong target_st_mtime_nsec; target_ulong target_st_ctime; target_ulong target_st_ctime_nsec; target_ulong __unused4; target_ulong __unused5;};#elif defined(TARGET_MIPS)struct target_stat { unsigned st_dev; target_long st_pad1[3]; /* Reserved for network id */ target_ulong st_ino; unsigned int st_mode; unsigned int st_nlink; int st_uid; int st_gid; unsigned st_rdev; target_long st_pad2[2]; target_long st_size; target_long st_pad3; /* * Actually this should be timestruc_t st_atime, st_mtime and st_ctime * but we don't have it under Linux. */ target_long target_st_atime; target_long target_st_atime_nsec; target_long target_st_mtime; target_long target_st_mtime_nsec; target_long target_st_ctime; target_long target_st_ctime_nsec; target_long st_blksize; target_long st_blocks; target_long st_pad4[14];};/* * This matches struct stat64 in glibc2.1, hence the absolutely insane * amounts of padding around dev_t's. The memory layout is the same as of * struct stat of the 64-bit kernel. */struct target_stat64 { target_ulong st_dev; target_ulong st_pad0[3]; /* Reserved for st_dev expansion */ uint64_t st_ino; unsigned int st_mode; unsigned int st_nlink; int st_uid; int st_gid; target_ulong st_rdev; target_ulong st_pad1[3]; /* Reserved for st_rdev expansion */ int64_t st_size; /* * Actually this should be timestruc_t st_atime, st_mtime and st_ctime * but we don't have it under Linux. */ target_long target_st_atime; target_ulong target_st_atime_nsec; /* Reserved for st_atime expansion */ target_long target_st_mtime; target_ulong target_st_mtime_nsec; /* Reserved for st_mtime expansion */ target_long target_st_ctime; target_ulong target_st_ctime_nsec; /* Reserved for st_ctime expansion */ target_ulong st_blksize; target_ulong st_pad2; int64_t st_blocks;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -