1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529
|
/* libguestfs generated file
* WARNING: THIS FILE IS GENERATED FROM THE FOLLOWING FILES:
* generator/fish.ml
* and from the code in the generator/ subdirectory.
* ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST.
*
* Copyright (C) 2009-2023 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include "cmds-gperf.h"
#include "run.h"
struct command_entry acl_get_file_cmd_entry = {
.name = "acl-get-file",
.help = "NAME\n"
" acl-get-file - get the POSIX ACL attached to a file\n"
"\n"
"SYNOPSIS\n"
" acl-get-file path acltype\n"
"\n"
"DESCRIPTION\n"
" This function returns the POSIX Access Control List (ACL) attached to\n"
" \"path\". The ACL is returned in \"long text form\" (see acl(5)).\n"
"\n"
" The \"acltype\" parameter may be:\n"
"\n"
" \"access\"\n"
" Return the ordinary (access) ACL for any file, directory or other\n"
" filesystem object.\n"
"\n"
" \"default\"\n"
" Return the default ACL. Normally this only makes sense if \"path\" is\n"
" a directory.\n"
"\n"
"",
.synopsis = "acl-get-file path acltype",
.run = run_acl_get_file
};
struct command_entry aug_close_cmd_entry = {
.name = "aug-close",
.help = "NAME\n"
" aug-close - close the current Augeas handle\n"
"\n"
"SYNOPSIS\n"
" aug-close\n"
"\n"
"DESCRIPTION\n"
" Close the current Augeas handle and free up any resources used by it.\n"
" After calling this, you have to call \"aug_init\" again before you can use\n"
" any other Augeas functions.\n"
"\n"
"",
.synopsis = "aug-close",
.run = run_aug_close
};
struct command_entry aug_defnode_cmd_entry = {
.name = "aug-defnode",
.help = "NAME\n"
" aug-defnode - define an Augeas node\n"
"\n"
"SYNOPSIS\n"
" aug-defnode name expr val\n"
"\n"
"DESCRIPTION\n"
" Defines a variable \"name\" whose value is the result of evaluating\n"
" \"expr\".\n"
"\n"
" If \"expr\" evaluates to an empty nodeset, a node is created, equivalent\n"
" to calling \"aug_set\" \"expr\", \"val\". \"name\" will be the nodeset\n"
" containing that single node.\n"
"\n"
" On success this returns a pair containing the number of nodes in the\n"
" nodeset, and a boolean flag if a node was created.\n"
"\n"
"",
.synopsis = "aug-defnode name expr val",
.run = run_aug_defnode
};
struct command_entry aug_get_cmd_entry = {
.name = "aug-get",
.help = "NAME\n"
" aug-get - look up the value of an Augeas path\n"
"\n"
"SYNOPSIS\n"
" aug-get augpath\n"
"\n"
"DESCRIPTION\n"
" Look up the value associated with \"path\". If \"path\" matches exactly one\n"
" node, the \"value\" is returned.\n"
"\n"
"",
.synopsis = "aug-get augpath",
.run = run_aug_get
};
struct command_entry aug_save_cmd_entry = {
.name = "aug-save",
.help = "NAME\n"
" aug-save - write all pending Augeas changes to disk\n"
"\n"
"SYNOPSIS\n"
" aug-save\n"
"\n"
"DESCRIPTION\n"
" This writes all pending changes to disk.\n"
"\n"
" The flags which were passed to \"aug_init\" affect exactly how files are\n"
" saved.\n"
"\n"
"",
.synopsis = "aug-save",
.run = run_aug_save
};
struct command_entry aug_setm_cmd_entry = {
.name = "aug-setm",
.help = "NAME\n"
" aug-setm - set multiple Augeas nodes\n"
"\n"
"SYNOPSIS\n"
" aug-setm base sub val\n"
"\n"
"DESCRIPTION\n"
" Change multiple Augeas nodes in a single operation. \"base\" is an\n"
" expression matching multiple nodes. \"sub\" is a path expression relative\n"
" to \"base\". All nodes matching \"base\" are found, and then for each node,\n"
" \"sub\" is changed to \"val\". \"sub\" may also be \"NULL\" in which case the\n"
" \"base\" nodes are modified.\n"
"\n"
" This returns the number of nodes modified.\n"
"\n"
"",
.synopsis = "aug-setm base sub val",
.run = run_aug_setm
};
struct command_entry available_cmd_entry = {
.name = "available",
.help = "NAME\n"
" available - test availability of some parts of the API\n"
"\n"
"SYNOPSIS\n"
" available groups\n"
"\n"
"DESCRIPTION\n"
" This command is used to check the availability of some groups of\n"
" functionality in the appliance, which not all builds of the libguestfs\n"
" appliance will be able to provide.\n"
"\n"
" The libguestfs groups, and the functions that those groups correspond\n"
" to, are listed in \"AVAILABILITY\" in guestfs(3). You can also fetch this\n"
" list at runtime by calling \"available_all_groups\".\n"
"\n"
" The argument \"groups\" is a list of group names, eg: \"[\"inotify\",\n"
" \"augeas\"]\" would check for the availability of the Linux inotify\n"
" functions and Augeas (configuration file editing) functions.\n"
"\n"
" The command returns no error if *all* requested groups are available.\n"
"\n"
" It fails with an error if one or more of the requested groups is\n"
" unavailable in the appliance.\n"
"\n"
" If an unknown group name is included in the list of groups then an error\n"
" is always returned.\n"
"\n"
" *Notes:*\n"
"\n"
" * \"feature_available\" is the same as this call, but with a slightly\n"
" simpler to use API: that call returns a boolean true/false instead\n"
" of throwing an error.\n"
"\n"
" * You must call \"launch\" before calling this function.\n"
"\n"
" The reason is because we don't know what groups are supported by the\n"
" appliance/daemon until it is running and can be queried.\n"
"\n"
" * If a group of functions is available, this does not necessarily mean\n"
" that they will work. You still have to check for errors when calling\n"
" individual API functions even if they are available.\n"
"\n"
" * It is usually the job of distro packagers to build complete\n"
" functionality into the libguestfs appliance. Upstream libguestfs, if\n"
" built from source with all requirements satisfied, will support\n"
" everything.\n"
"\n"
" * This call was added in version 1.0.80. In previous versions of\n"
" libguestfs all you could do would be to speculatively execute a\n"
" command to find out if the daemon implemented it. See also\n"
" \"version\".\n"
"\n"
" See also \"filesystem_available\".\n"
"\n"
"",
.synopsis = "available groups",
.run = run_available
};
struct command_entry blkdiscard_cmd_entry = {
.name = "blkdiscard",
.help = "NAME\n"
" blkdiscard - discard all blocks on a device\n"
"\n"
"SYNOPSIS\n"
" blkdiscard device\n"
"\n"
"DESCRIPTION\n"
" This discards all blocks on the block device \"device\", giving the free\n"
" space back to the host.\n"
"\n"
" This operation requires support in libguestfs, the host filesystem, qemu\n"
" and the host kernel. If this support isn't present it may give an error\n"
" or even appear to run but do nothing. You must also set the \"discard\"\n"
" attribute on the underlying drive (see \"add_drive_opts\").\n"
"\n"
"",
.synopsis = "blkdiscard device",
.run = run_blkdiscard
};
struct command_entry blockdev_getsz_cmd_entry = {
.name = "blockdev-getsz",
.help = "NAME\n"
" blockdev-getsz - get total size of device in 512-byte sectors\n"
"\n"
"SYNOPSIS\n"
" blockdev-getsz device\n"
"\n"
"DESCRIPTION\n"
" This returns the size of the device in units of 512-byte sectors (even\n"
" if the sectorsize isn't 512 bytes ... weird).\n"
"\n"
" See also \"blockdev_getss\" for the real sector size of the device, and\n"
" \"blockdev_getsize64\" for the more useful *size in bytes*.\n"
"\n"
" This uses the blockdev(8) command.\n"
"\n"
"",
.synopsis = "blockdev-getsz device",
.run = run_blockdev_getsz
};
struct command_entry blockdev_setro_cmd_entry = {
.name = "blockdev-setro",
.help = "NAME\n"
" blockdev-setro - set block device to read-only\n"
"\n"
"SYNOPSIS\n"
" blockdev-setro device\n"
"\n"
"DESCRIPTION\n"
" Sets the block device named \"device\" to read-only.\n"
"\n"
" This uses the blockdev(8) command.\n"
"\n"
"",
.synopsis = "blockdev-setro device",
.run = run_blockdev_setro
};
struct command_entry btrfs_balance_status_cmd_entry = {
.name = "btrfs-balance-status",
.help = "NAME\n"
" btrfs-balance-status - show the status of a running or paused balance\n"
"\n"
"SYNOPSIS\n"
" btrfs-balance-status path\n"
"\n"
"DESCRIPTION\n"
" Show the status of a running or paused balance on a btrfs filesystem.\n"
"\n"
"",
.synopsis = "btrfs-balance-status path",
.run = run_btrfs_balance_status
};
struct command_entry btrfs_device_delete_cmd_entry = {
.name = "btrfs-device-delete",
.help = "NAME\n"
" btrfs-device-delete - remove devices from a btrfs filesystem\n"
"\n"
"SYNOPSIS\n"
" btrfs-device-delete devices fs\n"
"\n"
"DESCRIPTION\n"
" Remove the \"devices\" from the btrfs filesystem mounted at \"fs\". If\n"
" \"devices\" is an empty list, this does nothing.\n"
"\n"
"",
.synopsis = "btrfs-device-delete devices fs",
.run = run_btrfs_device_delete
};
struct command_entry btrfs_filesystem_defragment_cmd_entry = {
.name = "btrfs-filesystem-defragment",
.help = "NAME\n"
" btrfs-filesystem-defragment - defragment a file or directory\n"
"\n"
"SYNOPSIS\n"
" btrfs-filesystem-defragment path [flush:true|false] [compress:..]\n"
"\n"
"DESCRIPTION\n"
" Defragment a file or directory on a btrfs filesystem. compress is one of\n"
" zlib or lzo.\n"
"\n"
"",
.synopsis = "btrfs-filesystem-defragment path [flush:true|false] [compress:..]",
.run = run_btrfs_filesystem_defragment
};
struct command_entry btrfs_filesystem_resize_cmd_entry = {
.name = "btrfs-filesystem-resize",
.help = "NAME\n"
" btrfs-filesystem-resize - resize a btrfs filesystem\n"
"\n"
"SYNOPSIS\n"
" btrfs-filesystem-resize mountpoint [size:N]\n"
"\n"
"DESCRIPTION\n"
" This command resizes a btrfs filesystem.\n"
"\n"
" Note that unlike other resize calls, the filesystem has to be mounted\n"
" and the parameter is the mountpoint not the device (this is a\n"
" requirement of btrfs itself).\n"
"\n"
" The optional parameters are:\n"
"\n"
" \"size\"\n"
" The new size (in bytes) of the filesystem. If omitted, the\n"
" filesystem is resized to the maximum size.\n"
"\n"
" See also btrfs(8).\n"
"\n"
"",
.synopsis = "btrfs-filesystem-resize mountpoint [size:N]",
.run = run_btrfs_filesystem_resize
};
struct command_entry btrfs_filesystem_sync_cmd_entry = {
.name = "btrfs-filesystem-sync",
.help = "NAME\n"
" btrfs-filesystem-sync - sync a btrfs filesystem\n"
"\n"
"SYNOPSIS\n"
" btrfs-filesystem-sync fs\n"
"\n"
"DESCRIPTION\n"
" Force sync on the btrfs filesystem mounted at \"fs\".\n"
"\n"
"",
.synopsis = "btrfs-filesystem-sync fs",
.run = run_btrfs_filesystem_sync
};
struct command_entry btrfs_image_cmd_entry = {
.name = "btrfs-image",
.help = "NAME\n"
" btrfs-image - create an image of a btrfs filesystem\n"
"\n"
"SYNOPSIS\n"
" btrfs-image source image [compresslevel:N]\n"
"\n"
"DESCRIPTION\n"
" This is used to create an image of a btrfs filesystem. All data will be\n"
" zeroed, but metadata and the like is preserved.\n"
"\n"
"",
.synopsis = "btrfs-image source image [compresslevel:N]",
.run = run_btrfs_image
};
struct command_entry btrfs_qgroup_destroy_cmd_entry = {
.name = "btrfs-qgroup-destroy",
.help = "NAME\n"
" btrfs-qgroup-destroy - destroy a subvolume quota group\n"
"\n"
"SYNOPSIS\n"
" btrfs-qgroup-destroy qgroupid subvolume\n"
"\n"
"DESCRIPTION\n"
" Destroy a quota group.\n"
"\n"
"",
.synopsis = "btrfs-qgroup-destroy qgroupid subvolume",
.run = run_btrfs_qgroup_destroy
};
struct command_entry btrfs_subvolume_delete_cmd_entry = {
.name = "btrfs-subvolume-delete",
.help = "NAME\n"
" btrfs-subvolume-delete - delete a btrfs subvolume or snapshot\n"
"\n"
"SYNOPSIS\n"
" btrfs-subvolume-delete subvolume\n"
"\n"
"DESCRIPTION\n"
" Delete the named btrfs subvolume or snapshot.\n"
"\n"
"",
.synopsis = "btrfs-subvolume-delete subvolume",
.run = run_btrfs_subvolume_delete
};
struct command_entry btrfs_subvolume_list_cmd_entry = {
.name = "btrfs-subvolume-list",
.help = "NAME\n"
" btrfs-subvolume-list - list btrfs snapshots and subvolumes\n"
"\n"
"SYNOPSIS\n"
" btrfs-subvolume-list fs\n"
"\n"
"DESCRIPTION\n"
" List the btrfs snapshots and subvolumes of the btrfs filesystem which is\n"
" mounted at \"fs\".\n"
"\n"
"",
.synopsis = "btrfs-subvolume-list fs",
.run = run_btrfs_subvolume_list
};
struct command_entry btrfstune_enable_skinny_metadata_extent_refs_cmd_entry = {
.name = "btrfstune-enable-skinny-metadata-extent-refs",
.help = "NAME\n"
" btrfstune-enable-skinny-metadata-extent-refs - enable skinny metadata\n"
" extent refs\n"
"\n"
"SYNOPSIS\n"
" btrfstune-enable-skinny-metadata-extent-refs device\n"
"\n"
"DESCRIPTION\n"
" This enable skinny metadata extent refs.\n"
"\n"
"",
.synopsis = "btrfstune-enable-skinny-metadata-extent-refs device",
.run = run_btrfstune_enable_skinny_metadata_extent_refs
};
struct command_entry cap_get_file_cmd_entry = {
.name = "cap-get-file",
.help = "NAME\n"
" cap-get-file - get the Linux capabilities attached to a file\n"
"\n"
"SYNOPSIS\n"
" cap-get-file path\n"
"\n"
"DESCRIPTION\n"
" This function returns the Linux capabilities attached to \"path\". The\n"
" capabilities set is returned in text form (see cap_to_text(3)).\n"
"\n"
" If no capabilities are attached to a file, an empty string is returned.\n"
"\n"
"",
.synopsis = "cap-get-file path",
.run = run_cap_get_file
};
struct command_entry checksum_cmd_entry = {
.name = "checksum",
.help = "NAME\n"
" checksum - compute MD5, SHAx or CRC checksum of file\n"
"\n"
"SYNOPSIS\n"
" checksum csumtype path\n"
"\n"
"DESCRIPTION\n"
" This call computes the MD5, SHAx or CRC checksum of the file named\n"
" \"path\".\n"
"\n"
" The type of checksum to compute is given by the \"csumtype\" parameter\n"
" which must have one of the following values:\n"
"\n"
" \"crc\"\n"
" Compute the cyclic redundancy check (CRC) specified by POSIX for the\n"
" \"cksum\" command.\n"
"\n"
" \"gost\"\n"
" \"gost12\"\n"
" Compute the checksum using GOST R34.11-94 or GOST R34.11-2012\n"
" message digest.\n"
"\n"
" \"md5\"\n"
" Compute the MD5 hash (using the md5sum(1) program).\n"
"\n"
" \"sha1\"\n"
" Compute the SHA1 hash (using the sha1sum(1) program).\n"
"\n"
" \"sha224\"\n"
" Compute the SHA224 hash (using the sha224sum(1) program).\n"
"\n"
" \"sha256\"\n"
" Compute the SHA256 hash (using the sha256sum(1) program).\n"
"\n"
" \"sha384\"\n"
" Compute the SHA384 hash (using the sha384sum(1) program).\n"
"\n"
" \"sha512\"\n"
" Compute the SHA512 hash (using the sha512sum(1) program).\n"
"\n"
" The checksum is returned as a printable string.\n"
"\n"
" To get the checksum for a device, use \"checksum_device\".\n"
"\n"
" To get the checksums for many files, use \"checksums_out\".\n"
"\n"
"",
.synopsis = "checksum csumtype path",
.run = run_checksum
};
struct command_entry chmod_cmd_entry = {
.name = "chmod",
.help = "NAME\n"
" chmod - change file mode\n"
"\n"
"SYNOPSIS\n"
" chmod mode path\n"
"\n"
"DESCRIPTION\n"
" Change the mode (permissions) of \"path\" to \"mode\". Only numeric modes\n"
" are supported.\n"
"\n"
" *Note*: When using this command from guestfish, \"mode\" by default would\n"
" be decimal, unless you prefix it with 0 to get octal, ie. use 0700 not\n"
" 700.\n"
"\n"
" The mode actually set is affected by the umask.\n"
"\n"
"",
.synopsis = "chmod mode path",
.run = run_chmod
};
struct command_entry disk_create_cmd_entry = {
.name = "disk-create",
.help = "NAME\n"
" disk-create - create a blank disk image\n"
"\n"
"SYNOPSIS\n"
" disk-create filename format size [backingfile:..] [backingformat:..] [preallocation:..] [compat:..] [clustersize:N]\n"
"\n"
"DESCRIPTION\n"
" Create a blank disk image called filename (a host file) with format\n"
" \"format\" (usually \"raw\" or \"qcow2\"). The size is \"size\" bytes.\n"
"\n"
" If used with the optional \"backingfile\" parameter, then a snapshot is\n"
" created on top of the backing file. In this case, \"size\" must be passed\n"
" as -1. The size of the snapshot is the same as the size of the backing\n"
" file, which is discovered automatically. You are encouraged to also pass\n"
" \"backingformat\" to describe the format of \"backingfile\".\n"
"\n"
" If filename refers to a block device, then the device is formatted. The\n"
" \"size\" is ignored since block devices have an intrinsic size.\n"
"\n"
" The other optional parameters are:\n"
"\n"
" \"preallocation\"\n"
" If format is \"raw\", then this can be either \"off\" (or \"sparse\") or\n"
" \"full\" to create a sparse or fully allocated file respectively. The\n"
" default is \"off\".\n"
"\n"
" If format is \"qcow2\", then this can be \"off\" (or \"sparse\"),\n"
" \"metadata\" or \"full\". Preallocating metadata can be faster when\n"
" doing lots of writes, but uses more space. The default is \"off\".\n"
"\n"
" \"compat\"\n"
" \"qcow2\" only: Pass the string 1.1 to use the advanced qcow2 format\n"
" supported by qemu ≥ 1.1.\n"
"\n"
" \"clustersize\"\n"
" \"qcow2\" only: Change the qcow2 cluster size. The default is 65536\n"
" (bytes) and this setting may be any power of two between 512 and\n"
" 2097152.\n"
"\n"
" Note that this call does not add the new disk to the handle. You may\n"
" need to call \"add_drive_opts\" separately.\n"
"\n"
"",
.synopsis = "disk-create filename format size [backingfile:..] [backingformat:..] [preallocation:..] [compat:..] [clustersize:N]",
.run = run_disk_create
};
struct command_entry dmesg_cmd_entry = {
.name = "dmesg",
.help = "NAME\n"
" dmesg - return kernel messages\n"
"\n"
"SYNOPSIS\n"
" dmesg\n"
"\n"
"DESCRIPTION\n"
" This returns the kernel messages (dmesg(1) output) from the guest\n"
" kernel. This is sometimes useful for extended debugging of problems.\n"
"\n"
" Another way to get the same information is to enable verbose messages\n"
" with \"set_verbose\" or by setting the environment variable\n"
" \"LIBGUESTFS_DEBUG=1\" before running the program.\n"
"\n"
"",
.synopsis = "dmesg",
.run = run_dmesg
};
struct command_entry download_blocks_cmd_entry = {
.name = "download-blocks",
.help = "NAME\n"
" download-blocks - download the given data units from the disk\n"
"\n"
"SYNOPSIS\n"
" download-blocks device start stop filename [unallocated:true|false]\n"
"\n"
"DESCRIPTION\n"
" Download the data units from start address to stop from the disk\n"
" partition (eg. /dev/sda1) and save them as filename on the local\n"
" machine.\n"
"\n"
" The use of this API on sparse disk image formats such as QCOW, may\n"
" result in large zero-filled files downloaded on the host.\n"
"\n"
" The size of a data unit varies across filesystem implementations. On\n"
" NTFS filesystems data units are referred as clusters while on ExtX ones\n"
" they are referred as fragments.\n"
"\n"
" If the optional \"unallocated\" flag is true (default is false), only the\n"
" unallocated blocks will be extracted. This is useful to detect hidden\n"
" data or to retrieve deleted files which data units have not been\n"
" overwritten yet.\n"
"\n"
"",
.synopsis = "download-blocks device start stop filename [unallocated:true|false]",
.run = run_download_blocks
};
struct command_entry du_cmd_entry = {
.name = "du",
.help = "NAME\n"
" du - estimate file space usage\n"
"\n"
"SYNOPSIS\n"
" du path\n"
"\n"
"DESCRIPTION\n"
" This command runs the \"du -s\" command to estimate file space usage for\n"
" \"path\".\n"
"\n"
" \"path\" can be a file or a directory. If \"path\" is a directory then the\n"
" estimate includes the contents of the directory and all subdirectories\n"
" (recursively).\n"
"\n"
" The result is the estimated size in *kilobytes* (ie. units of 1024\n"
" bytes).\n"
"\n"
"",
.synopsis = "du path",
.run = run_du
};
struct command_entry e2fsck_f_cmd_entry = {
.name = "e2fsck-f",
.help = "NAME\n"
" e2fsck-f - check an ext2/ext3 filesystem\n"
"\n"
"SYNOPSIS\n"
" e2fsck-f device\n"
"\n"
"DESCRIPTION\n"
" This runs \"e2fsck -p -f device\", ie. runs the ext2/ext3 filesystem\n"
" checker on \"device\", noninteractively (*-p*), even if the filesystem\n"
" appears to be clean (*-f*).\n"
"\n"
" *This function is deprecated.* In new code, use the \"e2fsck\" call\n"
" instead.\n"
"\n"
" Deprecated functions will not be removed from the API, but the fact that\n"
" they are deprecated indicates that there are problems with correct use\n"
" of these functions.\n"
"\n"
"",
.synopsis = "e2fsck-f device",
.run = run_e2fsck_f
};
struct command_entry echo_daemon_cmd_entry = {
.name = "echo-daemon",
.help = "NAME\n"
" echo-daemon - echo arguments back to the client\n"
"\n"
"SYNOPSIS\n"
" echo-daemon words\n"
"\n"
"DESCRIPTION\n"
" This command concatenates the list of \"words\" passed with single spaces\n"
" between them and returns the resulting string.\n"
"\n"
" You can use this command to test the connection through to the daemon.\n"
"\n"
" See also \"ping_daemon\".\n"
"\n"
"",
.synopsis = "echo-daemon words",
.run = run_echo_daemon
};
struct command_entry equal_cmd_entry = {
.name = "equal",
.help = "NAME\n"
" equal - test if two files have equal contents\n"
"\n"
"SYNOPSIS\n"
" equal file1 file2\n"
"\n"
"DESCRIPTION\n"
" This compares the two files file1 and file2 and returns true if their\n"
" content is exactly equal, or false otherwise.\n"
"\n"
" The external cmp(1) program is used for the comparison.\n"
"\n"
"",
.synopsis = "equal file1 file2",
.run = run_equal
};
struct command_entry fgrepi_cmd_entry = {
.name = "fgrepi",
.help = "NAME\n"
" fgrepi - return lines matching a pattern\n"
"\n"
"SYNOPSIS\n"
" fgrepi pattern path\n"
"\n"
"DESCRIPTION\n"
" This calls the external \"fgrep -i\" program and returns the matching\n"
" lines.\n"
"\n"
" Because of the message protocol, there is a transfer limit of somewhere\n"
" between 2MB and 4MB. See \"PROTOCOL LIMITS\" in guestfs(3).\n"
"\n"
" *This function is deprecated.* In new code, use the \"grep\" call instead.\n"
"\n"
" Deprecated functions will not be removed from the API, but the fact that\n"
" they are deprecated indicates that there are problems with correct use\n"
" of these functions.\n"
"\n"
"",
.synopsis = "fgrepi pattern path",
.run = run_fgrepi
};
struct command_entry get_backend_setting_cmd_entry = {
.name = "get-backend-setting",
.help = "NAME\n"
" get-backend-setting - get a single per-backend settings string\n"
"\n"
"SYNOPSIS\n"
" get-backend-setting name\n"
"\n"
"DESCRIPTION\n"
" Find a backend setting string which is either \"name\" or begins with\n"
" \"name=\". If \"name\", this returns the string \"1\". If \"name=\", this\n"
" returns the part after the equals sign (which may be an empty string).\n"
"\n"
" If no such setting is found, this function throws an error. The errno\n"
" (see \"last_errno\") will be \"ESRCH\" in this case.\n"
"\n"
" See \"BACKEND\" in guestfs(3), \"BACKEND SETTINGS\" in guestfs(3).\n"
"\n"
"",
.synopsis = "get-backend-setting name",
.run = run_get_backend_setting
};
struct command_entry get_backend_settings_cmd_entry = {
.name = "get-backend-settings",
.help = "NAME\n"
" get-backend-settings - get per-backend settings\n"
"\n"
"SYNOPSIS\n"
" get-backend-settings\n"
"\n"
"DESCRIPTION\n"
" Return the current backend settings.\n"
"\n"
" This call returns all backend settings strings. If you want to find a\n"
" single backend setting, see \"get_backend_setting\".\n"
"\n"
" See \"BACKEND\" in guestfs(3), \"BACKEND SETTINGS\" in guestfs(3).\n"
"\n"
"",
.synopsis = "get-backend-settings",
.run = run_get_backend_settings
};
struct command_entry get_e2label_cmd_entry = {
.name = "get-e2label",
.help = "NAME\n"
" get-e2label - get the ext2/3/4 filesystem label\n"
"\n"
"SYNOPSIS\n"
" get-e2label device\n"
"\n"
"DESCRIPTION\n"
" This returns the ext2/3/4 filesystem label of the filesystem on\n"
" \"device\".\n"
"\n"
" *This function is deprecated.* In new code, use the \"vfs-label\" call\n"
" instead.\n"
"\n"
" Deprecated functions will not be removed from the API, but the fact that\n"
" they are deprecated indicates that there are problems with correct use\n"
" of these functions.\n"
"\n"
"",
.synopsis = "get-e2label device",
.run = run_get_e2label
};
struct command_entry get_recovery_proc_cmd_entry = {
.name = "get-recovery-proc",
.help = "NAME\n"
" get-recovery-proc - get recovery process enabled flag\n"
"\n"
"SYNOPSIS\n"
" get-recovery-proc\n"
"\n"
"DESCRIPTION\n"
" Return the recovery process enabled flag.\n"
"\n"
"",
.synopsis = "get-recovery-proc",
.run = run_get_recovery_proc
};
struct command_entry get_tmpdir_cmd_entry = {
.name = "get-tmpdir",
.help = "NAME\n"
" get-tmpdir - get the temporary directory\n"
"\n"
"SYNOPSIS\n"
" get-tmpdir\n"
"\n"
"DESCRIPTION\n"
" Get the directory used by the handle to store temporary files.\n"
"\n"
"",
.synopsis = "get-tmpdir",
.run = run_get_tmpdir
};
struct command_entry getcon_cmd_entry = {
.name = "getcon",
.help = "NAME\n"
" getcon - get SELinux security context\n"
"\n"
"SYNOPSIS\n"
" getcon\n"
"\n"
"DESCRIPTION\n"
" This gets the SELinux security context of the daemon.\n"
"\n"
" See the documentation about SELINUX in guestfs(3), and \"setcon\"\n"
"\n"
" *This function is deprecated.* In new code, use the \"selinux-relabel\"\n"
" call instead.\n"
"\n"
" Deprecated functions will not be removed from the API, but the fact that\n"
" they are deprecated indicates that there are problems with correct use\n"
" of these functions.\n"
"\n"
"",
.synopsis = "getcon",
.run = run_getcon
};
struct command_entry getxattr_cmd_entry = {
.name = "getxattr",
.help = "NAME\n"
" getxattr - get a single extended attribute\n"
"\n"
"SYNOPSIS\n"
" getxattr path name\n"
"\n"
"DESCRIPTION\n"
" Get a single extended attribute from file \"path\" named \"name\". This call\n"
" follows symlinks. If you want to lookup an extended attribute for the\n"
" symlink itself, use \"lgetxattr\".\n"
"\n"
" Normally it is better to get all extended attributes from a file in one\n"
" go by calling \"getxattrs\". However some Linux filesystem implementations\n"
" are buggy and do not provide a way to list out attributes. For these\n"
" filesystems (notably ntfs-3g) you have to know the names of the extended\n"
" attributes you want in advance and call this function.\n"
"\n"
" Extended attribute values are blobs of binary data. If there is no\n"
" extended attribute named \"name\", this returns an error.\n"
"\n"
" See also: \"getxattrs\", \"lgetxattr\", attr(5).\n"
"\n"
"",
.synopsis = "getxattr path name",
.run = run_getxattr
};
struct command_entry hivex_close_cmd_entry = {
.name = "hivex-close",
.help = "NAME\n"
" hivex-close - close the current hivex handle\n"
"\n"
"SYNOPSIS\n"
" hivex-close\n"
"\n"
"DESCRIPTION\n"
" Close the current hivex handle.\n"
"\n"
" This is a wrapper around the hivex(3) call of the same name.\n"
"\n"
"",
.synopsis = "hivex-close",
.run = run_hivex_close
};
struct command_entry hivex_open_cmd_entry = {
.name = "hivex-open",
.help = "NAME\n"
" hivex-open - open a Windows Registry hive file\n"
"\n"
"SYNOPSIS\n"
" hivex-open filename [verbose:true|false] [debug:true|false] [write:true|false] [unsafe:true|false]\n"
"\n"
"DESCRIPTION\n"
" Open the Windows Registry hive file named filename. If there was any\n"
" previous hivex handle associated with this guestfs session, then it is\n"
" closed.\n"
"\n"
" This is a wrapper around the hivex(3) call of the same name.\n"
"\n"
"",
.synopsis = "hivex-open filename [verbose:true|false] [debug:true|false] [write:true|false] [unsafe:true|false]",
.run = run_hivex_open
};
struct command_entry hivex_value_utf8_cmd_entry = {
.name = "hivex-value-utf8",
.help = "NAME\n"
" hivex-value-utf8 - return the data field as a UTF-8 string\n"
"\n"
"SYNOPSIS\n"
" hivex-value-utf8 valueh\n"
"\n"
"DESCRIPTION\n"
" This calls \"hivex_value_value\" (which returns the data field from a\n"
" hivex value tuple). It then assumes that the field is a UTF-16LE string\n"
" and converts the result to UTF-8 (or if this is not possible, it returns\n"
" an error).\n"
"\n"
" This is useful for reading strings out of the Windows registry. However\n"
" it is not foolproof because the registry is not strongly-typed and\n"
" fields can contain arbitrary or unexpected data.\n"
"\n"
" *This function is deprecated.* In new code, use the \"hivex-value-string\"\n"
" call instead.\n"
"\n"
" Deprecated functions will not be removed from the API, but the fact that\n"
" they are deprecated indicates that there are problems with correct use\n"
" of these functions.\n"
"\n"
"",
.synopsis = "hivex-value-utf8 valueh",
.run = run_hivex_value_utf8
};
struct command_entry inotify_add_watch_cmd_entry = {
.name = "inotify-add-watch",
.help = "NAME\n"
" inotify-add-watch - add an inotify watch\n"
"\n"
"SYNOPSIS\n"
" inotify-add-watch path mask\n"
"\n"
"DESCRIPTION\n"
" Watch \"path\" for the events listed in \"mask\".\n"
"\n"
" Note that if \"path\" is a directory then events within that directory are\n"
" watched, but this does *not* happen recursively (in subdirectories).\n"
"\n"
" Note for non-C or non-Linux callers: the inotify events are defined by\n"
" the Linux kernel ABI and are listed in /usr/include/sys/inotify.h.\n"
"\n"
"",
.synopsis = "inotify-add-watch path mask",
.run = run_inotify_add_watch
};
struct command_entry inotify_init_cmd_entry = {
.name = "inotify-init",
.help = "NAME\n"
" inotify-init - create an inotify handle\n"
"\n"
"SYNOPSIS\n"
" inotify-init maxevents\n"
"\n"
"DESCRIPTION\n"
" This command creates a new inotify handle. The inotify subsystem can be\n"
" used to notify events which happen to objects in the guest filesystem.\n"
"\n"
" \"maxevents\" is the maximum number of events which will be queued up\n"
" between calls to \"inotify_read\" or \"inotify_files\". If this is passed as\n"
" 0, then the kernel (or previously set) default is used. For Linux 2.6.29\n"
" the default was 16384 events. Beyond this limit, the kernel throws away\n"
" events, but records the fact that it threw them away by setting a flag\n"
" \"IN_Q_OVERFLOW\" in the returned structure list (see \"inotify_read\").\n"
"\n"
" Before any events are generated, you have to add some watches to the\n"
" internal watch list. See: \"inotify_add_watch\" and \"inotify_rm_watch\".\n"
"\n"
" Queued up events should be read periodically by calling \"inotify_read\"\n"
" (or \"inotify_files\" which is just a helpful wrapper around\n"
" \"inotify_read\"). If you don't read the events out often enough then you\n"
" risk the internal queue overflowing.\n"
"\n"
" The handle should be closed after use by calling \"inotify_close\". This\n"
" also removes any watches automatically.\n"
"\n"
" See also inotify(7) for an overview of the inotify interface as exposed\n"
" by the Linux kernel, which is roughly what we expose via libguestfs.\n"
" Note that there is one global inotify handle per libguestfs instance.\n"
"\n"
"",
.synopsis = "inotify-init maxevents",
.run = run_inotify_init
};
struct command_entry inspect_get_type_cmd_entry = {
.name = "inspect-get-type",
.help = "NAME\n"
" inspect-get-type - get type of inspected operating system\n"
"\n"
"SYNOPSIS\n"
" inspect-get-type root\n"
"\n"
"DESCRIPTION\n"
" This returns the type of the inspected operating system. Currently\n"
" defined types are:\n"
"\n"
" \"linux\"\n"
" Any Linux-based operating system.\n"
"\n"
" \"windows\"\n"
" Any Microsoft Windows operating system.\n"
"\n"
" \"freebsd\"\n"
" FreeBSD.\n"
"\n"
" \"netbsd\"\n"
" NetBSD.\n"
"\n"
" \"openbsd\"\n"
" OpenBSD.\n"
"\n"
" \"hurd\"\n"
" GNU/Hurd.\n"
"\n"
" \"dos\"\n"
" MS-DOS, FreeDOS and others.\n"
"\n"
" \"minix\"\n"
" MINIX.\n"
"\n"
" \"unknown\"\n"
" The operating system type could not be determined.\n"
"\n"
" Future versions of libguestfs may return other strings here. The caller\n"
" should be prepared to handle any string.\n"
"\n"
" Please read \"INSPECTION\" in guestfs(3) for more details.\n"
"\n"
"",
.synopsis = "inspect-get-type root",
.run = run_inspect_get_type
};
struct command_entry inspect_is_live_cmd_entry = {
.name = "inspect-is-live",
.help = "NAME\n"
" inspect-is-live - get live flag for install disk\n"
"\n"
"SYNOPSIS\n"
" inspect-is-live root\n"
"\n"
"DESCRIPTION\n"
" This is deprecated and always returns \"false\".\n"
"\n"
" Please read \"INSPECTION\" in guestfs(3) for more details.\n"
"\n"
" *This function is deprecated.* There is no replacement. Consult the API\n"
" documentation in guestfs(3) for further information.\n"
"\n"
" Deprecated functions will not be removed from the API, but the fact that\n"
" they are deprecated indicates that there are problems with correct use\n"
" of these functions.\n"
"\n"
"",
.synopsis = "inspect-is-live root",
.run = run_inspect_is_live
};
struct command_entry internal_exit_cmd_entry = {
.name = "internal-exit",
.help = "NAME\n"
" internal-exit - cause the daemon to exit (internal use only)\n"
"\n"
"SYNOPSIS\n"
" internal-exit\n"
"\n"
"DESCRIPTION\n"
" This function is used internally when testing the appliance.\n"
"\n"
"",
.synopsis = "internal-exit",
.run = run_internal_exit
};
struct command_entry is_dir_cmd_entry = {
.name = "is-dir",
.help = "NAME\n"
" is-dir - test if a directory\n"
"\n"
"SYNOPSIS\n"
" is-dir path [followsymlinks:true|false]\n"
"\n"
"DESCRIPTION\n"
" This returns \"true\" if and only if there is a directory with the given\n"
" \"path\" name. Note that it returns false for other objects like files.\n"
"\n"
" If the optional flag \"followsymlinks\" is true, then a symlink (or chain\n"
" of symlinks) that ends with a directory also causes the function to\n"
" return true.\n"
"\n"
" See also \"stat\".\n"
"\n"
" You can use 'is-dir-opts' as an alias for this command.\n"
"\n"
"",
.synopsis = "is-dir path [followsymlinks:true|false]",
.run = run_is_dir
};
struct command_entry is_file_cmd_entry = {
.name = "is-file",
.help = "NAME\n"
" is-file - test if a regular file\n"
"\n"
"SYNOPSIS\n"
" is-file path [followsymlinks:true|false]\n"
"\n"
"DESCRIPTION\n"
" This returns \"true\" if and only if there is a regular file with the\n"
" given \"path\" name. Note that it returns false for other objects like\n"
" directories.\n"
"\n"
" If the optional flag \"followsymlinks\" is true, then a symlink (or chain\n"
" of symlinks) that ends with a file also causes the function to return\n"
" true.\n"
"\n"
" See also \"stat\".\n"
"\n"
" You can use 'is-file-opts' as an alias for this command.\n"
"\n"
"",
.synopsis = "is-file path [followsymlinks:true|false]",
.run = run_is_file
};
struct command_entry is_whole_device_cmd_entry = {
.name = "is-whole-device",
.help = "NAME\n"
" is-whole-device - test if a device is a whole device\n"
"\n"
"SYNOPSIS\n"
" is-whole-device device\n"
"\n"
"DESCRIPTION\n"
" This returns \"true\" if and only if \"device\" refers to a whole block\n"
" device. That is, not a partition or a logical device.\n"
"\n"
"",
.synopsis = "is-whole-device device",
.run = run_is_whole_device
};
struct command_entry is_zero_device_cmd_entry = {
.name = "is-zero-device",
.help = "NAME\n"
" is-zero-device - test if a device contains all zero bytes\n"
"\n"
"SYNOPSIS\n"
" is-zero-device device\n"
"\n"
"DESCRIPTION\n"
" This returns true iff the device exists and contains all zero bytes.\n"
"\n"
" Note that for large devices this can take a long time to run.\n"
"\n"
"",
.synopsis = "is-zero-device device",
.run = run_is_zero_device
};
struct command_entry journal_get_realtime_usec_cmd_entry = {
.name = "journal-get-realtime-usec",
.help = "NAME\n"
" journal-get-realtime-usec - get the timestamp of the current journal\n"
" entry\n"
"\n"
"SYNOPSIS\n"
" journal-get-realtime-usec\n"
"\n"
"DESCRIPTION\n"
" Get the realtime (wallclock) timestamp of the current journal entry.\n"
"\n"
"",
.synopsis = "journal-get-realtime-usec",
.run = run_journal_get_realtime_usec
};
struct command_entry journal_set_data_threshold_cmd_entry = {
.name = "journal-set-data-threshold",
.help = "NAME\n"
" journal-set-data-threshold - set the data threshold for reading journal\n"
" entries\n"
"\n"
"SYNOPSIS\n"
" journal-set-data-threshold threshold\n"
"\n"
"DESCRIPTION\n"
" Set the data threshold for reading journal entries. This is a hint to\n"
" the journal that it may truncate data fields to this size when reading\n"
" them (note also that it may not truncate them). If you set this to 0,\n"
" then the threshold is unlimited.\n"
"\n"
" See also \"journal_get_data_threshold\".\n"
"\n"
"",
.synopsis = "journal-set-data-threshold threshold",
.run = run_journal_set_data_threshold
};
struct command_entry launch_cmd_entry = {
.name = "launch",
.help = "NAME\n"
" launch - launch the backend\n"
"\n"
"SYNOPSIS\n"
" launch\n"
"\n"
"DESCRIPTION\n"
" You should call this after configuring the handle (eg. adding drives)\n"
" but before performing any actions.\n"
"\n"
" Do not call \"launch\" twice on the same handle. Although it will not give\n"
" an error (for historical reasons), the precise behaviour when you do\n"
" this is not well defined. Handles are very cheap to create, so create a\n"
" new one for each launch.\n"
"\n"
" You can use 'run' as an alias for this command.\n"
"\n"
"",
.synopsis = "launch",
.run = run_launch
};
struct command_entry ldmtool_remove_all_cmd_entry = {
.name = "ldmtool-remove-all",
.help = "NAME\n"
" ldmtool-remove-all - remove all Windows dynamic disk volumes\n"
"\n"
"SYNOPSIS\n"
" ldmtool-remove-all\n"
"\n"
"DESCRIPTION\n"
" This is essentially the opposite of \"ldmtool_create_all\". It removes the\n"
" device mapper mappings for all Windows dynamic disk volumes\n"
"\n"
"",
.synopsis = "ldmtool-remove-all",
.run = run_ldmtool_remove_all
};
struct command_entry ldmtool_volume_hint_cmd_entry = {
.name = "ldmtool-volume-hint",
.help = "NAME\n"
" ldmtool-volume-hint - return the hint field of a Windows dynamic disk\n"
" volume\n"
"\n"
"SYNOPSIS\n"
" ldmtool-volume-hint diskgroup volume\n"
"\n"
"DESCRIPTION\n"
" Return the hint field of the volume named \"volume\" in the disk group\n"
" with GUID \"diskgroup\". This may not be defined, in which case the empty\n"
" string is returned. The hint field is often, though not always, the name\n"
" of a Windows drive, eg. \"E:\".\n"
"\n"
"",
.synopsis = "ldmtool-volume-hint diskgroup volume",
.run = run_ldmtool_volume_hint
};
struct command_entry ldmtool_volume_type_cmd_entry = {
.name = "ldmtool-volume-type",
.help = "NAME\n"
" ldmtool-volume-type - return the type of a Windows dynamic disk volume\n"
"\n"
"SYNOPSIS\n"
" ldmtool-volume-type diskgroup volume\n"
"\n"
"DESCRIPTION\n"
" Return the type of the volume named \"volume\" in the disk group with GUID\n"
" \"diskgroup\".\n"
"\n"
" Possible volume types that can be returned here include: \"simple\",\n"
" \"spanned\", \"striped\", \"mirrored\", \"raid5\". Other types may also be\n"
" returned.\n"
"\n"
"",
.synopsis = "ldmtool-volume-type diskgroup volume",
.run = run_ldmtool_volume_type
};
struct command_entry list_devices_cmd_entry = {
.name = "list-devices",
.help = "NAME\n"
" list-devices - list the block devices\n"
"\n"
"SYNOPSIS\n"
" list-devices\n"
"\n"
"DESCRIPTION\n"
" List all the block devices.\n"
"\n"
" The full block device names are returned, eg. /dev/sda.\n"
"\n"
" See also \"list_filesystems\".\n"
"\n"
"",
.synopsis = "list-devices",
.run = run_list_devices
};
struct command_entry list_filesystems_cmd_entry = {
.name = "list-filesystems",
.help = "NAME\n"
" list-filesystems - list filesystems\n"
"\n"
"SYNOPSIS\n"
" list-filesystems\n"
"\n"
"DESCRIPTION\n"
" This inspection command looks for filesystems on partitions, block\n"
" devices and logical volumes, returning a list of \"mountables\" containing\n"
" filesystems and their type.\n"
"\n"
" The return value is a hash, where the keys are the devices containing\n"
" filesystems, and the values are the filesystem types. For example:\n"
"\n"
" \"/dev/sda1\" => \"ntfs\"\n"
" \"/dev/sda2\" => \"ext2\"\n"
" \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
" \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
"\n"
" The key is not necessarily a block device. It may also be an opaque\n"
" ‘mountable’ string which can be passed to \"mount\".\n"
"\n"
" The value can have the special value \"unknown\", meaning the content of\n"
" the device is undetermined or empty. \"swap\" means a Linux swap\n"
" partition.\n"
"\n"
" In libguestfs ≤ 1.36 this command ran other libguestfs commands, which\n"
" might have included \"mount\" and \"umount\", and therefore you had to use\n"
" this soon after launch and only when nothing else was mounted. This\n"
" restriction is removed in libguestfs ≥ 1.38.\n"
"\n"
" Not all of the filesystems returned will be mountable. In particular,\n"
" swap partitions are returned in the list. Also this command does not\n"
" check that each filesystem found is valid and mountable, and some\n"
" filesystems might be mountable but require special options. Filesystems\n"
" may not all belong to a single logical operating system (use\n"
" \"inspect_os\" to look for OSes).\n"
"\n"
"",
.synopsis = "list-filesystems",
.run = run_list_filesystems
};
struct command_entry ls_cmd_entry = {
.name = "ls",
.help = "NAME\n"
" ls - list the files in a directory\n"
"\n"
"SYNOPSIS\n"
" ls directory\n"
"\n"
"DESCRIPTION\n"
" List the files in directory (relative to the root directory, there is no\n"
" cwd). The \".\" and \"..\" entries are not returned, but hidden files are\n"
" shown.\n"
"\n"
"",
.synopsis = "ls directory",
.run = run_ls
};
struct command_entry ls0_cmd_entry = {
.name = "ls0",
.help = "NAME\n"
" ls0 - get list of files in a directory\n"
"\n"
"SYNOPSIS\n"
" ls0 dir filenames\n"
"\n"
"DESCRIPTION\n"
" This specialized command is used to get a listing of the filenames in\n"
" the directory \"dir\". The list of filenames is written to the local file\n"
" filenames (on the host).\n"
"\n"
" In the output file, the filenames are separated by \"\\0\" characters.\n"
"\n"
" \".\" and \"..\" are not returned. The filenames are not sorted.\n"
"\n"
"",
.synopsis = "ls0 dir filenames",
.run = run_ls0
};
struct command_entry lstatns_cmd_entry = {
.name = "lstatns",
.help = "NAME\n"
" lstatns - get file information for a symbolic link\n"
"\n"
"SYNOPSIS\n"
" lstatns path\n"
"\n"
"DESCRIPTION\n"
" Returns file information for the given \"path\".\n"
"\n"
" This is the same as \"statns\" except that if \"path\" is a symbolic link,\n"
" then the link is stat-ed, not the file it refers to.\n"
"\n"
" This is the same as the lstat(2) system call.\n"
"\n"
"",
.synopsis = "lstatns path",
.run = run_lstatns
};
struct command_entry luks_uuid_cmd_entry = {
.name = "luks-uuid",
.help = "NAME\n"
" luks-uuid - get the UUID of a LUKS device\n"
"\n"
"SYNOPSIS\n"
" luks-uuid device\n"
"\n"
"DESCRIPTION\n"
" This returns the UUID of the LUKS device \"device\".\n"
"\n"
"",
.synopsis = "luks-uuid device",
.run = run_luks_uuid
};
struct command_entry lxattrlist_cmd_entry = {
.name = "lxattrlist",
.help = "NAME\n"
" lxattrlist - lgetxattr on multiple files\n"
"\n"
"SYNOPSIS\n"
" lxattrlist path names\n"
"\n"
"DESCRIPTION\n"
" This call allows you to get the extended attributes of multiple files,\n"
" where all files are in the directory \"path\". \"names\" is the list of\n"
" files from this directory.\n"
"\n"
" On return you get a flat list of xattr structs which must be interpreted\n"
" sequentially. The first xattr struct always has a zero-length\n"
" \"attrname\". \"attrval\" in this struct is zero-length to indicate there\n"
" was an error doing \"lgetxattr\" for this file, *or* is a C string which\n"
" is a decimal number (the number of following attributes for this file,\n"
" which could be \"0\"). Then after the first xattr struct are the zero or\n"
" more attributes for the first named file. This repeats for the second\n"
" and subsequent files.\n"
"\n"
" This call is intended for programs that want to efficiently list a\n"
" directory contents without making many round-trips. See also \"lstatlist\"\n"
" for a similarly efficient call for getting standard stats.\n"
"\n"
"",
.synopsis = "lxattrlist path names",
.run = run_lxattrlist
};
struct command_entry mkdir_mode_cmd_entry = {
.name = "mkdir-mode",
.help = "NAME\n"
" mkdir-mode - create a directory with a particular mode\n"
"\n"
"SYNOPSIS\n"
" mkdir-mode path mode\n"
"\n"
"DESCRIPTION\n"
" This command creates a directory, setting the initial permissions of the\n"
" directory to \"mode\".\n"
"\n"
" For common Linux filesystems, the actual mode which is set will be \"mode\n"
" & ~umask & 01777\". Non-native-Linux filesystems may interpret the mode\n"
" in other ways.\n"
"\n"
" See also \"mkdir\", \"umask\"\n"
"\n"
"",
.synopsis = "mkdir-mode path mode",
.run = run_mkdir_mode
};
struct command_entry mkdir_p_cmd_entry = {
.name = "mkdir-p",
.help = "NAME\n"
" mkdir-p - create a directory and parents\n"
"\n"
"SYNOPSIS\n"
" mkdir-p path\n"
"\n"
"DESCRIPTION\n"
" Create a directory named \"path\", creating any parent directories as\n"
" necessary. This is like the \"mkdir -p\" shell command.\n"
"\n"
"",
.synopsis = "mkdir-p path",
.run = run_mkdir_p
};
struct command_entry mke2fs_cmd_entry = {
.name = "mke2fs",
.help = "NAME\n"
" mke2fs - create an ext2/ext3/ext4 filesystem on device\n"
"\n"
"SYNOPSIS\n"
" mke2fs device [blockscount:N] [blocksize:N] [fragsize:N] [blockspergroup:N] [numberofgroups:N] [bytesperinode:N] [inodesize:N] [journalsize:N] [numberofinodes:N] [stridesize:N] [stripewidth:N] [maxonlineresize:N] [reservedblockspercentage:N] [mmpupdateinterval:N] [journaldevice:..] [label:..] [lastmounteddir:..] [creatoros:..] [fstype:..] [usagetype:..] [uuid:..] [forcecreate:true|false] [writesbandgrouponly:true|false] [lazyitableinit:true|false] [lazyjournalinit:true|false] [testfs:true|false] [discard:true|false] [quotatype:true|false] [extent:true|false] [filetype:true|false] [flexbg:true|false] [hasjournal:true|false] [journaldev:true|false] [largefile:true|false] [quota:true|false] [resizeinode:true|false] [sparsesuper:true|false] [uninitbg:true|false]\n"
"\n"
"DESCRIPTION\n"
" \"mke2fs\" is used to create an ext2, ext3, or ext4 filesystem on\n"
" \"device\".\n"
"\n"
" The optional \"blockscount\" is the size of the filesystem in blocks. If\n"
" omitted it defaults to the size of \"device\". Note if the filesystem is\n"
" too small to contain a journal, \"mke2fs\" will silently create an ext2\n"
" filesystem instead.\n"
"\n"
"",
.synopsis = "mke2fs device [blockscount:N] [blocksize:N] [fragsize:N] [blockspergroup:N] [numberofgroups:N] [bytesperinode:N] [inodesize:N] [journalsize:N] [numberofinodes:N] [stridesize:N] [stripewidth:N] [maxonlineresize:N] [reservedblockspercentage:N] [mmpupdateinterval:N] [journaldevice:..] [label:..] [lastmounteddir:..] [creatoros:..] [fstype:..] [usagetype:..] [uuid:..] [forcecreate:true|false] [writesbandgrouponly:true|false] [lazyitableinit:true|false] [lazyjournalinit:true|false] [testfs:true|false] [discard:true|false] [quotatype:true|false] [extent:true|false] [filetype:true|false] [flexbg:true|false] [hasjournal:true|false] [journaldev:true|false] [largefile:true|false] [quota:true|false] [resizeinode:true|false] [sparsesuper:true|false] [uninitbg:true|false]",
.run = run_mke2fs
};
struct command_entry mke2fs_JL_cmd_entry = {
.name = "mke2fs-JL",
.help = "NAME\n"
" mke2fs-JL - make ext2/3/4 filesystem with external journal\n"
"\n"
"SYNOPSIS\n"
" mke2fs-JL fstype blocksize device label\n"
"\n"
"DESCRIPTION\n"
" This creates an ext2/3/4 filesystem on \"device\" with an external journal\n"
" on the journal labeled \"label\".\n"
"\n"
" See also \"mke2journal_L\".\n"
"\n"
" *This function is deprecated.* In new code, use the \"mke2fs\" call\n"
" instead.\n"
"\n"
" Deprecated functions will not be removed from the API, but the fact that\n"
" they are deprecated indicates that there are problems with correct use\n"
" of these functions.\n"
"\n"
"",
.synopsis = "mke2fs-JL fstype blocksize device label",
.run = run_mke2fs_JL
};
struct command_entry mke2fs_JU_cmd_entry = {
.name = "mke2fs-JU",
.help = "NAME\n"
" mke2fs-JU - make ext2/3/4 filesystem with external journal\n"
"\n"
"SYNOPSIS\n"
" mke2fs-JU fstype blocksize device uuid\n"
"\n"
"DESCRIPTION\n"
" This creates an ext2/3/4 filesystem on \"device\" with an external journal\n"
" on the journal with UUID \"uuid\".\n"
"\n"
" See also \"mke2journal_U\".\n"
"\n"
" *This function is deprecated.* In new code, use the \"mke2fs\" call\n"
" instead.\n"
"\n"
" Deprecated functions will not be removed from the API, but the fact that\n"
" they are deprecated indicates that there are problems with correct use\n"
" of these functions.\n"
"\n"
"",
.synopsis = "mke2fs-JU fstype blocksize device uuid",
.run = run_mke2fs_JU
};
struct command_entry mke2journal_cmd_entry = {
.name = "mke2journal",
.help = "NAME\n"
" mke2journal - make ext2/3/4 external journal\n"
"\n"
"SYNOPSIS\n"
" mke2journal blocksize device\n"
"\n"
"DESCRIPTION\n"
" This creates an ext2 external journal on \"device\". It is equivalent to\n"
" the command:\n"
"\n"
" mke2fs -O journal_dev -b blocksize device\n"
"\n"
" *This function is deprecated.* In new code, use the \"mke2fs\" call\n"
" instead.\n"
"\n"
" Deprecated functions will not be removed from the API, but the fact that\n"
" they are deprecated indicates that there are problems with correct use\n"
" of these functions.\n"
"\n"
"",
.synopsis = "mke2journal blocksize device",
.run = run_mke2journal
};
struct command_entry mknod_b_cmd_entry = {
.name = "mknod-b",
.help = "NAME\n"
" mknod-b - make block device node\n"
"\n"
"SYNOPSIS\n"
" mknod-b mode devmajor devminor path\n"
"\n"
"DESCRIPTION\n"
" This call creates a block device node called \"path\" with mode \"mode\" and\n"
" device major/minor \"devmajor\" and \"devminor\". It is just a convenient\n"
" wrapper around \"mknod\".\n"
"\n"
" Unlike with \"mknod\", \"mode\" must contain only permissions bits.\n"
"\n"
" The mode actually set is affected by the umask.\n"
"\n"
"",
.synopsis = "mknod-b mode devmajor devminor path",
.run = run_mknod_b
};
struct command_entry mount_local_cmd_entry = {
.name = "mount-local",
.help = "NAME\n"
" mount-local - mount on the local filesystem\n"
"\n"
"SYNOPSIS\n"
" mount-local localmountpoint [readonly:true|false] [options:..] [cachetimeout:N] [debugcalls:true|false]\n"
"\n"
"DESCRIPTION\n"
" This call exports the libguestfs-accessible filesystem to a local\n"
" mountpoint (directory) called \"localmountpoint\". Ordinary reads and\n"
" writes to files and directories under \"localmountpoint\" are redirected\n"
" through libguestfs.\n"
"\n"
" If the optional \"readonly\" flag is set to true, then writes to the\n"
" filesystem return error \"EROFS\".\n"
"\n"
" \"options\" is a comma-separated list of mount options. See guestmount(1)\n"
" for some useful options.\n"
"\n"
" \"cachetimeout\" sets the timeout (in seconds) for cached directory\n"
" entries. The default is 60 seconds. See guestmount(1) for further\n"
" information.\n"
"\n"
" If \"debugcalls\" is set to true, then additional debugging information is\n"
" generated for every FUSE call.\n"
"\n"
" When \"mount_local\" returns, the filesystem is ready, but is not\n"
" processing requests (access to it will block). You have to call\n"
" \"mount_local_run\" to run the main loop.\n"
"\n"
" See \"MOUNT LOCAL\" in guestfs(3) for full documentation.\n"
"\n"
"",
.synopsis = "mount-local localmountpoint [readonly:true|false] [options:..] [cachetimeout:N] [debugcalls:true|false]",
.run = run_mount_local
};
struct command_entry ntfsresize_size_cmd_entry = {
.name = "ntfsresize-size",
.help = "NAME\n"
" ntfsresize-size - resize an NTFS filesystem (with size)\n"
"\n"
"SYNOPSIS\n"
" ntfsresize-size device size\n"
"\n"
"DESCRIPTION\n"
" This command is the same as \"ntfsresize\" except that it allows you to\n"
" specify the new size (in bytes) explicitly.\n"
"\n"
" *This function is deprecated.* In new code, use the \"ntfsresize\" call\n"
" instead.\n"
"\n"
" Deprecated functions will not be removed from the API, but the fact that\n"
" they are deprecated indicates that there are problems with correct use\n"
" of these functions.\n"
"\n"
"",
.synopsis = "ntfsresize-size device size",
.run = run_ntfsresize_size
};
struct command_entry part_del_cmd_entry = {
.name = "part-del",
.help = "NAME\n"
" part-del - delete a partition\n"
"\n"
"SYNOPSIS\n"
" part-del device partnum\n"
"\n"
"DESCRIPTION\n"
" This command deletes the partition numbered \"partnum\" on \"device\".\n"
"\n"
" Note that in the case of MBR partitioning, deleting an extended\n"
" partition also deletes any logical partitions it contains.\n"
"\n"
"",
.synopsis = "part-del device partnum",
.run = run_part_del
};
struct command_entry part_get_gpt_type_cmd_entry = {
.name = "part-get-gpt-type",
.help = "NAME\n"
" part-get-gpt-type - get the type GUID of a GPT partition\n"
"\n"
"SYNOPSIS\n"
" part-get-gpt-type device partnum\n"
"\n"
"DESCRIPTION\n"
" Return the type GUID of numbered GPT partition \"partnum\".\n"
"\n"
"",
.synopsis = "part-get-gpt-type device partnum",
.run = run_part_get_gpt_type
};
struct command_entry ping_daemon_cmd_entry = {
.name = "ping-daemon",
.help = "NAME\n"
" ping-daemon - ping the guest daemon\n"
"\n"
"SYNOPSIS\n"
" ping-daemon\n"
"\n"
"DESCRIPTION\n"
" This is a test probe into the guestfs daemon running inside the\n"
" libguestfs appliance. Calling this function checks that the daemon\n"
" responds to the ping message, without affecting the daemon or attached\n"
" block device(s) in any other way.\n"
"\n"
"",
.synopsis = "ping-daemon",
.run = run_ping_daemon
};
struct command_entry remove_drive_cmd_entry = {
.name = "remove-drive",
.help = "NAME\n"
" remove-drive - remove a disk image\n"
"\n"
"SYNOPSIS\n"
" remove-drive label\n"
"\n"
"DESCRIPTION\n"
" This call does nothing and returns an error.\n"
"\n"
" *This function is deprecated.* There is no replacement. Consult the API\n"
" documentation in guestfs(3) for further information.\n"
"\n"
" Deprecated functions will not be removed from the API, but the fact that\n"
" they are deprecated indicates that there are problems with correct use\n"
" of these functions.\n"
"\n"
"",
.synopsis = "remove-drive label",
.run = run_remove_drive
};
struct command_entry rm_cmd_entry = {
.name = "rm",
.help = "NAME\n"
" rm - remove a file\n"
"\n"
"SYNOPSIS\n"
" rm path\n"
"\n"
"DESCRIPTION\n"
" Remove the single file \"path\".\n"
"\n"
"",
.synopsis = "rm path",
.run = run_rm
};
struct command_entry rmdir_cmd_entry = {
.name = "rmdir",
.help = "NAME\n"
" rmdir - remove a directory\n"
"\n"
"SYNOPSIS\n"
" rmdir path\n"
"\n"
"DESCRIPTION\n"
" Remove the single directory \"path\".\n"
"\n"
"",
.synopsis = "rmdir path",
.run = run_rmdir
};
struct command_entry rsync_cmd_entry = {
.name = "rsync",
.help = "NAME\n"
" rsync - synchronize the contents of two directories\n"
"\n"
"SYNOPSIS\n"
" rsync src dest [archive:true|false] [deletedest:true|false]\n"
"\n"
"DESCRIPTION\n"
" This call may be used to copy or synchronize two directories under the\n"
" same libguestfs handle. This uses the rsync(1) program which uses a fast\n"
" algorithm that avoids copying files unnecessarily.\n"
"\n"
" \"src\" and \"dest\" are the source and destination directories. Files are\n"
" copied from \"src\" to \"dest\".\n"
"\n"
" The optional arguments are:\n"
"\n"
" \"archive\"\n"
" Turns on archive mode. This is the same as passing the *--archive*\n"
" flag to \"rsync\".\n"
"\n"
" \"deletedest\"\n"
" Delete files at the destination that do not exist at the source.\n"
"\n"
"",
.synopsis = "rsync src dest [archive:true|false] [deletedest:true|false]",
.run = run_rsync
};
struct command_entry set_backend_settings_cmd_entry = {
.name = "set-backend-settings",
.help = "NAME\n"
" set-backend-settings - replace per-backend settings strings\n"
"\n"
"SYNOPSIS\n"
" set-backend-settings settings\n"
"\n"
"DESCRIPTION\n"
" Set a list of zero or more settings which are passed through to the\n"
" current backend. Each setting is a string which is interpreted in a\n"
" backend-specific way, or ignored if not understood by the backend.\n"
"\n"
" The default value is an empty list, unless the environment variable\n"
" \"LIBGUESTFS_BACKEND_SETTINGS\" was set when the handle was created. This\n"
" environment variable contains a colon-separated list of settings.\n"
"\n"
" This call replaces all backend settings. If you want to replace a single\n"
" backend setting, see \"set_backend_setting\". If you want to clear a\n"
" single backend setting, see \"clear_backend_setting\".\n"
"\n"
" See \"BACKEND\" in guestfs(3), \"BACKEND SETTINGS\" in guestfs(3).\n"
"\n"
"",
.synopsis = "set-backend-settings settings",
.run = run_set_backend_settings
};
struct command_entry set_hv_cmd_entry = {
.name = "set-hv",
.help = "NAME\n"
" set-hv - set the hypervisor binary\n"
"\n"
"SYNOPSIS\n"
" set-hv hv\n"
"\n"
"DESCRIPTION\n"
" Set the hypervisor binary that we will use. The hypervisor depends on\n"
" the backend, but is usually the location of the qemu/KVM hypervisor.\n"
"\n"
" The default is chosen when the library was compiled by the configure\n"
" script.\n"
"\n"
" You can also override this by setting the \"LIBGUESTFS_HV\" environment\n"
" variable.\n"
"\n"
" Note that you should call this function as early as possible after\n"
" creating the handle. This is because some pre-launch operations depend\n"
" on testing qemu features (by running \"qemu -help\"). If the qemu binary\n"
" changes, we don't retest features, and so you might see inconsistent\n"
" results. Using the environment variable \"LIBGUESTFS_HV\" is safest of all\n"
" since that picks the qemu binary at the same time as the handle is\n"
" created.\n"
"\n"
" You can use 'hv' as an alias for this command.\n"
"\n"
"",
.synopsis = "set-hv hv",
.run = run_set_hv
};
struct command_entry set_qemu_cmd_entry = {
.name = "set-qemu",
.help = "NAME\n"
" set-qemu - set the hypervisor binary (usually qemu)\n"
"\n"
"SYNOPSIS\n"
" set-qemu hv\n"
"\n"
"DESCRIPTION\n"
" Set the hypervisor binary (usually qemu) that we will use.\n"
"\n"
" The default is chosen when the library was compiled by the configure\n"
" script.\n"
"\n"
" You can also override this by setting the \"LIBGUESTFS_HV\" environment\n"
" variable.\n"
"\n"
" Setting \"hv\" to \"NULL\" restores the default qemu binary.\n"
"\n"
" Note that you should call this function as early as possible after\n"
" creating the handle. This is because some pre-launch operations depend\n"
" on testing qemu features (by running \"qemu -help\"). If the qemu binary\n"
" changes, we don't retest features, and so you might see inconsistent\n"
" results. Using the environment variable \"LIBGUESTFS_HV\" is safest of all\n"
" since that picks the qemu binary at the same time as the handle is\n"
" created.\n"
"\n"
" *This function is deprecated.* In new code, use the \"set-hv\" call\n"
" instead.\n"
"\n"
" Deprecated functions will not be removed from the API, but the fact that\n"
" they are deprecated indicates that there are problems with correct use\n"
" of these functions.\n"
"\n"
" You can use 'qemu' as an alias for this command.\n"
"\n"
"",
.synopsis = "set-qemu hv",
.run = run_set_qemu
};
struct command_entry set_recovery_proc_cmd_entry = {
.name = "set-recovery-proc",
.help = "NAME\n"
" set-recovery-proc - enable or disable the recovery process\n"
"\n"
"SYNOPSIS\n"
" set-recovery-proc recoveryproc\n"
"\n"
"DESCRIPTION\n"
" If this is called with the parameter \"false\" then \"launch\" does not\n"
" create a recovery process. The purpose of the recovery process is to\n"
" stop runaway hypervisor processes in the case where the main program\n"
" aborts abruptly.\n"
"\n"
" This only has any effect if called before \"launch\", and the default is\n"
" true.\n"
"\n"
" About the only time when you would want to disable this is if the main\n"
" process will fork itself into the background (\"daemonize\" itself). In\n"
" this case the recovery process thinks that the main program has\n"
" disappeared and so kills the hypervisor, which is not very helpful.\n"
"\n"
" You can use 'recovery-proc' as an alias for this command.\n"
"\n"
"",
.synopsis = "set-recovery-proc recoveryproc",
.run = run_set_recovery_proc
};
struct command_entry set_uuid_cmd_entry = {
.name = "set-uuid",
.help = "NAME\n"
" set-uuid - set the filesystem UUID\n"
"\n"
"SYNOPSIS\n"
" set-uuid device uuid\n"
"\n"
"DESCRIPTION\n"
" Set the filesystem UUID on \"device\" to \"uuid\". If this fails and the\n"
" errno is ENOTSUP, means that there is no support for changing the UUID\n"
" for the type of the specified filesystem.\n"
"\n"
" Only some filesystem types support setting UUIDs.\n"
"\n"
" To read the UUID on a filesystem, call \"vfs_uuid\".\n"
"\n"
"",
.synopsis = "set-uuid device uuid",
.run = run_set_uuid
};
struct command_entry setcon_cmd_entry = {
.name = "setcon",
.help = "NAME\n"
" setcon - set SELinux security context\n"
"\n"
"SYNOPSIS\n"
" setcon context\n"
"\n"
"DESCRIPTION\n"
" This sets the SELinux security context of the daemon to the string\n"
" \"context\".\n"
"\n"
" See the documentation about SELINUX in guestfs(3).\n"
"\n"
" *This function is deprecated.* In new code, use the \"selinux-relabel\"\n"
" call instead.\n"
"\n"
" Deprecated functions will not be removed from the API, but the fact that\n"
" they are deprecated indicates that there are problems with correct use\n"
" of these functions.\n"
"\n"
"",
.synopsis = "setcon context",
.run = run_setcon
};
struct command_entry statvfs_cmd_entry = {
.name = "statvfs",
.help = "NAME\n"
" statvfs - get file system statistics\n"
"\n"
"SYNOPSIS\n"
" statvfs path\n"
"\n"
"DESCRIPTION\n"
" Returns file system statistics for any mounted file system. \"path\"\n"
" should be a file or directory in the mounted file system (typically it\n"
" is the mount point itself, but it doesn't need to be).\n"
"\n"
" This is the same as the statvfs(2) system call.\n"
"\n"
"",
.synopsis = "statvfs path",
.run = run_statvfs
};
struct command_entry strings_cmd_entry = {
.name = "strings",
.help = "NAME\n"
" strings - print the printable strings in a file\n"
"\n"
"SYNOPSIS\n"
" strings path\n"
"\n"
"DESCRIPTION\n"
" This runs the strings(1) command on a file and returns the list of\n"
" printable strings found.\n"
"\n"
" The \"strings\" command has, in the past, had problems with parsing\n"
" untrusted files. These are mitigated in the current version of\n"
" libguestfs, but see \"CVE-2014-8484\" in guestfs(3).\n"
"\n"
" Because of the message protocol, there is a transfer limit of somewhere\n"
" between 2MB and 4MB. See \"PROTOCOL LIMITS\" in guestfs(3).\n"
"\n"
"",
.synopsis = "strings path",
.run = run_strings
};
struct command_entry swapoff_label_cmd_entry = {
.name = "swapoff-label",
.help = "NAME\n"
" swapoff-label - disable swap on labeled swap partition\n"
"\n"
"SYNOPSIS\n"
" swapoff-label label\n"
"\n"
"DESCRIPTION\n"
" This command disables the libguestfs appliance swap on labeled swap\n"
" partition.\n"
"\n"
"",
.synopsis = "swapoff-label label",
.run = run_swapoff_label
};
struct command_entry swapoff_uuid_cmd_entry = {
.name = "swapoff-uuid",
.help = "NAME\n"
" swapoff-uuid - disable swap on swap partition by UUID\n"
"\n"
"SYNOPSIS\n"
" swapoff-uuid uuid\n"
"\n"
"DESCRIPTION\n"
" This command disables the libguestfs appliance swap partition with the\n"
" given UUID.\n"
"\n"
"",
.synopsis = "swapoff-uuid uuid",
.run = run_swapoff_uuid
};
struct command_entry tar_in_cmd_entry = {
.name = "tar-in",
.help = "NAME\n"
" tar-in - unpack tarfile to directory\n"
"\n"
"SYNOPSIS\n"
" tar-in tarfile directory [compress:..] [xattrs:true|false] [selinux:true|false] [acls:true|false]\n"
"\n"
"DESCRIPTION\n"
" This command uploads and unpacks local file \"tarfile\" into directory.\n"
"\n"
" The optional \"compress\" flag controls compression. If not given, then\n"
" the input should be an uncompressed tar file. Otherwise one of the\n"
" following strings may be given to select the compression type of the\n"
" input file: \"compress\", \"gzip\", \"bzip2\", \"xz\", \"lzop\", \"lzma\", \"zstd\".\n"
" (Note that not all builds of libguestfs will support all of these\n"
" compression types).\n"
"\n"
" The other optional arguments are:\n"
"\n"
" \"xattrs\"\n"
" If set to true, extended attributes are restored from the tar file.\n"
"\n"
" \"selinux\"\n"
" If set to true, SELinux contexts are restored from the tar file.\n"
"\n"
" \"acls\"\n"
" If set to true, POSIX ACLs are restored from the tar file.\n"
"\n"
" You can use 'tar-in-opts' as an alias for this command.\n"
"\n"
"",
.synopsis = "tar-in tarfile directory [compress:..] [xattrs:true|false] [selinux:true|false] [acls:true|false]",
.run = run_tar_in
};
struct command_entry truncate_cmd_entry = {
.name = "truncate",
.help = "NAME\n"
" truncate - truncate a file to zero size\n"
"\n"
"SYNOPSIS\n"
" truncate path\n"
"\n"
"DESCRIPTION\n"
" This command truncates \"path\" to a zero-length file. The file must exist\n"
" already.\n"
"\n"
"",
.synopsis = "truncate path",
.run = run_truncate
};
struct command_entry tune2fs_cmd_entry = {
.name = "tune2fs",
.help = "NAME\n"
" tune2fs - adjust ext2/ext3/ext4 filesystem parameters\n"
"\n"
"SYNOPSIS\n"
" tune2fs device [force:true|false] [maxmountcount:N] [mountcount:N] [errorbehavior:..] [group:N] [intervalbetweenchecks:N] [reservedblockspercentage:N] [lastmounteddirectory:..] [reservedblockscount:N] [user:N]\n"
"\n"
"DESCRIPTION\n"
" This call allows you to adjust various filesystem parameters of an\n"
" ext2/ext3/ext4 filesystem called \"device\".\n"
"\n"
" The optional parameters are:\n"
"\n"
" \"force\"\n"
" Force tune2fs to complete the operation even in the face of errors.\n"
" This is the same as the tune2fs(8) \"-f\" option.\n"
"\n"
" \"maxmountcount\"\n"
" Set the number of mounts after which the filesystem is checked by\n"
" e2fsck(8). If this is 0 then the number of mounts is disregarded.\n"
" This is the same as the tune2fs(8) \"-c\" option.\n"
"\n"
" \"mountcount\"\n"
" Set the number of times the filesystem has been mounted. This is the\n"
" same as the tune2fs(8) \"-C\" option.\n"
"\n"
" \"errorbehavior\"\n"
" Change the behavior of the kernel code when errors are detected.\n"
" Possible values currently are: \"continue\", \"remount-ro\", \"panic\". In\n"
" practice these options don't really make any difference,\n"
" particularly for write errors.\n"
"\n"
" This is the same as the tune2fs(8) \"-e\" option.\n"
"\n"
" \"group\"\n"
" Set the group which can use reserved filesystem blocks. This is the\n"
" same as the tune2fs(8) \"-g\" option except that it can only be\n"
" specified as a number.\n"
"\n"
" \"intervalbetweenchecks\"\n"
" Adjust the maximal time between two filesystem checks (in seconds).\n"
" If the option is passed as 0 then time-dependent checking is\n"
" disabled.\n"
"\n"
" This is the same as the tune2fs(8) \"-i\" option.\n"
"\n"
" \"reservedblockspercentage\"\n"
" Set the percentage of the filesystem which may only be allocated by\n"
" privileged processes. This is the same as the tune2fs(8) \"-m\"\n"
" option.\n"
"\n"
" \"lastmounteddirectory\"\n"
" Set the last mounted directory. This is the same as the tune2fs(8)\n"
" \"-M\" option.\n"
"\n"
" \"reservedblockscount\" Set the number of reserved filesystem blocks. This\n"
" is the same as the tune2fs(8) \"-r\" option.\n"
" \"user\"\n"
" Set the user who can use the reserved filesystem blocks. This is the\n"
" same as the tune2fs(8) \"-u\" option except that it can only be\n"
" specified as a number.\n"
"\n"
" To get the current values of filesystem parameters, see \"tune2fs_l\". For\n"
" precise details of how tune2fs works, see the tune2fs(8) man page.\n"
"\n"
"",
.synopsis = "tune2fs device [force:true|false] [maxmountcount:N] [mountcount:N] [errorbehavior:..] [group:N] [intervalbetweenchecks:N] [reservedblockspercentage:N] [lastmounteddirectory:..] [reservedblockscount:N] [user:N]",
.run = run_tune2fs
};
struct command_entry upload_cmd_entry = {
.name = "upload",
.help = "NAME\n"
" upload - upload a file from the local machine\n"
"\n"
"SYNOPSIS\n"
" upload filename remotefilename\n"
"\n"
"DESCRIPTION\n"
" Upload local file filename to remotefilename on the filesystem.\n"
"\n"
" filename can also be a named pipe.\n"
"\n"
" See also \"download\".\n"
"\n"
"",
.synopsis = "upload filename remotefilename",
.run = run_upload
};
struct command_entry utimens_cmd_entry = {
.name = "utimens",
.help = "NAME\n"
" utimens - set timestamp of a file with nanosecond precision\n"
"\n"
"SYNOPSIS\n"
" utimens path atsecs atnsecs mtsecs mtnsecs\n"
"\n"
"DESCRIPTION\n"
" This command sets the timestamps of a file with nanosecond precision.\n"
"\n"
" \"atsecs\", \"atnsecs\" are the last access time (atime) in secs and\n"
" nanoseconds from the epoch.\n"
"\n"
" \"mtsecs\", \"mtnsecs\" are the last modification time (mtime) in secs and\n"
" nanoseconds from the epoch.\n"
"\n"
" If the *nsecs field contains the special value -1 then the corresponding\n"
" timestamp is set to the current time. (The *secs field is ignored in\n"
" this case).\n"
"\n"
" If the *nsecs field contains the special value -2 then the corresponding\n"
" timestamp is left unchanged. (The *secs field is ignored in this case).\n"
"\n"
"",
.synopsis = "utimens path atsecs atnsecs mtsecs mtnsecs",
.run = run_utimens
};
struct command_entry version_cmd_entry = {
.name = "version",
.help = "NAME\n"
" version - get the library version number\n"
"\n"
"SYNOPSIS\n"
" version\n"
"\n"
"DESCRIPTION\n"
" Return the libguestfs version number that the program is linked against.\n"
"\n"
" Note that because of dynamic linking this is not necessarily the version\n"
" of libguestfs that you compiled against. You can compile the program,\n"
" and then at runtime dynamically link against a completely different\n"
" libguestfs.so library.\n"
"\n"
" This call was added in version 1.0.58. In previous versions of\n"
" libguestfs there was no way to get the version number. From C code you\n"
" can use dynamic linker functions to find out if this symbol exists (if\n"
" it doesn't, then it’s an earlier version).\n"
"\n"
" The call returns a structure with four elements. The first three\n"
" (\"major\", \"minor\" and \"release\") are numbers and correspond to the usual\n"
" version triplet. The fourth element (\"extra\") is a string and is\n"
" normally empty, but may be used for distro-specific information.\n"
"\n"
" To construct the original version string: \"$major.$minor.$release$extra\"\n"
"\n"
" See also: \"LIBGUESTFS VERSION NUMBERS\" in guestfs(3).\n"
"\n"
" *Note:* Don't use this call to test for availability of features. In\n"
" enterprise distributions we backport features from later versions into\n"
" earlier versions, making this an unreliable way to test for features.\n"
" Use \"available\" or \"feature_available\" instead.\n"
"\n"
"",
.synopsis = "version",
.run = run_version
};
struct command_entry vfs_minimum_size_cmd_entry = {
.name = "vfs-minimum-size",
.help = "NAME\n"
" vfs-minimum-size - get minimum filesystem size\n"
"\n"
"SYNOPSIS\n"
" vfs-minimum-size mountable\n"
"\n"
"DESCRIPTION\n"
" Get the minimum size of filesystem in bytes. This is the minimum\n"
" possible size for filesystem shrinking.\n"
"\n"
" If getting minimum size of specified filesystem is not supported, this\n"
" will fail and set errno as ENOTSUP.\n"
"\n"
" See also ntfsresize(8), resize2fs(8), btrfs(8), xfs_info(8).\n"
"\n"
"",
.synopsis = "vfs-minimum-size mountable",
.run = run_vfs_minimum_size
};
struct command_entry vfs_uuid_cmd_entry = {
.name = "vfs-uuid",
.help = "NAME\n"
" vfs-uuid - get the filesystem UUID\n"
"\n"
"SYNOPSIS\n"
" vfs-uuid mountable\n"
"\n"
"DESCRIPTION\n"
" This returns the filesystem UUID of the filesystem on \"mountable\".\n"
"\n"
" If the filesystem does not have a UUID, this returns the empty string.\n"
"\n"
" To find a filesystem from the UUID, use \"findfs_uuid\".\n"
"\n"
" You can use 'get-uuid' as an alias for this command.\n"
"\n"
"",
.synopsis = "vfs-uuid mountable",
.run = run_vfs_uuid
};
struct command_entry vgs_cmd_entry = {
.name = "vgs",
.help = "NAME\n"
" vgs - list the LVM volume groups (VGs)\n"
"\n"
"SYNOPSIS\n"
" vgs\n"
"\n"
"DESCRIPTION\n"
" List all the volumes groups detected. This is the equivalent of the\n"
" vgs(8) command.\n"
"\n"
" This returns a list of just the volume group names that were detected\n"
" (eg. \"VolGroup00\").\n"
"\n"
" See also \"vgs_full\".\n"
"\n"
"",
.synopsis = "vgs",
.run = run_vgs
};
struct command_entry write_file_cmd_entry = {
.name = "write-file",
.help = "NAME\n"
" write-file - create a file\n"
"\n"
"SYNOPSIS\n"
" write-file path content size\n"
"\n"
"DESCRIPTION\n"
" This call creates a file called \"path\". The contents of the file is the\n"
" string \"content\" (which can contain any 8 bit data), with length \"size\".\n"
"\n"
" As a special case, if \"size\" is 0 then the length is calculated using\n"
" \"strlen\" (so in this case the content cannot contain embedded ASCII\n"
" NULs).\n"
"\n"
" *NB.* Owing to a bug, writing content containing ASCII NUL characters\n"
" does *not* work, even if the length is specified.\n"
"\n"
" Because of the message protocol, there is a transfer limit of somewhere\n"
" between 2MB and 4MB. See \"PROTOCOL LIMITS\" in guestfs(3).\n"
"\n"
" *This function is deprecated.* In new code, use the \"write\" call\n"
" instead.\n"
"\n"
" Deprecated functions will not be removed from the API, but the fact that\n"
" they are deprecated indicates that there are problems with correct use\n"
" of these functions.\n"
"\n"
"",
.synopsis = "write-file path content size",
.run = run_write_file
};
struct command_entry zero_cmd_entry = {
.name = "zero",
.help = "NAME\n"
" zero - write zeroes to the device\n"
"\n"
"SYNOPSIS\n"
" zero device\n"
"\n"
"DESCRIPTION\n"
" This command writes zeroes over the first few blocks of \"device\".\n"
"\n"
" How many blocks are zeroed isn't specified (but it’s *not* enough to\n"
" securely wipe the device). It should be sufficient to remove any\n"
" partition tables, filesystem superblocks and so on.\n"
"\n"
" If blocks are already zero, then this command avoids writing zeroes.\n"
" This prevents the underlying device from becoming non-sparse or growing\n"
" unnecessarily.\n"
"\n"
" See also: \"zero_device\", \"scrub_device\", \"is_zero_device\"\n"
"\n"
"",
.synopsis = "zero device",
.run = run_zero
};
struct command_entry zerofree_cmd_entry = {
.name = "zerofree",
.help = "NAME\n"
" zerofree - zero unused inodes and disk blocks on ext2/3 filesystem\n"
"\n"
"SYNOPSIS\n"
" zerofree device\n"
"\n"
"DESCRIPTION\n"
" This runs the *zerofree* program on \"device\". This program claims to\n"
" zero unused inodes and disk blocks on an ext2/3 filesystem, thus making\n"
" it possible to compress the filesystem more effectively.\n"
"\n"
" You should not run this program if the filesystem is mounted.\n"
"\n"
" It is possible that using this program can damage the filesystem or data\n"
" on the filesystem.\n"
"\n"
"",
.synopsis = "zerofree device",
.run = run_zerofree
};
struct command_entry zgrepi_cmd_entry = {
.name = "zgrepi",
.help = "NAME\n"
" zgrepi - return lines matching a pattern\n"
"\n"
"SYNOPSIS\n"
" zgrepi regex path\n"
"\n"
"DESCRIPTION\n"
" This calls the external \"zgrep -i\" program and returns the matching\n"
" lines.\n"
"\n"
" Because of the message protocol, there is a transfer limit of somewhere\n"
" between 2MB and 4MB. See \"PROTOCOL LIMITS\" in guestfs(3).\n"
"\n"
" *This function is deprecated.* In new code, use the \"grep\" call instead.\n"
"\n"
" Deprecated functions will not be removed from the API, but the fact that\n"
" they are deprecated indicates that there are problems with correct use\n"
" of these functions.\n"
"\n"
"",
.synopsis = "zgrepi regex path",
.run = run_zgrepi
};
|