@@ -1436,6 +1436,205 @@ pub(crate) fn mount(
1436
1436
}
1437
1437
}
1438
1438
1439
+ #[ allow( dead_code) ]
1440
+ #[ inline]
1441
+ pub ( crate ) fn fsopen ( fs_name : & CStr , flags : super :: types:: FsOpenFlags ) -> io:: Result < OwnedFd > {
1442
+ unsafe { ret_owned_fd ( syscall_readonly ! ( __NR_fsopen, fs_name, flags) ) }
1443
+ }
1444
+
1445
+ #[ allow( dead_code) ]
1446
+ #[ inline]
1447
+ pub ( crate ) fn fsmount (
1448
+ fs_fd : BorrowedFd < ' _ > ,
1449
+ flags : super :: types:: FsMountFlags ,
1450
+ attr_flags : super :: types:: MountAttrFlags ,
1451
+ ) -> io:: Result < ( ) > {
1452
+ unsafe { ret ( syscall_readonly ! ( __NR_fsmount, fs_fd, flags, attr_flags) ) }
1453
+ }
1454
+
1455
+ #[ allow( dead_code) ]
1456
+ #[ inline]
1457
+ pub ( crate ) fn move_mount (
1458
+ from_dfd : BorrowedFd < ' _ > ,
1459
+ from_pathname : & CStr ,
1460
+ to_dfd : BorrowedFd < ' _ > ,
1461
+ to_pathname : & CStr ,
1462
+ flags : super :: types:: MoveMountFlags ,
1463
+ ) -> io:: Result < ( ) > {
1464
+ unsafe {
1465
+ ret ( syscall_readonly ! (
1466
+ __NR_move_mount,
1467
+ from_dfd,
1468
+ from_pathname,
1469
+ to_dfd,
1470
+ to_pathname,
1471
+ flags
1472
+ ) )
1473
+ }
1474
+ }
1475
+
1476
+ #[ allow( dead_code) ]
1477
+ #[ inline]
1478
+ pub ( crate ) fn open_tree (
1479
+ dfd : BorrowedFd < ' _ > ,
1480
+ filename : & CStr ,
1481
+ flags : super :: types:: OpenTreeFlags ,
1482
+ ) -> io:: Result < OwnedFd > {
1483
+ unsafe { ret_owned_fd ( syscall_readonly ! ( __NR_open_tree, dfd, filename, flags) ) }
1484
+ }
1485
+
1486
+ #[ allow( dead_code) ]
1487
+ #[ inline]
1488
+ pub ( crate ) fn fspick (
1489
+ dfd : BorrowedFd < ' _ > ,
1490
+ path : & CStr ,
1491
+ flags : super :: types:: FsPickFlags ,
1492
+ ) -> io:: Result < OwnedFd > {
1493
+ unsafe { ret_owned_fd ( syscall_readonly ! ( __NR_fspick, dfd, path, flags) ) }
1494
+ }
1495
+
1496
+ #[ allow( dead_code) ]
1497
+ #[ inline]
1498
+ pub ( crate ) fn fsconfig_set_flag ( fs_fd : BorrowedFd < ' _ > , key : & CStr ) -> io:: Result < ( ) > {
1499
+ unsafe {
1500
+ ret ( syscall_readonly ! (
1501
+ __NR_fsconfig,
1502
+ fs_fd,
1503
+ super :: types:: FsConfigCmd :: SetFlag ,
1504
+ key,
1505
+ zero( ) ,
1506
+ zero( )
1507
+ ) )
1508
+ }
1509
+ }
1510
+
1511
+ #[ allow( dead_code) ]
1512
+ #[ inline]
1513
+ pub ( crate ) fn fsconfig_set_string (
1514
+ fs_fd : BorrowedFd < ' _ > ,
1515
+ key : & CStr ,
1516
+ value : & CStr ,
1517
+ ) -> io:: Result < ( ) > {
1518
+ unsafe {
1519
+ ret ( syscall_readonly ! (
1520
+ __NR_fsconfig,
1521
+ fs_fd,
1522
+ super :: types:: FsConfigCmd :: SetString ,
1523
+ key,
1524
+ value,
1525
+ zero( )
1526
+ ) )
1527
+ }
1528
+ }
1529
+
1530
+ #[ allow( dead_code) ]
1531
+ #[ inline]
1532
+ pub ( crate ) fn fsconfig_set_binary (
1533
+ fs_fd : BorrowedFd < ' _ > ,
1534
+ key : & CStr ,
1535
+ value : & [ u8 ] ,
1536
+ ) -> io:: Result < ( ) > {
1537
+ let ( value_addr, value_len) = slice ( value) ;
1538
+ unsafe {
1539
+ ret ( syscall_readonly ! (
1540
+ __NR_fsconfig,
1541
+ fs_fd,
1542
+ super :: types:: FsConfigCmd :: SetBinary ,
1543
+ key,
1544
+ value_addr,
1545
+ value_len
1546
+ ) )
1547
+ }
1548
+ }
1549
+
1550
+ #[ allow( dead_code) ]
1551
+ #[ inline]
1552
+ pub ( crate ) fn fsconfig_set_fd (
1553
+ fs_fd : BorrowedFd < ' _ > ,
1554
+ key : & CStr ,
1555
+ fd : BorrowedFd < ' _ > ,
1556
+ ) -> io:: Result < ( ) > {
1557
+ unsafe {
1558
+ ret ( syscall_readonly ! (
1559
+ __NR_fsconfig,
1560
+ fs_fd,
1561
+ super :: types:: FsConfigCmd :: SetFd ,
1562
+ key,
1563
+ zero( ) ,
1564
+ fd
1565
+ ) )
1566
+ }
1567
+ }
1568
+
1569
+ #[ allow( dead_code) ]
1570
+ #[ inline]
1571
+ pub ( crate ) fn fsconfig_set_path (
1572
+ fs_fd : BorrowedFd < ' _ > ,
1573
+ key : & CStr ,
1574
+ path : & CStr ,
1575
+ fd : BorrowedFd < ' _ > ,
1576
+ ) -> io:: Result < ( ) > {
1577
+ unsafe {
1578
+ ret ( syscall_readonly ! (
1579
+ __NR_fsconfig,
1580
+ fs_fd,
1581
+ super :: types:: FsConfigCmd :: SetPath ,
1582
+ key,
1583
+ path,
1584
+ fd
1585
+ ) )
1586
+ }
1587
+ }
1588
+
1589
+ #[ allow( dead_code) ]
1590
+ #[ inline]
1591
+ pub ( crate ) fn fsconfig_set_path_empty (
1592
+ fs_fd : BorrowedFd < ' _ > ,
1593
+ key : & CStr ,
1594
+ fd : BorrowedFd < ' _ > ,
1595
+ ) -> io:: Result < ( ) > {
1596
+ unsafe {
1597
+ ret ( syscall_readonly ! (
1598
+ __NR_fsconfig,
1599
+ fs_fd,
1600
+ super :: types:: FsConfigCmd :: SetPathEmpty ,
1601
+ key,
1602
+ cstr!( "" ) ,
1603
+ fd
1604
+ ) )
1605
+ }
1606
+ }
1607
+
1608
+ #[ allow( dead_code) ]
1609
+ #[ inline]
1610
+ pub ( crate ) fn fsconfig_create ( fs_fd : BorrowedFd < ' _ > ) -> io:: Result < ( ) > {
1611
+ unsafe {
1612
+ ret ( syscall_readonly ! (
1613
+ __NR_fsconfig,
1614
+ fs_fd,
1615
+ super :: types:: FsConfigCmd :: Create ,
1616
+ zero( ) ,
1617
+ zero( ) ,
1618
+ zero( )
1619
+ ) )
1620
+ }
1621
+ }
1622
+
1623
+ #[ allow( dead_code) ]
1624
+ #[ inline]
1625
+ pub ( crate ) fn fsconfig_reconfigure ( fs_fd : BorrowedFd < ' _ > ) -> io:: Result < ( ) > {
1626
+ unsafe {
1627
+ ret ( syscall_readonly ! (
1628
+ __NR_fsconfig,
1629
+ fs_fd,
1630
+ super :: types:: FsConfigCmd :: Reconfigure ,
1631
+ zero( ) ,
1632
+ zero( ) ,
1633
+ zero( )
1634
+ ) )
1635
+ }
1636
+ }
1637
+
1439
1638
#[ inline]
1440
1639
pub ( crate ) fn unmount ( target : & CStr , flags : super :: types:: UnmountFlags ) -> io:: Result < ( ) > {
1441
1640
unsafe { ret ( syscall_readonly ! ( __NR_umount2, target, flags) ) }
0 commit comments