# event_type ('type', u8), ('_pad', u8 * 3), ] # Endpoint ioctls # The same as in gadgetfs # IN transfers may be reported to the gadget driver as complete # when the fifo is loaded, before the host reads the data; # OUT transfers may be reported to the host's "client" driver as # complete when they're sitting in the FIFO unread. # THIS returns how many bytes are "unclaimed" in the endpoint fifo # (needed for precise fault handling, when the hardware allows it) FIFO_STATUS = ioctl_opt.IO(ord('g'), 1) # discards any unclaimed data in the fifo. FIFO_FLUSH = ioctl_opt.IO(ord('g'), 2) # resets endpoint halt+toggle; used to implement set_interface. # some hardware (like pxa2xx) can't support this. CLEAR_HALT = ioctl_opt.IO(ord('g'), 3) # Specific for functionfs # Returns reverse mapping of an interface. Called on EP0. If there # is no such interface returns -EDOM. If function is not active # returns -ENODEV. INTERFACE_REVMAP = ioctl_opt.IO(ord('g'), 128)
# __be32 sb_logsunit; /* stripe unit size for the log */ # __be32 sb_features2; /* additional feature bits */ # /* # * bad features2 field as a result of failing to pad the sb # * structure to 64 bits. Some machines will be using this field # * for features2 bits. Easiest just to mark it bad and not use # * it for anything else. # */ # __be32 sb_bad_features2; # # /* must be padded to 64 bit alignment */ #} xfs_dsb_t; # BLKGETSIZE64 = ioctl_opt.IOR(0x12, 114, ctypes.c_size_t) BLKSSZGET = ioctl_opt.IO(0x12, 104) XFS_SDB_T_STRUCT = struct.Struct( ">4sIQQQ16sQQQQIIIIIHHHH12sBBBBBBBBQQQQQQHBBIIIBBHIII" ) # Always big-endian per above struct XFSSdbT = namedtuple("XFSSdbT", [ "sb_magicnum", "sb_blocksize", "sb_dblocks", "sb_rblocks", "sb_rextents", "sb_uuid", "sb_logstart", "sb_rootino", "sb_rbmino", "sb_rsumino", "sb_rextsize", "sb_agblocks", "sb_agcount", "sb_rbmblocks", "sb_logblocks", "sb_versionnum", "sb_sectsize", "sb_inodesize", "sb_inopblock", "sb_fname", "sb_blocklog", "sb_sectlog", "sb_inodelog", "sb_inopblog", "sb_agblklog", "sb_rextslog", "sb_inprogress", "sb_imax_pct", "sb_icount", "sb_ifree", "sb_fdblocks", "sb_frextents", "sb_uquotino", "sb_gquotino", "sb_qflags", "sb_flags", "sb_shared_vn", "sb_inoalignmt", "sb_unit", "sb_width", "sb_dirblklog", "sb_logsectlog", "sb_logsectsize", "sb_logsunit", "sb_features2", "sb_bad_features2" ])