… | |
… | |
1096 | const_eio (FALLOC_FL_KEEP_SIZE) |
1096 | const_eio (FALLOC_FL_KEEP_SIZE) |
1097 | const_eio (FALLOC_FL_PUNCH_HOLE) |
1097 | const_eio (FALLOC_FL_PUNCH_HOLE) |
1098 | const_eio (FALLOC_FL_COLLAPSE_RANGE) |
1098 | const_eio (FALLOC_FL_COLLAPSE_RANGE) |
1099 | const_eio (FALLOC_FL_ZERO_RANGE) |
1099 | const_eio (FALLOC_FL_ZERO_RANGE) |
1100 | |
1100 | |
|
|
1101 | const_eio (RENAME_NOREPLACE) |
|
|
1102 | const_eio (RENAME_EXCHANGE) |
|
|
1103 | const_eio (RENAME_WHITEOUT) |
|
|
1104 | |
1101 | const_eio (READDIR_DENTS) |
1105 | const_eio (READDIR_DENTS) |
1102 | const_eio (READDIR_DIRS_FIRST) |
1106 | const_eio (READDIR_DIRS_FIRST) |
1103 | const_eio (READDIR_STAT_ORDER) |
1107 | const_eio (READDIR_STAT_ORDER) |
1104 | const_eio (READDIR_FOUND_UNKNOWN) |
1108 | const_eio (READDIR_FOUND_UNKNOWN) |
1105 | |
1109 | |
… | |
… | |
1591 | |
1595 | |
1592 | REQ_SEND; |
1596 | REQ_SEND; |
1593 | } |
1597 | } |
1594 | |
1598 | |
1595 | void |
1599 | void |
|
|
1600 | aio_rename2 (SV8 *oldpath, SV8 *newpath, int flags = 0, SV *callback = &PL_sv_undef) |
|
|
1601 | PPCODE: |
|
|
1602 | { |
|
|
1603 | eio_wd wd2 = 0; |
|
|
1604 | dREQ; |
|
|
1605 | |
|
|
1606 | req->type = EIO_RENAME; |
|
|
1607 | req_set_path1 (req, oldpath); |
|
|
1608 | req_set_path (req, newpath, &req->sv2, &req->sv4, &wd2, &req->ptr2); |
|
|
1609 | req->int2 = flags; |
|
|
1610 | req->int3 = (long)wd2; |
|
|
1611 | |
|
|
1612 | REQ_SEND; |
|
|
1613 | } |
|
|
1614 | |
|
|
1615 | void |
1596 | aio_mknod (SV8 *pathname, int mode, UV dev, SV *callback = &PL_sv_undef) |
1616 | aio_mknod (SV8 *pathname, int mode, UV dev, SV *callback = &PL_sv_undef) |
1597 | PPCODE: |
1617 | PPCODE: |
1598 | { |
1618 | { |
1599 | dREQ; |
1619 | dREQ; |
1600 | |
1620 | |
… | |
… | |
1605 | |
1625 | |
1606 | REQ_SEND; |
1626 | REQ_SEND; |
1607 | } |
1627 | } |
1608 | |
1628 | |
1609 | void |
1629 | void |
1610 | aio_mtouch (SV8 *data, IV offset = 0, SV *length = &PL_sv_undef, int flags = 0, SV *callback = &PL_sv_undef) |
1630 | aio_mtouch (SV8 *data, IV offset = 0, SV *length = &PL_sv_undef, int flags = -1, SV *callback = &PL_sv_undef) |
1611 | ALIAS: |
1631 | ALIAS: |
1612 | aio_mtouch = EIO_MTOUCH |
1632 | aio_mtouch = EIO_MTOUCH |
1613 | aio_msync = EIO_MSYNC |
1633 | aio_msync = EIO_MSYNC |
1614 | PPCODE: |
1634 | PPCODE: |
1615 | { |
1635 | { |
1616 | STRLEN svlen; |
1636 | STRLEN svlen; |
1617 | char *svptr = SvPVbyte (data, svlen); |
1637 | char *svptr = SvPVbyte (data, svlen); |
1618 | UV len = SvUV (length); |
1638 | UV len = SvUV (length); |
|
|
1639 | |
|
|
1640 | if (flags < 0) |
|
|
1641 | flags = ix == EIO_MSYNC ? EIO_MS_SYNC : 0; |
1619 | |
1642 | |
1620 | if (offset < 0) |
1643 | if (offset < 0) |
1621 | offset += svlen; |
1644 | offset += svlen; |
1622 | |
1645 | |
1623 | if (offset < 0 || offset > svlen) |
1646 | if (offset < 0 || offset > svlen) |