1 STRUCT_SPECIAL(termios) 2 3 STRUCT(winsize, 4 TYPE_SHORT, TYPE_SHORT, TYPE_SHORT, TYPE_SHORT) 5 6 STRUCT(serial_multiport_struct, 7 TYPE_INT, TYPE_INT, TYPE_CHAR, TYPE_CHAR, TYPE_INT, TYPE_CHAR, TYPE_CHAR, 8 TYPE_INT, TYPE_CHAR, TYPE_CHAR, TYPE_INT, TYPE_CHAR, TYPE_CHAR, TYPE_INT, 9 MK_ARRAY(TYPE_INT, 32)) 10 11 STRUCT(serial_icounter_struct, 12 TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, MK_ARRAY(TYPE_INT, 16)) 13 14 STRUCT(sockaddr, 15 TYPE_SHORT, MK_ARRAY(TYPE_CHAR, 14)) 16 17 STRUCT(rtentry, 18 TYPE_ULONG, MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), 19 TYPE_SHORT, TYPE_SHORT, TYPE_ULONG, TYPE_PTRVOID, TYPE_SHORT, TYPE_PTRVOID, 20 TYPE_ULONG, TYPE_ULONG, TYPE_SHORT) 21 22 STRUCT(ifmap, 23 TYPE_ULONG, TYPE_ULONG, TYPE_SHORT, TYPE_CHAR, TYPE_CHAR, TYPE_CHAR, 24 /* Spare 3 bytes */ 25 TYPE_CHAR, TYPE_CHAR, TYPE_CHAR) 26 27 /* The *_ifreq_list arrays deal with the fact that struct ifreq has unions */ 28 29 STRUCT(sockaddr_ifreq, 30 MK_ARRAY(TYPE_CHAR, IFNAMSIZ), MK_STRUCT(STRUCT_sockaddr)) 31 32 STRUCT(short_ifreq, 33 MK_ARRAY(TYPE_CHAR, IFNAMSIZ), TYPE_SHORT) 34 35 STRUCT(int_ifreq, 36 MK_ARRAY(TYPE_CHAR, IFNAMSIZ), TYPE_INT) 37 38 STRUCT(ifmap_ifreq, 39 MK_ARRAY(TYPE_CHAR, IFNAMSIZ), MK_STRUCT(STRUCT_ifmap)) 40 41 STRUCT(char_ifreq, 42 MK_ARRAY(TYPE_CHAR, IFNAMSIZ), 43 MK_ARRAY(TYPE_CHAR, IFNAMSIZ)) 44 45 STRUCT(ptr_ifreq, 46 MK_ARRAY(TYPE_CHAR, IFNAMSIZ), TYPE_PTRVOID) 47 48 STRUCT(ifconf, 49 TYPE_INT, TYPE_PTRVOID) 50 51 STRUCT(arpreq, 52 MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), TYPE_INT, MK_STRUCT(STRUCT_sockaddr), 53 MK_ARRAY(TYPE_CHAR, 16)) 54 55 STRUCT(arpreq_old, 56 MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), TYPE_INT, MK_STRUCT(STRUCT_sockaddr)) 57 58 STRUCT(cdrom_read_audio, 59 TYPE_CHAR, TYPE_CHAR, TYPE_CHAR, TYPE_CHAR, TYPE_CHAR, TYPE_INT, TYPE_PTRVOID, 60 TYPE_NULL) 61 62 STRUCT(hd_geometry, 63 TYPE_CHAR, TYPE_CHAR, TYPE_SHORT, TYPE_ULONG) 64 65 STRUCT(dirent, 66 TYPE_LONG, TYPE_LONG, TYPE_SHORT, MK_ARRAY(TYPE_CHAR, 256)) 67 68 STRUCT(kbentry, 69 TYPE_CHAR, TYPE_CHAR, TYPE_SHORT) 70 71 STRUCT(kbsentry, 72 TYPE_CHAR, MK_ARRAY(TYPE_CHAR, 512)) 73 74 STRUCT(audio_buf_info, 75 TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT) 76 77 STRUCT(count_info, 78 TYPE_INT, TYPE_INT, TYPE_INT) 79 80 STRUCT(buffmem_desc, 81 TYPE_PTRVOID, TYPE_INT) 82 83 STRUCT(mixer_info, 84 MK_ARRAY(TYPE_CHAR, 16), MK_ARRAY(TYPE_CHAR, 32), TYPE_INT, MK_ARRAY(TYPE_INT, 10)) 85 86 STRUCT(snd_timer_id, 87 TYPE_INT, /* dev_class */ 88 TYPE_INT, /* dev_sclass */ 89 TYPE_INT, /* card */ 90 TYPE_INT, /* device */ 91 TYPE_INT) /* subdevice */ 92 93 STRUCT(snd_timer_ginfo, 94 MK_STRUCT(STRUCT_snd_timer_id), /* tid */ 95 TYPE_INT, /* flags */ 96 TYPE_INT, /* card */ 97 MK_ARRAY(TYPE_CHAR, 64), /* id */ 98 MK_ARRAY(TYPE_CHAR, 80), /* name */ 99 TYPE_ULONG, /* reserved0 */ 100 TYPE_ULONG, /* resolution */ 101 TYPE_ULONG, /* resolution_min */ 102 TYPE_ULONG, /* resolution_max */ 103 TYPE_INT, /* clients */ 104 MK_ARRAY(TYPE_CHAR, 32)) /* reserved */ 105 106 STRUCT(snd_timer_gparams, 107 MK_STRUCT(STRUCT_snd_timer_id), /* tid */ 108 TYPE_ULONG, /* period_num */ 109 TYPE_ULONG, /* period_den */ 110 MK_ARRAY(TYPE_CHAR, 32)) /* reserved */ 111 112 STRUCT(snd_timer_gstatus, 113 MK_STRUCT(STRUCT_snd_timer_id), /* tid */ 114 TYPE_ULONG, /* resolution */ 115 TYPE_ULONG, /* resolution_num */ 116 TYPE_ULONG, /* resolution_den */ 117 MK_ARRAY(TYPE_CHAR, 32)) /* reserved */ 118 119 STRUCT(snd_timer_select, 120 MK_STRUCT(STRUCT_snd_timer_id), /* id */ 121 MK_ARRAY(TYPE_CHAR, 32)) /* reserved */ 122 123 STRUCT(snd_timer_info, 124 TYPE_INT, /* flags */ 125 TYPE_INT, /* card */ 126 MK_ARRAY(TYPE_CHAR, 64), /* id */ 127 MK_ARRAY(TYPE_CHAR, 80), /* name */ 128 TYPE_ULONG, /* reserved0 */ 129 TYPE_ULONG, /* resolution */ 130 MK_ARRAY(TYPE_CHAR, 64)) /* reserved */ 131 132 STRUCT(snd_timer_params, 133 TYPE_INT, /* flags */ 134 TYPE_INT, /* ticks */ 135 TYPE_INT, /* queue_size */ 136 TYPE_INT, /* reserved0 */ 137 TYPE_INT, /* filter */ 138 MK_ARRAY(TYPE_CHAR, 60)) /* reserved */ 139 140 #if defined(TARGET_SPARC64) && !defined(TARGET_ABI32) 141 STRUCT(timeval, 142 TYPE_LONG, /* tv_sec */ 143 TYPE_INT) /* tv_usec */ 144 145 STRUCT(_kernel_sock_timeval, 146 TYPE_LONG, /* tv_sec */ 147 TYPE_INT) /* tv_usec */ 148 #else 149 STRUCT(timeval, 150 TYPE_LONG, /* tv_sec */ 151 TYPE_LONG) /* tv_usec */ 152 153 STRUCT(_kernel_sock_timeval, 154 TYPE_LONGLONG, /* tv_sec */ 155 TYPE_LONGLONG) /* tv_usec */ 156 #endif 157 158 STRUCT(timespec, 159 TYPE_LONG, /* tv_sec */ 160 TYPE_LONG) /* tv_nsec */ 161 162 STRUCT(_kernel_timespec, 163 TYPE_LONGLONG, /* tv_sec */ 164 TYPE_LONGLONG) /* tv_nsec */ 165 166 STRUCT(snd_timer_status, 167 MK_STRUCT(STRUCT_timespec), /* tstamp */ 168 TYPE_INT, /* resolution */ 169 TYPE_INT, /* lost */ 170 TYPE_INT, /* overrun */ 171 TYPE_INT, /* queue */ 172 MK_ARRAY(TYPE_CHAR, 64)) /* reserved */ 173 174 /* loop device ioctls */ 175 STRUCT(loop_info, 176 TYPE_INT, /* lo_number */ 177 TYPE_OLDDEVT, /* lo_device */ 178 TYPE_ULONG, /* lo_inode */ 179 TYPE_OLDDEVT, /* lo_rdevice */ 180 TYPE_INT, /* lo_offset */ 181 TYPE_INT, /* lo_encrypt_type */ 182 TYPE_INT, /* lo_encrypt_key_size */ 183 TYPE_INT, /* lo_flags */ 184 MK_ARRAY(TYPE_CHAR, 64), /* lo_name */ 185 MK_ARRAY(TYPE_CHAR, 32), /* lo_encrypt_key */ 186 MK_ARRAY(TYPE_ULONG, 2), /* lo_init */ 187 MK_ARRAY(TYPE_CHAR, 4)) /* reserved */ 188 189 STRUCT(loop_info64, 190 TYPE_ULONGLONG, /* lo_device */ 191 TYPE_ULONGLONG, /* lo_inode */ 192 TYPE_ULONGLONG, /* lo_rdevice */ 193 TYPE_ULONGLONG, /* lo_offset */ 194 TYPE_ULONGLONG, /* lo_sizelimit */ 195 TYPE_INT, /* lo_number */ 196 TYPE_INT, /* lo_encrypt_type */ 197 TYPE_INT, /* lo_encrypt_key_size */ 198 TYPE_INT, /* lo_flags */ 199 MK_ARRAY(TYPE_CHAR, 64), /* lo_name */ 200 MK_ARRAY(TYPE_CHAR, 64), /* lo_crypt_name */ 201 MK_ARRAY(TYPE_CHAR, 32), /* lo_encrypt_key */ 202 MK_ARRAY(TYPE_ULONGLONG, 2)) /* lo_init */ 203 204 STRUCT(loop_config, 205 TYPE_INT, /* fd */ 206 TYPE_INT, /* block_size */ 207 MK_STRUCT(STRUCT_loop_info64), /* info */ 208 MK_ARRAY(TYPE_ULONGLONG, 8)) /* __reserved */ 209 210 /* mag tape ioctls */ 211 STRUCT(mtop, TYPE_SHORT, TYPE_INT) 212 STRUCT(mtget, TYPE_LONG, TYPE_LONG, TYPE_LONG, TYPE_LONG, TYPE_LONG, 213 TYPE_INT, TYPE_INT) 214 STRUCT(mtpos, TYPE_LONG) 215 216 STRUCT(fb_fix_screeninfo, 217 MK_ARRAY(TYPE_CHAR, 16), /* id */ 218 TYPE_ULONG, /* smem_start */ 219 TYPE_INT, /* smem_len */ 220 TYPE_INT, /* type */ 221 TYPE_INT, /* type_aux */ 222 TYPE_INT, /* visual */ 223 TYPE_SHORT, /* xpanstep */ 224 TYPE_SHORT, /* ypanstep */ 225 TYPE_SHORT, /* ywrapstep */ 226 TYPE_INT, /* line_length */ 227 TYPE_ULONG, /* mmio_start */ 228 TYPE_INT, /* mmio_len */ 229 TYPE_INT, /* accel */ 230 MK_ARRAY(TYPE_CHAR, 3)) /* reserved */ 231 232 STRUCT(fb_var_screeninfo, 233 TYPE_INT, /* xres */ 234 TYPE_INT, /* yres */ 235 TYPE_INT, /* xres_virtual */ 236 TYPE_INT, /* yres_virtual */ 237 TYPE_INT, /* xoffset */ 238 TYPE_INT, /* yoffset */ 239 TYPE_INT, /* bits_per_pixel */ 240 TYPE_INT, /* grayscale */ 241 MK_ARRAY(TYPE_INT, 3), /* red */ 242 MK_ARRAY(TYPE_INT, 3), /* green */ 243 MK_ARRAY(TYPE_INT, 3), /* blue */ 244 MK_ARRAY(TYPE_INT, 3), /* transp */ 245 TYPE_INT, /* nonstd */ 246 TYPE_INT, /* activate */ 247 TYPE_INT, /* height */ 248 TYPE_INT, /* width */ 249 TYPE_INT, /* accel_flags */ 250 TYPE_INT, /* pixclock */ 251 TYPE_INT, /* left_margin */ 252 TYPE_INT, /* right_margin */ 253 TYPE_INT, /* upper_margin */ 254 TYPE_INT, /* lower_margin */ 255 TYPE_INT, /* hsync_len */ 256 TYPE_INT, /* vsync_len */ 257 TYPE_INT, /* sync */ 258 TYPE_INT, /* vmode */ 259 TYPE_INT, /* rotate */ 260 MK_ARRAY(TYPE_INT, 5)) /* reserved */ 261 262 STRUCT(fb_cmap, 263 TYPE_INT, /* start */ 264 TYPE_INT, /* len */ 265 TYPE_PTRVOID, /* red */ 266 TYPE_PTRVOID, /* green */ 267 TYPE_PTRVOID, /* blue */ 268 TYPE_PTRVOID) /* transp */ 269 270 STRUCT(fb_con2fbmap, 271 TYPE_INT, /* console */ 272 TYPE_INT) /* framebuffer */ 273 274 275 STRUCT(vt_stat, 276 TYPE_SHORT, /* v_active */ 277 TYPE_SHORT, /* v_signal */ 278 TYPE_SHORT) /* v_state */ 279 280 STRUCT(vt_mode, 281 TYPE_CHAR, /* mode */ 282 TYPE_CHAR, /* waitv */ 283 TYPE_SHORT, /* relsig */ 284 TYPE_SHORT, /* acqsig */ 285 TYPE_SHORT) /* frsig */ 286 287 STRUCT(dm_ioctl, 288 MK_ARRAY(TYPE_INT, 3), /* version */ 289 TYPE_INT, /* data_size */ 290 TYPE_INT, /* data_start */ 291 TYPE_INT, /* target_count*/ 292 TYPE_INT, /* open_count */ 293 TYPE_INT, /* flags */ 294 TYPE_INT, /* event_nr */ 295 TYPE_INT, /* padding */ 296 TYPE_ULONGLONG, /* dev */ 297 MK_ARRAY(TYPE_CHAR, 128), /* name */ 298 MK_ARRAY(TYPE_CHAR, 129), /* uuid */ 299 MK_ARRAY(TYPE_CHAR, 7)) /* data */ 300 301 STRUCT(dm_target_spec, 302 TYPE_ULONGLONG, /* sector_start */ 303 TYPE_ULONGLONG, /* length */ 304 TYPE_INT, /* status */ 305 TYPE_INT, /* next */ 306 MK_ARRAY(TYPE_CHAR, 16)) /* target_type */ 307 308 STRUCT(dm_target_deps, 309 TYPE_INT, /* count */ 310 TYPE_INT) /* padding */ 311 312 STRUCT(dm_name_list, 313 TYPE_ULONGLONG, /* dev */ 314 TYPE_INT) /* next */ 315 316 STRUCT(dm_target_versions, 317 TYPE_INT, /* next */ 318 MK_ARRAY(TYPE_INT, 3)) /* version*/ 319 320 STRUCT(dm_target_msg, 321 TYPE_ULONGLONG) /* sector */ 322 323 STRUCT(drm_version, 324 TYPE_INT, /* version_major */ 325 TYPE_INT, /* version_minor */ 326 TYPE_INT, /* version_patchlevel */ 327 TYPE_ULONG, /* name_len */ 328 TYPE_PTRVOID, /* name */ 329 TYPE_ULONG, /* date_len */ 330 TYPE_PTRVOID, /* date */ 331 TYPE_ULONG, /* desc_len */ 332 TYPE_PTRVOID) /* desc */ 333 334 STRUCT(drm_i915_getparam, 335 TYPE_INT, /* param */ 336 TYPE_PTRVOID) /* value */ 337 338 STRUCT(file_clone_range, 339 TYPE_LONGLONG, /* src_fd */ 340 TYPE_ULONGLONG, /* src_offset */ 341 TYPE_ULONGLONG, /* src_length */ 342 TYPE_ULONGLONG) /* dest_offset */ 343 344 STRUCT(fstrim_range, 345 TYPE_ULONGLONG, /* start */ 346 TYPE_ULONGLONG, /* len */ 347 TYPE_ULONGLONG) /* minlen */ 348 349 STRUCT(fiemap_extent, 350 TYPE_ULONGLONG, /* fe_logical */ 351 TYPE_ULONGLONG, /* fe_physical */ 352 TYPE_ULONGLONG, /* fe_length */ 353 MK_ARRAY(TYPE_ULONGLONG, 2), /* fe_reserved64[2] */ 354 TYPE_INT, /* fe_flags */ 355 MK_ARRAY(TYPE_INT, 3)) /* fe_reserved[3] */ 356 357 STRUCT(fiemap, 358 TYPE_ULONGLONG, /* fm_start */ 359 TYPE_ULONGLONG, /* fm_length */ 360 TYPE_INT, /* fm_flags */ 361 TYPE_INT, /* fm_mapped_extents */ 362 TYPE_INT, /* fm_extent_count */ 363 TYPE_INT) /* fm_reserved */ 364 365 STRUCT(blkpg_partition, 366 TYPE_LONGLONG, /* start */ 367 TYPE_LONGLONG, /* length */ 368 TYPE_INT, /* pno */ 369 MK_ARRAY(TYPE_CHAR, BLKPG_DEVNAMELTH), /* devname */ 370 MK_ARRAY(TYPE_CHAR, BLKPG_VOLNAMELTH)) /* volname */ 371 372 #if defined(BTRFS_IOC_SUBVOL_CREATE) || defined(BTRFS_IOC_SNAP_CREATE) || \ 373 defined(BTRFS_IOC_SNAP_DESTROY) || defined(BTRFS_IOC_SCAN_DEV) || \ 374 defined(BTRFS_IOC_FORGET_DEV) || defined(BTRFS_IOC_ADD_DEV) || \ 375 defined(BTRFS_IOC_RM_DEV) || defined(BTRFS_IOC_DEV_INFO) 376 STRUCT(btrfs_ioctl_vol_args, 377 TYPE_LONGLONG, /* fd */ 378 MK_ARRAY(TYPE_CHAR, BTRFS_PATH_NAME_MAX + 1)) /* name */ 379 #endif 380 381 #ifdef BTRFS_IOC_GET_SUBVOL_INFO 382 STRUCT(btrfs_ioctl_timespec, 383 TYPE_ULONGLONG, /* sec */ 384 TYPE_INT) /* nsec */ 385 386 STRUCT(btrfs_ioctl_get_subvol_info_args, 387 TYPE_ULONGLONG, /* treeid */ 388 MK_ARRAY(TYPE_CHAR, BTRFS_VOL_NAME_MAX + 1), 389 TYPE_ULONGLONG, /* parentid */ 390 TYPE_ULONGLONG, /* dirid */ 391 TYPE_ULONGLONG, /* generation */ 392 TYPE_ULONGLONG, /* flags */ 393 MK_ARRAY(TYPE_CHAR, BTRFS_UUID_SIZE), /* uuid */ 394 MK_ARRAY(TYPE_CHAR, BTRFS_UUID_SIZE), /* parent_uuid */ 395 MK_ARRAY(TYPE_CHAR, BTRFS_UUID_SIZE), /* received_uuid */ 396 TYPE_ULONGLONG, /* ctransid */ 397 TYPE_ULONGLONG, /* otransid */ 398 TYPE_ULONGLONG, /* stransid */ 399 TYPE_ULONGLONG, /* rtransid */ 400 MK_STRUCT(STRUCT_btrfs_ioctl_timespec), /* ctime */ 401 MK_STRUCT(STRUCT_btrfs_ioctl_timespec), /* otime */ 402 MK_STRUCT(STRUCT_btrfs_ioctl_timespec), /* stime */ 403 MK_STRUCT(STRUCT_btrfs_ioctl_timespec), /* rtime */ 404 MK_ARRAY(TYPE_ULONGLONG, 8)) /* reserved */ 405 #endif 406 407 #ifdef BTRFS_IOC_INO_LOOKUP 408 STRUCT(btrfs_ioctl_ino_lookup_args, 409 TYPE_ULONGLONG, /* treeid */ 410 TYPE_ULONGLONG, /* objectid */ 411 MK_ARRAY(TYPE_CHAR, BTRFS_INO_LOOKUP_PATH_MAX)) /* name */ 412 #endif 413 414 #ifdef BTRFS_IOC_INO_PATHS 415 STRUCT(btrfs_ioctl_ino_path_args, 416 TYPE_ULONGLONG, /* inum */ 417 TYPE_ULONGLONG, /* size */ 418 MK_ARRAY(TYPE_ULONGLONG, 4), /* reserved */ 419 TYPE_ULONGLONG) /* fspath */ 420 #endif 421 422 #if defined(BTRFS_IOC_LOGICAL_INO) || defined(BTRFS_IOC_LOGICAL_INO_V2) 423 STRUCT(btrfs_ioctl_logical_ino_args, 424 TYPE_ULONGLONG, /* logical */ 425 TYPE_ULONGLONG, /* size */ 426 MK_ARRAY(TYPE_ULONGLONG, 3), /* reserved */ 427 TYPE_ULONGLONG, /* flags */ 428 TYPE_ULONGLONG) /* inodes */ 429 #endif 430 431 #ifdef BTRFS_IOC_INO_LOOKUP_USER 432 STRUCT(btrfs_ioctl_ino_lookup_user_args, 433 TYPE_ULONGLONG, /* dirid */ 434 TYPE_ULONGLONG, /* treeid */ 435 MK_ARRAY(TYPE_CHAR, BTRFS_VOL_NAME_MAX + 1), /* name */ 436 MK_ARRAY(TYPE_CHAR, BTRFS_INO_LOOKUP_USER_PATH_MAX)) /* path */ 437 #endif 438 439 #if defined(BTRFS_IOC_SCRUB) || defined(BTRFS_IOC_SCRUB_PROGRESS) 440 STRUCT(btrfs_scrub_progress, 441 TYPE_ULONGLONG, /* data_extents_scrubbed */ 442 TYPE_ULONGLONG, /* tree_extents_scrubbed */ 443 TYPE_ULONGLONG, /* data_bytes_scrubbed */ 444 TYPE_ULONGLONG, /* tree_bytes_scrubbed */ 445 TYPE_ULONGLONG, /* read_errors */ 446 TYPE_ULONGLONG, /* csum_errors */ 447 TYPE_ULONGLONG, /* verify_errors */ 448 TYPE_ULONGLONG, /* no_csum */ 449 TYPE_ULONGLONG, /* csum_discards */ 450 TYPE_ULONGLONG, /* super_errors */ 451 TYPE_ULONGLONG, /* malloc_errors */ 452 TYPE_ULONGLONG, /* uncorrectable_errors */ 453 TYPE_ULONGLONG, /* corrected_er */ 454 TYPE_ULONGLONG, /* last_physical */ 455 TYPE_ULONGLONG) /* unverified_errors */ 456 457 STRUCT(btrfs_ioctl_scrub_args, 458 TYPE_ULONGLONG, /* devid */ 459 TYPE_ULONGLONG, /* start */ 460 TYPE_ULONGLONG, /* end */ 461 TYPE_ULONGLONG, /* flags */ 462 MK_STRUCT(STRUCT_btrfs_scrub_progress), /* progress */ 463 MK_ARRAY(TYPE_ULONGLONG, 464 (1024 - 32 - 465 sizeof(struct btrfs_scrub_progress)) / 8)) /* unused */ 466 #endif 467 468 #ifdef BTRFS_IOC_DEV_INFO 469 STRUCT(btrfs_ioctl_dev_info_args, 470 TYPE_ULONGLONG, /* devid */ 471 MK_ARRAY(TYPE_CHAR, BTRFS_UUID_SIZE), /* uuid */ 472 TYPE_ULONGLONG, /* bytes_used */ 473 TYPE_ULONGLONG, /* total_bytes */ 474 MK_ARRAY(TYPE_ULONGLONG, 379), /* unused */ 475 MK_ARRAY(TYPE_CHAR, BTRFS_DEVICE_PATH_NAME_MAX)) /* path */ 476 #endif 477 478 #ifdef BTRFS_IOC_GET_SUBVOL_ROOTREF 479 STRUCT(rootref, 480 TYPE_ULONGLONG, /* treeid */ 481 TYPE_ULONGLONG) /* dirid */ 482 483 STRUCT(btrfs_ioctl_get_subvol_rootref_args, 484 TYPE_ULONGLONG, /* min_treeid */ 485 MK_ARRAY(MK_STRUCT(STRUCT_rootref), 486 BTRFS_MAX_ROOTREF_BUFFER_NUM), /* rootref */ 487 TYPE_CHAR, /* num_items */ 488 MK_ARRAY(TYPE_CHAR, 7)) /* align */ 489 #endif 490 491 #ifdef BTRFS_IOC_GET_DEV_STATS 492 STRUCT(btrfs_ioctl_get_dev_stats, 493 TYPE_ULONGLONG, /* devid */ 494 TYPE_ULONGLONG, /* nr_items */ 495 TYPE_ULONGLONG, /* flags */ 496 MK_ARRAY(TYPE_ULONGLONG, BTRFS_DEV_STAT_VALUES_MAX), /* values */ 497 MK_ARRAY(TYPE_ULONGLONG, 498 128 - 2 - BTRFS_DEV_STAT_VALUES_MAX)) /* unused */ 499 #endif 500 501 STRUCT(btrfs_ioctl_quota_ctl_args, 502 TYPE_ULONGLONG, /* cmd */ 503 TYPE_ULONGLONG) /* status */ 504 505 STRUCT(btrfs_ioctl_quota_rescan_args, 506 TYPE_ULONGLONG, /* flags */ 507 TYPE_ULONGLONG, /* progress */ 508 MK_ARRAY(TYPE_ULONGLONG, 6)) /* reserved */ 509 510 STRUCT(btrfs_ioctl_qgroup_assign_args, 511 TYPE_ULONGLONG, /* assign */ 512 TYPE_ULONGLONG, /* src */ 513 TYPE_ULONGLONG) /* dst */ 514 515 STRUCT(btrfs_ioctl_qgroup_create_args, 516 TYPE_ULONGLONG, /* create */ 517 TYPE_ULONGLONG) /* qgroupid */ 518 519 STRUCT(btrfs_qgroup_limit, 520 TYPE_ULONGLONG, /* flags */ 521 TYPE_ULONGLONG, /* max_rfer */ 522 TYPE_ULONGLONG, /* max_excl */ 523 TYPE_ULONGLONG, /* rsv_rfer */ 524 TYPE_ULONGLONG) /* rsv_excl */ 525 526 STRUCT(btrfs_ioctl_qgroup_limit_args, 527 TYPE_ULONGLONG, /* qgroupid */ 528 MK_STRUCT(STRUCT_btrfs_qgroup_limit)) /* lim */ 529 530 STRUCT(btrfs_ioctl_feature_flags, 531 TYPE_ULONGLONG, /* compat_flags */ 532 TYPE_ULONGLONG, /* compat_ro_flags */ 533 TYPE_ULONGLONG) /* incompat_flags */ 534 535 STRUCT(rtc_time, 536 TYPE_INT, /* tm_sec */ 537 TYPE_INT, /* tm_min */ 538 TYPE_INT, /* tm_hour */ 539 TYPE_INT, /* tm_mday */ 540 TYPE_INT, /* tm_mon */ 541 TYPE_INT, /* tm_year */ 542 TYPE_INT, /* tm_wday */ 543 TYPE_INT, /* tm_yday */ 544 TYPE_INT) /* tm_isdst */ 545 546 STRUCT(rtc_wkalrm, 547 TYPE_CHAR, /* enabled */ 548 TYPE_CHAR, /* pending */ 549 MK_STRUCT(STRUCT_rtc_time)) /* time */ 550 551 STRUCT(rtc_pll_info, 552 TYPE_INT, /* pll_ctrl */ 553 TYPE_INT, /* pll_value */ 554 TYPE_INT, /* pll_max */ 555 TYPE_INT, /* pll_min */ 556 TYPE_INT, /* pll_posmult */ 557 TYPE_INT, /* pll_negmult */ 558 TYPE_LONG) /* pll_clock */ 559 560 STRUCT(blkpg_ioctl_arg, 561 TYPE_INT, /* op */ 562 TYPE_INT, /* flags */ 563 TYPE_INT, /* datalen */ 564 TYPE_PTRVOID) /* data */ 565 566 STRUCT(format_descr, 567 TYPE_INT, /* device */ 568 TYPE_INT, /* head */ 569 TYPE_INT) /* track */ 570 571 STRUCT(floppy_max_errors, 572 TYPE_INT, /* abort */ 573 TYPE_INT, /* read_track */ 574 TYPE_INT, /* reset */ 575 TYPE_INT, /* recal */ 576 TYPE_INT) /* reporting */ 577 578 #if defined(CONFIG_USBFS) 579 /* usb device ioctls */ 580 STRUCT(usbdevfs_ctrltransfer, 581 TYPE_CHAR, /* bRequestType */ 582 TYPE_CHAR, /* bRequest */ 583 TYPE_SHORT, /* wValue */ 584 TYPE_SHORT, /* wIndex */ 585 TYPE_SHORT, /* wLength */ 586 TYPE_INT, /* timeout */ 587 TYPE_PTRVOID) /* data */ 588 589 STRUCT(usbdevfs_bulktransfer, 590 TYPE_INT, /* ep */ 591 TYPE_INT, /* len */ 592 TYPE_INT, /* timeout */ 593 TYPE_PTRVOID) /* data */ 594 595 STRUCT(usbdevfs_setinterface, 596 TYPE_INT, /* interface */ 597 TYPE_INT) /* altsetting */ 598 599 STRUCT(usbdevfs_disconnectsignal, 600 TYPE_INT, /* signr */ 601 TYPE_PTRVOID) /* context */ 602 603 STRUCT(usbdevfs_getdriver, 604 TYPE_INT, /* interface */ 605 MK_ARRAY(TYPE_CHAR, USBDEVFS_MAXDRIVERNAME + 1)) /* driver */ 606 607 STRUCT(usbdevfs_connectinfo, 608 TYPE_INT, /* devnum */ 609 TYPE_CHAR) /* slow */ 610 611 STRUCT(usbdevfs_iso_packet_desc, 612 TYPE_INT, /* length */ 613 TYPE_INT, /* actual_length */ 614 TYPE_INT) /* status */ 615 616 STRUCT(usbdevfs_urb, 617 TYPE_CHAR, /* type */ 618 TYPE_CHAR, /* endpoint */ 619 TYPE_INT, /* status */ 620 TYPE_INT, /* flags */ 621 TYPE_PTRVOID, /* buffer */ 622 TYPE_INT, /* buffer_length */ 623 TYPE_INT, /* actual_length */ 624 TYPE_INT, /* start_frame */ 625 TYPE_INT, /* union number_of_packets stream_id */ 626 TYPE_INT, /* error_count */ 627 TYPE_INT, /* signr */ 628 TYPE_PTRVOID, /* usercontext */ 629 MK_ARRAY(MK_STRUCT(STRUCT_usbdevfs_iso_packet_desc), 0)) /* desc */ 630 631 STRUCT(usbdevfs_ioctl, 632 TYPE_INT, /* ifno */ 633 TYPE_INT, /* ioctl_code */ 634 TYPE_PTRVOID) /* data */ 635 636 STRUCT(usbdevfs_hub_portinfo, 637 TYPE_CHAR, /* nports */ 638 MK_ARRAY(TYPE_CHAR, 127)) /* port */ 639 640 STRUCT(usbdevfs_disconnect_claim, 641 TYPE_INT, /* interface */ 642 TYPE_INT, /* flags */ 643 MK_ARRAY(TYPE_CHAR, USBDEVFS_MAXDRIVERNAME + 1)) /* driver */ 644 #endif /* CONFIG_USBFS */ 645