File: entries-4.c

package info (click to toggle)
libguestfs 1%3A1.54.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 98,892 kB
  • sloc: ansic: 379,443; ml: 38,771; sh: 10,329; java: 9,631; cs: 6,377; haskell: 5,729; makefile: 5,178; python: 3,821; perl: 2,467; erlang: 2,461; ruby: 349; xml: 275; pascal: 257; javascript: 157; cpp: 10
file content (1627 lines) | stat: -rw-r--r-- 60,531 bytes parent folder | download
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
/* 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 add_cdrom_cmd_entry = {
  .name = "add-cdrom",
  .help = "NAME\n"
          "    add-cdrom - add a CD-ROM disk image to examine\n"
          "\n"
          "SYNOPSIS\n"
          "     add-cdrom filename\n"
          "\n"
          "DESCRIPTION\n"
          "    This function adds a virtual CD-ROM disk image to the guest.\n"
          "\n"
          "    The image is added as read-only drive, so this function is equivalent of\n"
          "    \"add_drive_ro\".\n"
          "\n"
          "    *This function is deprecated.* In new code, use the \"add-drive-ro\" 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 = "add-cdrom filename",
  .run = run_add_cdrom
};

struct command_entry aug_init_cmd_entry = {
  .name = "aug-init",
  .help = "NAME\n"
          "    aug-init - create a new Augeas handle\n"
          "\n"
          "SYNOPSIS\n"
          "     aug-init root flags\n"
          "\n"
          "DESCRIPTION\n"
          "    Create a new Augeas handle for editing configuration files. If there was\n"
          "    any previous Augeas handle associated with this guestfs session, then it\n"
          "    is closed.\n"
          "\n"
          "    You must call this before using any other \"aug_*\" commands.\n"
          "\n"
          "    \"root\" is the filesystem root. \"root\" must not be NULL, use / instead.\n"
          "\n"
          "    The flags are the same as the flags defined in <augeas.h>, the logical\n"
          "    *or* of the following integers:\n"
          "\n"
          "    \"AUG_SAVE_BACKUP\" = 1\n"
          "        Keep the original file with a \".augsave\" extension.\n"
          "\n"
          "    \"AUG_SAVE_NEWFILE\" = 2\n"
          "        Save changes into a file with extension \".augnew\", and do not\n"
          "        overwrite original. Overrides \"AUG_SAVE_BACKUP\".\n"
          "\n"
          "    \"AUG_TYPE_CHECK\" = 4\n"
          "        Typecheck lenses.\n"
          "\n"
          "        This option is only useful when debugging Augeas lenses. Use of this\n"
          "        option may require additional memory for the libguestfs appliance.\n"
          "        You may need to set the \"LIBGUESTFS_MEMSIZE\" environment variable or\n"
          "        call \"set_memsize\".\n"
          "\n"
          "    \"AUG_NO_STDINC\" = 8\n"
          "        Do not use standard load path for modules.\n"
          "\n"
          "    \"AUG_SAVE_NOOP\" = 16\n"
          "        Make save a no-op, just record what would have been changed.\n"
          "\n"
          "    \"AUG_NO_LOAD\" = 32\n"
          "        Do not load the tree in \"aug_init\".\n"
          "\n"
          "    To close the handle, you can call \"aug_close\".\n"
          "\n"
          "    To find out more about Augeas, see <http://augeas.net/>.\n"
          "\n"
          "",
  .synopsis = "aug-init root flags",
  .run = run_aug_init
};

struct command_entry aug_insert_cmd_entry = {
  .name = "aug-insert",
  .help = "NAME\n"
          "    aug-insert - insert a sibling Augeas node\n"
          "\n"
          "SYNOPSIS\n"
          "     aug-insert augpath label before\n"
          "\n"
          "DESCRIPTION\n"
          "    Create a new sibling \"label\" for \"path\", inserting it into the tree\n"
          "    before or after \"path\" (depending on the boolean flag \"before\").\n"
          "\n"
          "    \"path\" must match exactly one existing node in the tree, and \"label\"\n"
          "    must be a label, ie. not contain /, \"*\" or end with a bracketed index\n"
          "    \"[N]\".\n"
          "\n"
          "",
  .synopsis = "aug-insert augpath label before",
  .run = run_aug_insert
};

struct command_entry aug_load_cmd_entry = {
  .name = "aug-load",
  .help = "NAME\n"
          "    aug-load - load files into the tree\n"
          "\n"
          "SYNOPSIS\n"
          "     aug-load\n"
          "\n"
          "DESCRIPTION\n"
          "    Load files into the tree.\n"
          "\n"
          "    See \"aug_load\" in the Augeas documentation for the full gory details.\n"
          "\n"
          "",
  .synopsis = "aug-load",
  .run = run_aug_load
};

struct command_entry aug_rm_cmd_entry = {
  .name = "aug-rm",
  .help = "NAME\n"
          "    aug-rm - remove an Augeas path\n"
          "\n"
          "SYNOPSIS\n"
          "     aug-rm augpath\n"
          "\n"
          "DESCRIPTION\n"
          "    Remove \"path\" and all of its children.\n"
          "\n"
          "    On success this returns the number of entries which were removed.\n"
          "\n"
          "",
  .synopsis = "aug-rm augpath",
  .run = run_aug_rm
};

struct command_entry aug_set_cmd_entry = {
  .name = "aug-set",
  .help = "NAME\n"
          "    aug-set - set Augeas path to value\n"
          "\n"
          "SYNOPSIS\n"
          "     aug-set augpath val\n"
          "\n"
          "DESCRIPTION\n"
          "    Set the value associated with \"augpath\" to \"val\".\n"
          "\n"
          "    In the Augeas API, it is possible to clear a node by setting the value\n"
          "    to NULL. Due to an oversight in the libguestfs API you cannot do that\n"
          "    with this call. Instead you must use the \"aug_clear\" call.\n"
          "\n"
          "",
  .synopsis = "aug-set augpath val",
  .run = run_aug_set
};

struct command_entry blkid_cmd_entry = {
  .name = "blkid",
  .help = "NAME\n"
          "    blkid - print block device attributes\n"
          "\n"
          "SYNOPSIS\n"
          "     blkid device\n"
          "\n"
          "DESCRIPTION\n"
          "    This command returns block device attributes for \"device\". The following\n"
          "    fields are usually present in the returned hash. Other fields may also\n"
          "    be present.\n"
          "\n"
          "    \"UUID\"\n"
          "        The uuid of this device.\n"
          "\n"
          "    \"LABEL\"\n"
          "        The label of this device.\n"
          "\n"
          "    \"VERSION\"\n"
          "        The version of blkid command.\n"
          "\n"
          "    \"TYPE\"\n"
          "        The filesystem type or RAID of this device.\n"
          "\n"
          "    \"USAGE\"\n"
          "        The usage of this device, for example \"filesystem\" or \"raid\".\n"
          "\n"
          "",
  .synopsis = "blkid device",
  .run = run_blkid
};

struct command_entry blockdev_setra_cmd_entry = {
  .name = "blockdev-setra",
  .help = "NAME\n"
          "    blockdev-setra - set readahead\n"
          "\n"
          "SYNOPSIS\n"
          "     blockdev-setra device sectors\n"
          "\n"
          "DESCRIPTION\n"
          "    Set readahead (in 512-byte sectors) for the device.\n"
          "\n"
          "    This uses the blockdev(8) command.\n"
          "\n"
          "",
  .synopsis = "blockdev-setra device sectors",
  .run = run_blockdev_setra
};

struct command_entry btrfs_scrub_start_cmd_entry = {
  .name = "btrfs-scrub-start",
  .help = "NAME\n"
          "    btrfs-scrub-start - read all data from all disks and verify checksums\n"
          "\n"
          "SYNOPSIS\n"
          "     btrfs-scrub-start path\n"
          "\n"
          "DESCRIPTION\n"
          "    Reads all the data and metadata on the filesystem, and uses checksums\n"
          "    and the duplicate copies from RAID storage to identify and repair any\n"
          "    corrupt data.\n"
          "\n"
          "",
  .synopsis = "btrfs-scrub-start path",
  .run = run_btrfs_scrub_start
};

struct command_entry btrfs_scrub_status_cmd_entry = {
  .name = "btrfs-scrub-status",
  .help = "NAME\n"
          "    btrfs-scrub-status - show status of running or finished scrub\n"
          "\n"
          "SYNOPSIS\n"
          "     btrfs-scrub-status path\n"
          "\n"
          "DESCRIPTION\n"
          "    Show status of running or finished scrub on a btrfs filesystem.\n"
          "\n"
          "",
  .synopsis = "btrfs-scrub-status path",
  .run = run_btrfs_scrub_status
};

struct command_entry btrfs_subvolume_create_cmd_entry = {
  .name = "btrfs-subvolume-create",
  .help = "NAME\n"
          "    btrfs-subvolume-create - create a btrfs subvolume\n"
          "\n"
          "SYNOPSIS\n"
          "     btrfs-subvolume-create dest [qgroupid:..]\n"
          "\n"
          "DESCRIPTION\n"
          "    Create a btrfs subvolume. The \"dest\" argument is the destination\n"
          "    directory and the name of the subvolume, in the form /path/to/dest/name.\n"
          "    The optional parameter \"qgroupid\" represents the qgroup which the newly\n"
          "    created subvolume will be added to.\n"
          "\n"
          "    You can use 'btrfs-subvolume-create-opts' as an alias for this command.\n"
          "\n"
          "",
  .synopsis = "btrfs-subvolume-create dest [qgroupid:..]",
  .run = run_btrfs_subvolume_create
};

struct command_entry btrfs_subvolume_set_default_cmd_entry = {
  .name = "btrfs-subvolume-set-default",
  .help = "NAME\n"
          "    btrfs-subvolume-set-default - set default btrfs subvolume\n"
          "\n"
          "SYNOPSIS\n"
          "     btrfs-subvolume-set-default id fs\n"
          "\n"
          "DESCRIPTION\n"
          "    Set the subvolume of the btrfs filesystem \"fs\" which will be mounted by\n"
          "    default. See \"btrfs_subvolume_list\" to get a list of subvolumes.\n"
          "\n"
          "",
  .synopsis = "btrfs-subvolume-set-default id fs",
  .run = run_btrfs_subvolume_set_default
};

struct command_entry btrfs_subvolume_snapshot_cmd_entry = {
  .name = "btrfs-subvolume-snapshot",
  .help = "NAME\n"
          "    btrfs-subvolume-snapshot - create a btrfs snapshot\n"
          "\n"
          "SYNOPSIS\n"
          "     btrfs-subvolume-snapshot source dest [ro:true|false] [qgroupid:..]\n"
          "\n"
          "DESCRIPTION\n"
          "    Create a snapshot of the btrfs subvolume \"source\". The \"dest\" argument\n"
          "    is the destination directory and the name of the snapshot, in the form\n"
          "    /path/to/dest/name. By default the newly created snapshot is writable,\n"
          "    if the value of optional parameter \"ro\" is true, then a readonly\n"
          "    snapshot is created. The optional parameter \"qgroupid\" represents the\n"
          "    qgroup which the newly created snapshot will be added to.\n"
          "\n"
          "    You can use 'btrfs-subvolume-snapshot-opts' as an alias for this\n"
          "    command.\n"
          "\n"
          "",
  .synopsis = "btrfs-subvolume-snapshot source dest [ro:true|false] [qgroupid:..]",
  .run = run_btrfs_subvolume_snapshot
};

struct command_entry canonical_device_name_cmd_entry = {
  .name = "canonical-device-name",
  .help = "NAME\n"
          "    canonical-device-name - return canonical device name\n"
          "\n"
          "SYNOPSIS\n"
          "     canonical-device-name device\n"
          "\n"
          "DESCRIPTION\n"
          "    This utility function is useful when displaying device names to the\n"
          "    user. It takes a number of irregular device names and returns them in a\n"
          "    consistent format:\n"
          "\n"
          "    /dev/hdX\n"
          "    /dev/vdX\n"
          "        These are returned as /dev/sdX. Note this works for device names and\n"
          "        partition names. This is approximately the reverse of the algorithm\n"
          "        described in \"BLOCK DEVICE NAMING\" in guestfs(3).\n"
          "\n"
          "    /dev/mapper/VG-LV\n"
          "    /dev/dm-N\n"
          "        Converted to /dev/VG/LV form using \"lvm_canonical_lv_name\".\n"
          "\n"
          "    Other strings are returned unmodified.\n"
          "\n"
          "",
  .synopsis = "canonical-device-name device",
  .run = run_canonical_device_name
};

struct command_entry case_sensitive_path_cmd_entry = {
  .name = "case-sensitive-path",
  .help = "NAME\n"
          "    case-sensitive-path - return true path on case-insensitive filesystem\n"
          "\n"
          "SYNOPSIS\n"
          "     case-sensitive-path path\n"
          "\n"
          "DESCRIPTION\n"
          "    This can be used to resolve case insensitive paths on a filesystem which\n"
          "    is case sensitive. The use case is to resolve paths which you have read\n"
          "    from Windows configuration files or the Windows Registry, to the true\n"
          "    path.\n"
          "\n"
          "    The command handles a peculiarity of the Linux ntfs-3g filesystem driver\n"
          "    (and probably others), which is that although the underlying filesystem\n"
          "    is case-insensitive, the driver exports the filesystem to Linux as\n"
          "    case-sensitive.\n"
          "\n"
          "    One consequence of this is that special directories such as C:\\windows\n"
          "    may appear as /WINDOWS or /windows (or other things) depending on the\n"
          "    precise details of how they were created. In Windows itself this would\n"
          "    not be a problem.\n"
          "\n"
          "    Bug or feature? You decide:\n"
          "    <https://www.tuxera.com/community/ntfs-3g-faq/#posixfilenames1>\n"
          "\n"
          "    \"case_sensitive_path\" attempts to resolve the true case of each element\n"
          "    in the path. It will return a resolved path if either the full path or\n"
          "    its parent directory exists. If the parent directory exists but the full\n"
          "    path does not, the case of the parent directory will be correctly\n"
          "    resolved, and the remainder appended unmodified. For example, if the\n"
          "    file \"/Windows/System32/netkvm.sys\" exists:\n"
          "\n"
          "    \"case_sensitive_path\" (\"/windows/system32/netkvm.sys\")\n"
          "        \"Windows/System32/netkvm.sys\"\n"
          "\n"
          "    \"case_sensitive_path\" (\"/windows/system32/NoSuchFile\")\n"
          "        \"Windows/System32/NoSuchFile\"\n"
          "\n"
          "    \"case_sensitive_path\" (\"/windows/system33/netkvm.sys\")\n"
          "        *ERROR*\n"
          "\n"
          "    *Note*: Because of the above behaviour, \"case_sensitive_path\" cannot be\n"
          "    used to check for the existence of a file.\n"
          "\n"
          "    *Note*: This function does not handle drive names, backslashes etc.\n"
          "\n"
          "    See also \"realpath\".\n"
          "\n"
          "",
  .synopsis = "case-sensitive-path path",
  .run = run_case_sensitive_path
};

struct command_entry copy_size_cmd_entry = {
  .name = "copy-size",
  .help = "NAME\n"
          "    copy-size - copy size bytes from source to destination using dd\n"
          "\n"
          "SYNOPSIS\n"
          "     copy-size src dest size\n"
          "\n"
          "DESCRIPTION\n"
          "    This command copies exactly \"size\" bytes from one source device or file\n"
          "    \"src\" to another destination device or file \"dest\".\n"
          "\n"
          "    Note this will fail if the source is too short or if the destination is\n"
          "    not large enough.\n"
          "\n"
          "    *This function is deprecated.* In new code, use the\n"
          "    \"copy-device-to-device\" 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 = "copy-size src dest size",
  .run = run_copy_size
};

struct command_entry debug_upload_cmd_entry = {
  .name = "debug-upload",
  .help = "NAME\n"
          "    debug-upload - upload a file to the appliance (internal use only)\n"
          "\n"
          "SYNOPSIS\n"
          "     debug-upload filename tmpname mode\n"
          "\n"
          "DESCRIPTION\n"
          "    The \"debug_upload\" command uploads a file to the libguestfs appliance.\n"
          "\n"
          "    There is no comprehensive help for this command. You have to look at the\n"
          "    file daemon/debug.c in the libguestfs source to find out what it is for.\n"
          "\n"
          "",
  .synopsis = "debug-upload filename tmpname mode",
  .run = run_debug_upload
};

struct command_entry download_offset_cmd_entry = {
  .name = "download-offset",
  .help = "NAME\n"
          "    download-offset - download a file to the local machine with offset and\n"
          "    size\n"
          "\n"
          "SYNOPSIS\n"
          "     download-offset remotefilename filename offset size\n"
          "\n"
          "DESCRIPTION\n"
          "    Download file remotefilename and save it as filename on the local\n"
          "    machine.\n"
          "\n"
          "    remotefilename is read for \"size\" bytes starting at \"offset\" (this\n"
          "    region must be within the file or device).\n"
          "\n"
          "    Note that there is no limit on the amount of data that can be downloaded\n"
          "    with this call, unlike with \"pread\", and this call always reads the full\n"
          "    amount unless an error occurs.\n"
          "\n"
          "    See also \"download\", \"pread\".\n"
          "\n"
          "",
  .synopsis = "download-offset remotefilename filename offset size",
  .run = run_download_offset
};

struct command_entry find_inode_cmd_entry = {
  .name = "find-inode",
  .help = "NAME\n"
          "    find-inode - search the entries associated to the given inode\n"
          "\n"
          "SYNOPSIS\n"
          "     find-inode device inode\n"
          "\n"
          "DESCRIPTION\n"
          "    Searches all the entries associated with the given inode.\n"
          "\n"
          "    For each entry, a \"tsk_dirent\" structure is returned. See\n"
          "    \"filesystem_walk\" for more information about \"tsk_dirent\" structures.\n"
          "\n"
          "",
  .synopsis = "find-inode device inode",
  .run = run_find_inode
};

struct command_entry findfs_partuuid_cmd_entry = {
  .name = "findfs-partuuid",
  .help = "NAME\n"
          "    findfs-partuuid - find a partition by UUID\n"
          "\n"
          "SYNOPSIS\n"
          "     findfs-partuuid uuid\n"
          "\n"
          "DESCRIPTION\n"
          "    This command searches the partitions and returns the one which has the\n"
          "    given partition UUID. An error is returned if no such partition can be\n"
          "    found.\n"
          "\n"
          "    To find the UUID of a partition, use \"blkid\" (\"PART_ENTRY_UUID\").\n"
          "\n"
          "",
  .synopsis = "findfs-partuuid uuid",
  .run = run_findfs_partuuid
};

struct command_entry findfs_uuid_cmd_entry = {
  .name = "findfs-uuid",
  .help = "NAME\n"
          "    findfs-uuid - find a filesystem by UUID\n"
          "\n"
          "SYNOPSIS\n"
          "     findfs-uuid uuid\n"
          "\n"
          "DESCRIPTION\n"
          "    This command searches the filesystems and returns the one which has the\n"
          "    given UUID. An error is returned if no such filesystem can be found.\n"
          "\n"
          "    To find the UUID of a filesystem, use \"vfs_uuid\".\n"
          "\n"
          "",
  .synopsis = "findfs-uuid uuid",
  .run = run_findfs_uuid
};

struct command_entry fstrim_cmd_entry = {
  .name = "fstrim",
  .help = "NAME\n"
          "    fstrim - trim free space in a filesystem\n"
          "\n"
          "SYNOPSIS\n"
          "     fstrim mountpoint [offset:N] [length:N] [minimumfreeextent:N]\n"
          "\n"
          "DESCRIPTION\n"
          "    Trim the free space in the filesystem mounted on \"mountpoint\". The\n"
          "    filesystem must be mounted read-write.\n"
          "\n"
          "    The filesystem contents are not affected, but any free space in the\n"
          "    filesystem is \"trimmed\", that is, given back to the host device, thus\n"
          "    making disk images more sparse, allowing unused space in qcow2 files to\n"
          "    be reused, etc.\n"
          "\n"
          "    This operation requires support in libguestfs, the mounted filesystem,\n"
          "    the host filesystem, qemu and the host kernel. If this support isn't\n"
          "    present it may give an error or even appear to run but do nothing.\n"
          "\n"
          "    In the case where the kernel vfs driver does not support trimming, this\n"
          "    call will fail with errno set to \"ENOTSUP\". Currently this happens when\n"
          "    trying to trim FAT filesystems.\n"
          "\n"
          "    See also \"zero_free_space\". That is a slightly different operation that\n"
          "    turns free space in the filesystem into zeroes. It is valid to call\n"
          "    \"fstrim\" either instead of, or after calling \"zero_free_space\".\n"
          "\n"
          "",
  .synopsis = "fstrim mountpoint [offset:N] [length:N] [minimumfreeextent:N]",
  .run = run_fstrim
};

struct command_entry get_autosync_cmd_entry = {
  .name = "get-autosync",
  .help = "NAME\n"
          "    get-autosync - get autosync mode\n"
          "\n"
          "SYNOPSIS\n"
          "     get-autosync\n"
          "\n"
          "DESCRIPTION\n"
          "    Get the autosync flag.\n"
          "\n"
          "",
  .synopsis = "get-autosync",
  .run = run_get_autosync
};

struct command_entry get_e2uuid_cmd_entry = {
  .name = "get-e2uuid",
  .help = "NAME\n"
          "    get-e2uuid - get the ext2/3/4 filesystem UUID\n"
          "\n"
          "SYNOPSIS\n"
          "     get-e2uuid device\n"
          "\n"
          "DESCRIPTION\n"
          "    This returns the ext2/3/4 filesystem UUID of the filesystem on \"device\".\n"
          "\n"
          "    *This function is deprecated.* In new code, use the \"vfs-uuid\" 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-e2uuid device",
  .run = run_get_e2uuid
};

struct command_entry get_libvirt_requested_credential_challenge_cmd_entry = {
  .name = "get-libvirt-requested-credential-challenge",
  .help = "NAME\n"
          "    get-libvirt-requested-credential-challenge - challenge of i'th requested\n"
          "    credential\n"
          "\n"
          "SYNOPSIS\n"
          "     get-libvirt-requested-credential-challenge index\n"
          "\n"
          "DESCRIPTION\n"
          "    Get the challenge (provided by libvirt) for the \"index\"'th requested\n"
          "    credential. If libvirt did not provide a challenge, this returns the\n"
          "    empty string \"\".\n"
          "\n"
          "    See \"LIBVIRT AUTHENTICATION\" in guestfs(3) for documentation and example\n"
          "    code.\n"
          "\n"
          "",
  .synopsis = "get-libvirt-requested-credential-challenge index",
  .run = run_get_libvirt_requested_credential_challenge
};

struct command_entry get_pid_cmd_entry = {
  .name = "get-pid",
  .help = "NAME\n"
          "    get-pid - get PID of hypervisor\n"
          "\n"
          "SYNOPSIS\n"
          "     get-pid\n"
          "\n"
          "DESCRIPTION\n"
          "    Return the process ID of the hypervisor. If there is no hypervisor\n"
          "    running, then this will return an error.\n"
          "\n"
          "    This is an internal call used for debugging and testing.\n"
          "\n"
          "    You can use 'pid' as an alias for this command.\n"
          "\n"
          "",
  .synopsis = "get-pid",
  .run = run_get_pid
};

struct command_entry get_selinux_cmd_entry = {
  .name = "get-selinux",
  .help = "NAME\n"
          "    get-selinux - get SELinux enabled flag\n"
          "\n"
          "SYNOPSIS\n"
          "     get-selinux\n"
          "\n"
          "DESCRIPTION\n"
          "    This returns the current setting of the selinux flag which is passed to\n"
          "    the appliance at boot time. See \"set_selinux\".\n"
          "\n"
          "    For more information on the architecture of libguestfs, see 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 = "get-selinux",
  .run = run_get_selinux
};

struct command_entry grepi_cmd_entry = {
  .name = "grepi",
  .help = "NAME\n"
          "    grepi - return lines matching a pattern\n"
          "\n"
          "SYNOPSIS\n"
          "     grepi regex path\n"
          "\n"
          "DESCRIPTION\n"
          "    This calls the external \"grep -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 = "grepi regex path",
  .run = run_grepi
};

struct command_entry hexdump_cmd_entry = {
  .name = "hexdump",
  .help = "NAME\n"
          "    hexdump - dump a file in hexadecimal\n"
          "\n"
          "SYNOPSIS\n"
          "     hexdump path\n"
          "\n"
          "DESCRIPTION\n"
          "    This runs \"hexdump -C\" on the given \"path\". The result is the\n"
          "    human-readable, canonical hex dump of the file.\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 = "hexdump path",
  .run = run_hexdump
};

struct command_entry hivex_node_children_cmd_entry = {
  .name = "hivex-node-children",
  .help = "NAME\n"
          "    hivex-node-children - return list of nodes which are subkeys of node\n"
          "\n"
          "SYNOPSIS\n"
          "     hivex-node-children nodeh\n"
          "\n"
          "DESCRIPTION\n"
          "    Return the list of nodes which are subkeys of \"nodeh\".\n"
          "\n"
          "    This is a wrapper around the hivex(3) call of the same name.\n"
          "\n"
          "",
  .synopsis = "hivex-node-children nodeh",
  .run = run_hivex_node_children
};

struct command_entry inspect_get_format_cmd_entry = {
  .name = "inspect-get-format",
  .help = "NAME\n"
          "    inspect-get-format - get format of inspected operating system\n"
          "\n"
          "SYNOPSIS\n"
          "     inspect-get-format root\n"
          "\n"
          "DESCRIPTION\n"
          "    Before libguestfs 1.38, there was some unreliable support for detecting\n"
          "    installer CDs. This API would return:\n"
          "\n"
          "    \"installed\"\n"
          "        This is an installed operating system.\n"
          "\n"
          "    \"installer\"\n"
          "        The disk image being inspected is not an installed operating system,\n"
          "        but a *bootable* install disk, live CD, or similar.\n"
          "\n"
          "    \"unknown\"\n"
          "        The format of this disk image is not known.\n"
          "\n"
          "    In libguestfs ≥ 1.38, this only returns \"installed\". Use libosinfo\n"
          "    directly to detect installer CDs.\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-get-format root",
  .run = run_inspect_get_format
};

struct command_entry inspect_get_hostname_cmd_entry = {
  .name = "inspect-get-hostname",
  .help = "NAME\n"
          "    inspect-get-hostname - get hostname of the operating system\n"
          "\n"
          "SYNOPSIS\n"
          "     inspect-get-hostname root\n"
          "\n"
          "DESCRIPTION\n"
          "    This function returns the hostname of the operating system as found by\n"
          "    inspection of the guest’s configuration files.\n"
          "\n"
          "    If the hostname could not be determined, then the string \"unknown\" is\n"
          "    returned.\n"
          "\n"
          "    Please read \"INSPECTION\" in guestfs(3) for more details.\n"
          "\n"
          "",
  .synopsis = "inspect-get-hostname root",
  .run = run_inspect_get_hostname
};

struct command_entry inspect_is_multipart_cmd_entry = {
  .name = "inspect-is-multipart",
  .help = "NAME\n"
          "    inspect-is-multipart - get multipart flag for install disk\n"
          "\n"
          "SYNOPSIS\n"
          "     inspect-is-multipart 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-multipart root",
  .run = run_inspect_is_multipart
};

struct command_entry ldmtool_scan_cmd_entry = {
  .name = "ldmtool-scan",
  .help = "NAME\n"
          "    ldmtool-scan - scan for Windows dynamic disks\n"
          "\n"
          "SYNOPSIS\n"
          "     ldmtool-scan\n"
          "\n"
          "DESCRIPTION\n"
          "    This function scans for Windows dynamic disks. It returns a list of\n"
          "    identifiers (GUIDs) for all disk groups that were found. These\n"
          "    identifiers can be passed to other \"ldmtool_*\" functions.\n"
          "\n"
          "    This function scans all block devices. To scan a subset of block\n"
          "    devices, call \"ldmtool_scan_devices\" instead.\n"
          "\n"
          "",
  .synopsis = "ldmtool-scan",
  .run = run_ldmtool_scan
};

struct command_entry lgetxattrs_cmd_entry = {
  .name = "lgetxattrs",
  .help = "NAME\n"
          "    lgetxattrs - list extended attributes of a file or directory\n"
          "\n"
          "SYNOPSIS\n"
          "     lgetxattrs path\n"
          "\n"
          "DESCRIPTION\n"
          "    This is the same as \"getxattrs\", but if \"path\" is a symbolic link, then\n"
          "    it returns the extended attributes of the link itself.\n"
          "\n"
          "",
  .synopsis = "lgetxattrs path",
  .run = run_lgetxattrs
};

struct command_entry list_dm_devices_cmd_entry = {
  .name = "list-dm-devices",
  .help = "NAME\n"
          "    list-dm-devices - list device mapper devices\n"
          "\n"
          "SYNOPSIS\n"
          "     list-dm-devices\n"
          "\n"
          "DESCRIPTION\n"
          "    List all device mapper devices.\n"
          "\n"
          "    The returned list contains /dev/mapper/* devices, eg. ones created by a\n"
          "    previous call to \"luks_open\".\n"
          "\n"
          "    Device mapper devices which correspond to logical volumes are *not*\n"
          "    returned in this list. Call \"lvs\" if you want to list logical volumes.\n"
          "\n"
          "",
  .synopsis = "list-dm-devices",
  .run = run_list_dm_devices
};

struct command_entry list_ldm_volumes_cmd_entry = {
  .name = "list-ldm-volumes",
  .help = "NAME\n"
          "    list-ldm-volumes - list all Windows dynamic disk volumes\n"
          "\n"
          "SYNOPSIS\n"
          "     list-ldm-volumes\n"
          "\n"
          "DESCRIPTION\n"
          "    This function returns all Windows dynamic disk volumes that were found\n"
          "    at launch time. It returns a list of device names.\n"
          "\n"
          "",
  .synopsis = "list-ldm-volumes",
  .run = run_list_ldm_volumes
};

struct command_entry luks_format_cmd_entry = {
  .name = "luks-format",
  .help = "NAME\n"
          "    luks-format - format a block device as a LUKS encrypted device\n"
          "\n"
          "SYNOPSIS\n"
          "     luks-format device keyslot\n"
          "\n"
          "DESCRIPTION\n"
          "    This command erases existing data on \"device\" and formats the device as\n"
          "    a LUKS encrypted device. \"key\" is the initial key, which is added to key\n"
          "    slot \"keyslot\". (LUKS supports 8 key slots, numbered 0-7).\n"
          "\n"
          "    This command has one or more key or passphrase parameters. Guestfish\n"
          "    will prompt for these separately.\n"
          "\n"
          "",
  .synopsis = "luks-format device keyslot",
  .run = run_luks_format
};

struct command_entry lvm_canonical_lv_name_cmd_entry = {
  .name = "lvm-canonical-lv-name",
  .help = "NAME\n"
          "    lvm-canonical-lv-name - get canonical name of an LV\n"
          "\n"
          "SYNOPSIS\n"
          "     lvm-canonical-lv-name lvname\n"
          "\n"
          "DESCRIPTION\n"
          "    This converts alternative naming schemes for LVs that you might find to\n"
          "    the canonical name. For example, /dev/mapper/VG-LV is converted to\n"
          "    /dev/VG/LV.\n"
          "\n"
          "    This command returns an error if the \"lvname\" parameter does not refer\n"
          "    to a logical volume. In this case errno will be set to \"EINVAL\".\n"
          "\n"
          "    See also \"is_lv\", \"canonical_device_name\".\n"
          "\n"
          "",
  .synopsis = "lvm-canonical-lv-name lvname",
  .run = run_lvm_canonical_lv_name
};

struct command_entry lvrename_cmd_entry = {
  .name = "lvrename",
  .help = "NAME\n"
          "    lvrename - rename an LVM logical volume\n"
          "\n"
          "SYNOPSIS\n"
          "     lvrename logvol newlogvol\n"
          "\n"
          "DESCRIPTION\n"
          "    Rename a logical volume \"logvol\" with the new name \"newlogvol\".\n"
          "\n"
          "",
  .synopsis = "lvrename logvol newlogvol",
  .run = run_lvrename
};

struct command_entry lvresize_cmd_entry = {
  .name = "lvresize",
  .help = "NAME\n"
          "    lvresize - resize an LVM logical volume\n"
          "\n"
          "SYNOPSIS\n"
          "     lvresize device mbytes\n"
          "\n"
          "DESCRIPTION\n"
          "    This resizes (expands or shrinks) an existing LVM logical volume to\n"
          "    \"mbytes\". When reducing, data in the reduced part is lost.\n"
          "\n"
          "",
  .synopsis = "lvresize device mbytes",
  .run = run_lvresize
};

struct command_entry lvuuid_cmd_entry = {
  .name = "lvuuid",
  .help = "NAME\n"
          "    lvuuid - get the UUID of a logical volume\n"
          "\n"
          "SYNOPSIS\n"
          "     lvuuid device\n"
          "\n"
          "DESCRIPTION\n"
          "    This command returns the UUID of the LVM LV \"device\".\n"
          "\n"
          "",
  .synopsis = "lvuuid device",
  .run = run_lvuuid
};

struct command_entry mke2fs_J_cmd_entry = {
  .name = "mke2fs-J",
  .help = "NAME\n"
          "    mke2fs-J - make ext2/3/4 filesystem with external journal\n"
          "\n"
          "SYNOPSIS\n"
          "     mke2fs-J fstype blocksize device journal\n"
          "\n"
          "DESCRIPTION\n"
          "    This creates an ext2/3/4 filesystem on \"device\" with an external journal\n"
          "    on \"journal\". It is equivalent to the command:\n"
          "\n"
          "     mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
          "\n"
          "    See also \"mke2journal\".\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-J fstype blocksize device journal",
  .run = run_mke2fs_J
};

struct command_entry mke2journal_U_cmd_entry = {
  .name = "mke2journal-U",
  .help = "NAME\n"
          "    mke2journal-U - make ext2/3/4 external journal with UUID\n"
          "\n"
          "SYNOPSIS\n"
          "     mke2journal-U blocksize uuid device\n"
          "\n"
          "DESCRIPTION\n"
          "    This creates an ext2 external journal on \"device\" with UUID \"uuid\".\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-U blocksize uuid device",
  .run = run_mke2journal_U
};

struct command_entry mknod_c_cmd_entry = {
  .name = "mknod-c",
  .help = "NAME\n"
          "    mknod-c - make char device node\n"
          "\n"
          "SYNOPSIS\n"
          "     mknod-c mode devmajor devminor path\n"
          "\n"
          "DESCRIPTION\n"
          "    This call creates a char 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-c mode devmajor devminor path",
  .run = run_mknod_c
};

struct command_entry mount_options_cmd_entry = {
  .name = "mount-options",
  .help = "NAME\n"
          "    mount-options - mount a guest disk with mount options\n"
          "\n"
          "SYNOPSIS\n"
          "     mount-options options mountable mountpoint\n"
          "\n"
          "DESCRIPTION\n"
          "    This is the same as the \"mount\" command, but it allows you to set the\n"
          "    mount options as for the mount(8) *-o* flag.\n"
          "\n"
          "    If the \"options\" parameter is an empty string, then no options are\n"
          "    passed (all options default to whatever the filesystem uses).\n"
          "\n"
          "",
  .synopsis = "mount-options options mountable mountpoint",
  .run = run_mount_options
};

struct command_entry ntfsfix_cmd_entry = {
  .name = "ntfsfix",
  .help = "NAME\n"
          "    ntfsfix - fix common errors and force Windows to check NTFS\n"
          "\n"
          "SYNOPSIS\n"
          "     ntfsfix device [clearbadsectors:true|false]\n"
          "\n"
          "DESCRIPTION\n"
          "    This command repairs some fundamental NTFS inconsistencies, resets the\n"
          "    NTFS journal file, and schedules an NTFS consistency check for the first\n"
          "    boot into Windows.\n"
          "\n"
          "    This is *not* an equivalent of Windows \"chkdsk\". It does *not* scan the\n"
          "    filesystem for inconsistencies.\n"
          "\n"
          "    The optional \"clearbadsectors\" flag clears the list of bad sectors. This\n"
          "    is useful after cloning a disk with bad sectors to a new disk.\n"
          "\n"
          "",
  .synopsis = "ntfsfix device [clearbadsectors:true|false]",
  .run = run_ntfsfix
};

struct command_entry part_add_cmd_entry = {
  .name = "part-add",
  .help = "NAME\n"
          "    part-add - add a partition to the device\n"
          "\n"
          "SYNOPSIS\n"
          "     part-add device prlogex startsect endsect\n"
          "\n"
          "DESCRIPTION\n"
          "    This command adds a partition to \"device\". If there is no partition\n"
          "    table on the device, call \"part_init\" first.\n"
          "\n"
          "    The \"prlogex\" parameter is the type of partition. Normally you should\n"
          "    pass \"p\" or \"primary\" here, but MBR partition tables also support \"l\"\n"
          "    (or \"logical\") and \"e\" (or \"extended\") partition types.\n"
          "\n"
          "    \"startsect\" and \"endsect\" are the start and end of the partition in\n"
          "    *sectors*. \"endsect\" may be negative, which means it counts backwards\n"
          "    from the end of the disk (-1 is the last sector).\n"
          "\n"
          "    Creating a partition which covers the whole disk is not so easy. Use\n"
          "    \"part_disk\" to do that.\n"
          "\n"
          "",
  .synopsis = "part-add device prlogex startsect endsect",
  .run = run_part_add
};

struct command_entry part_get_gpt_guid_cmd_entry = {
  .name = "part-get-gpt-guid",
  .help = "NAME\n"
          "    part-get-gpt-guid - get the GUID of a GPT partition\n"
          "\n"
          "SYNOPSIS\n"
          "     part-get-gpt-guid device partnum\n"
          "\n"
          "DESCRIPTION\n"
          "    Return the GUID of numbered GPT partition \"partnum\".\n"
          "\n"
          "",
  .synopsis = "part-get-gpt-guid device partnum",
  .run = run_part_get_gpt_guid
};

struct command_entry part_get_mbr_id_cmd_entry = {
  .name = "part-get-mbr-id",
  .help = "NAME\n"
          "    part-get-mbr-id - get the MBR type byte (ID byte) from a partition\n"
          "\n"
          "SYNOPSIS\n"
          "     part-get-mbr-id device partnum\n"
          "\n"
          "DESCRIPTION\n"
          "    Returns the MBR type byte (also known as the ID byte) from the numbered\n"
          "    partition \"partnum\".\n"
          "\n"
          "    Note that only MBR (old DOS-style) partitions have type bytes. You will\n"
          "    get undefined results for other partition table types (see\n"
          "    \"part_get_parttype\").\n"
          "\n"
          "",
  .synopsis = "part-get-mbr-id device partnum",
  .run = run_part_get_mbr_id
};

struct command_entry part_get_mbr_part_type_cmd_entry = {
  .name = "part-get-mbr-part-type",
  .help = "NAME\n"
          "    part-get-mbr-part-type - get the MBR partition type\n"
          "\n"
          "SYNOPSIS\n"
          "     part-get-mbr-part-type device partnum\n"
          "\n"
          "DESCRIPTION\n"
          "    This returns the partition type of an MBR partition numbered \"partnum\"\n"
          "    on device \"device\".\n"
          "\n"
          "    It returns \"primary\", \"logical\", or \"extended\".\n"
          "\n"
          "",
  .synopsis = "part-get-mbr-part-type device partnum",
  .run = run_part_get_mbr_part_type
};

struct command_entry part_get_name_cmd_entry = {
  .name = "part-get-name",
  .help = "NAME\n"
          "    part-get-name - get partition name\n"
          "\n"
          "SYNOPSIS\n"
          "     part-get-name device partnum\n"
          "\n"
          "DESCRIPTION\n"
          "    This gets the partition name on partition numbered \"partnum\" on device\n"
          "    \"device\". Note that partitions are numbered from 1.\n"
          "\n"
          "    The partition name can only be read on certain types of partition table.\n"
          "    This works on \"gpt\" but not on \"mbr\" partitions.\n"
          "\n"
          "",
  .synopsis = "part-get-name device partnum",
  .run = run_part_get_name
};

struct command_entry part_init_cmd_entry = {
  .name = "part-init",
  .help = "NAME\n"
          "    part-init - create an empty partition table\n"
          "\n"
          "SYNOPSIS\n"
          "     part-init device parttype\n"
          "\n"
          "DESCRIPTION\n"
          "    This creates an empty partition table on \"device\" of one of the\n"
          "    partition types listed below. Usually \"parttype\" should be either\n"
          "    \"msdos\" or \"gpt\" (for large disks).\n"
          "\n"
          "    Initially there are no partitions. Following this, you should call\n"
          "    \"part_add\" for each partition required.\n"
          "\n"
          "    Possible values for \"parttype\" are:\n"
          "\n"
          "    \"efi\"\n"
          "    \"gpt\"\n"
          "        Intel EFI / GPT partition table.\n"
          "\n"
          "        This is recommended for >= 2 TB partitions that will be accessed\n"
          "        from Linux and Intel-based Mac OS X. It also has limited backwards\n"
          "        compatibility with the \"mbr\" format.\n"
          "\n"
          "    \"mbr\"\n"
          "    \"msdos\"\n"
          "        The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and\n"
          "        Windows. This partition type will only work for device sizes up to 2\n"
          "        TB. For large disks we recommend using \"gpt\".\n"
          "\n"
          "    Other partition table types that may work but are not supported include:\n"
          "\n"
          "    \"aix\"\n"
          "        AIX disk labels.\n"
          "\n"
          "    \"amiga\"\n"
          "    \"rdb\"\n"
          "        Amiga \"Rigid Disk Block\" format.\n"
          "\n"
          "    \"bsd\"\n"
          "        BSD disk labels.\n"
          "\n"
          "    \"dasd\"\n"
          "        DASD, used on IBM mainframes.\n"
          "\n"
          "    \"dvh\"\n"
          "        MIPS/SGI volumes.\n"
          "\n"
          "    \"mac\"\n"
          "        Old Mac partition format. Modern Macs use \"gpt\".\n"
          "\n"
          "    \"pc98\"\n"
          "        NEC PC-98 format, common in Japan apparently.\n"
          "\n"
          "    \"sun\"\n"
          "        Sun disk labels.\n"
          "\n"
          "",
  .synopsis = "part-init device parttype",
  .run = run_part_init
};

struct command_entry part_to_partnum_cmd_entry = {
  .name = "part-to-partnum",
  .help = "NAME\n"
          "    part-to-partnum - convert partition name to partition number\n"
          "\n"
          "SYNOPSIS\n"
          "     part-to-partnum partition\n"
          "\n"
          "DESCRIPTION\n"
          "    This function takes a partition name (eg. \"/dev/sdb1\") and returns the\n"
          "    partition number (eg. 1).\n"
          "\n"
          "    The named partition must exist, for example as a string returned from\n"
          "    \"list_partitions\".\n"
          "\n"
          "    See also \"part_to_dev\".\n"
          "\n"
          "",
  .synopsis = "part-to-partnum partition",
  .run = run_part_to_partnum
};

struct command_entry pvuuid_cmd_entry = {
  .name = "pvuuid",
  .help = "NAME\n"
          "    pvuuid - get the UUID of a physical volume\n"
          "\n"
          "SYNOPSIS\n"
          "     pvuuid device\n"
          "\n"
          "DESCRIPTION\n"
          "    This command returns the UUID of the LVM PV \"device\".\n"
          "\n"
          "",
  .synopsis = "pvuuid device",
  .run = run_pvuuid
};

struct command_entry readlinklist_cmd_entry = {
  .name = "readlinklist",
  .help = "NAME\n"
          "    readlinklist - readlink on multiple files\n"
          "\n"
          "SYNOPSIS\n"
          "     readlinklist path names\n"
          "\n"
          "DESCRIPTION\n"
          "    This call allows you to do a \"readlink\" operation on 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 list of strings, with a one-to-one correspondence to\n"
          "    the \"names\" list. Each string is the value of the symbolic link.\n"
          "\n"
          "    If the readlink(2) operation fails on any name, then the corresponding\n"
          "    result string is the empty string \"\". However the whole operation is\n"
          "    completed even if there were readlink(2) errors, and so you can call\n"
          "    this function with names where you don't know if they are symbolic links\n"
          "    already (albeit slightly less efficient).\n"
          "\n"
          "    This call is intended for programs that want to efficiently list a\n"
          "    directory contents without making many round-trips.\n"
          "\n"
          "",
  .synopsis = "readlinklist path names",
  .run = run_readlinklist
};

struct command_entry rmmountpoint_cmd_entry = {
  .name = "rmmountpoint",
  .help = "NAME\n"
          "    rmmountpoint - remove a mountpoint\n"
          "\n"
          "SYNOPSIS\n"
          "     rmmountpoint exemptpath\n"
          "\n"
          "DESCRIPTION\n"
          "    This call removes a mountpoint that was previously created with\n"
          "    \"mkmountpoint\". See \"mkmountpoint\" for full details.\n"
          "\n"
          "",
  .synopsis = "rmmountpoint exemptpath",
  .run = run_rmmountpoint
};

struct command_entry scrub_device_cmd_entry = {
  .name = "scrub-device",
  .help = "NAME\n"
          "    scrub-device - scrub (securely wipe) a device\n"
          "\n"
          "SYNOPSIS\n"
          "     scrub-device device\n"
          "\n"
          "DESCRIPTION\n"
          "    This command writes patterns over \"device\" to make data retrieval more\n"
          "    difficult.\n"
          "\n"
          "    It is an interface to the scrub(1) program. See that manual page for\n"
          "    more details.\n"
          "\n"
          "",
  .synopsis = "scrub-device device",
  .run = run_scrub_device
};

struct command_entry set_cachedir_cmd_entry = {
  .name = "set-cachedir",
  .help = "NAME\n"
          "    set-cachedir - set the appliance cache directory\n"
          "\n"
          "SYNOPSIS\n"
          "     set-cachedir cachedir\n"
          "\n"
          "DESCRIPTION\n"
          "    Set the directory used by the handle to store the appliance cache, when\n"
          "    using a supermin appliance. The appliance is cached and shared between\n"
          "    all handles which have the same effective user ID.\n"
          "\n"
          "    The environment variables \"LIBGUESTFS_CACHEDIR\" and \"TMPDIR\" control the\n"
          "    default value: If \"LIBGUESTFS_CACHEDIR\" is set, then that is the\n"
          "    default. Else if \"TMPDIR\" is set, then that is the default. Else\n"
          "    /var/tmp is the default.\n"
          "\n"
          "    You can use 'cachedir' as an alias for this command.\n"
          "\n"
          "",
  .synopsis = "set-cachedir cachedir",
  .run = run_set_cachedir
};

struct command_entry set_e2attrs_cmd_entry = {
  .name = "set-e2attrs",
  .help = "NAME\n"
          "    set-e2attrs - set ext2 file attributes of a file\n"
          "\n"
          "SYNOPSIS\n"
          "     set-e2attrs file attrs [clear:true|false]\n"
          "\n"
          "DESCRIPTION\n"
          "    This sets or clears the file attributes \"attrs\" associated with the\n"
          "    inode file.\n"
          "\n"
          "    \"attrs\" is a string of characters representing file attributes. See\n"
          "    \"get_e2attrs\" for a list of possible attributes. Not all attributes can\n"
          "    be changed.\n"
          "\n"
          "    If optional boolean \"clear\" is not present or false, then the \"attrs\"\n"
          "    listed are set in the inode.\n"
          "\n"
          "    If \"clear\" is true, then the \"attrs\" listed are cleared in the inode.\n"
          "\n"
          "    In both cases, other attributes not present in the \"attrs\" string are\n"
          "    left unchanged.\n"
          "\n"
          "    These attributes are only present when the file is located on an\n"
          "    ext2/3/4 filesystem. Using this call on other filesystem types will\n"
          "    result in an error.\n"
          "\n"
          "",
  .synopsis = "set-e2attrs file attrs [clear:true|false]",
  .run = run_set_e2attrs
};

struct command_entry set_e2label_cmd_entry = {
  .name = "set-e2label",
  .help = "NAME\n"
          "    set-e2label - set the ext2/3/4 filesystem label\n"
          "\n"
          "SYNOPSIS\n"
          "     set-e2label device label\n"
          "\n"
          "DESCRIPTION\n"
          "    This sets the ext2/3/4 filesystem label of the filesystem on \"device\" to\n"
          "    \"label\". Filesystem labels are limited to 16 characters.\n"
          "\n"
          "    You can use either \"tune2fs_l\" or \"get_e2label\" to return the existing\n"
          "    label on a filesystem.\n"
          "\n"
          "    *This function is deprecated.* In new code, use the \"set-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 = "set-e2label device label",
  .run = run_set_e2label
};

struct command_entry sh_lines_cmd_entry = {
  .name = "sh-lines",
  .help = "NAME\n"
          "    sh-lines - run a command via the shell returning lines\n"
          "\n"
          "SYNOPSIS\n"
          "     sh-lines command\n"
          "\n"
          "DESCRIPTION\n"
          "    This is the same as \"sh\", but splits the result into a list of lines.\n"
          "\n"
          "    See also: \"command_lines\"\n"
          "\n"
          "",
  .synopsis = "sh-lines command",
  .run = run_sh_lines
};

struct command_entry shutdown_cmd_entry = {
  .name = "shutdown",
  .help = "NAME\n"
          "    shutdown - shutdown the hypervisor\n"
          "\n"
          "SYNOPSIS\n"
          "     shutdown\n"
          "\n"
          "DESCRIPTION\n"
          "    This is the opposite of \"launch\". It performs an orderly shutdown of the\n"
          "    backend process(es). If the autosync flag is set (which is the default)\n"
          "    then the disk image is synchronized.\n"
          "\n"
          "    If the subprocess exits with an error then this function will return an\n"
          "    error, which should *not* be ignored (it may indicate that the disk\n"
          "    image could not be written out properly).\n"
          "\n"
          "    It is safe to call this multiple times. Extra calls are ignored.\n"
          "\n"
          "    This call does *not* close or free up the handle. You still need to call\n"
          "    \"close\" afterwards.\n"
          "\n"
          "    \"close\" will call this if you don't do it explicitly, but note that any\n"
          "    errors are ignored in that case.\n"
          "\n"
          "",
  .synopsis = "shutdown",
  .run = run_shutdown
};

struct command_entry swapon_file_cmd_entry = {
  .name = "swapon-file",
  .help = "NAME\n"
          "    swapon-file - enable swap on file\n"
          "\n"
          "SYNOPSIS\n"
          "     swapon-file file\n"
          "\n"
          "DESCRIPTION\n"
          "    This command enables swap to a file. See \"swapon_device\" for other\n"
          "    notes.\n"
          "\n"
          "",
  .synopsis = "swapon-file file",
  .run = run_swapon_file
};

struct command_entry tgz_out_cmd_entry = {
  .name = "tgz-out",
  .help = "NAME\n"
          "    tgz-out - pack directory into compressed tarball\n"
          "\n"
          "SYNOPSIS\n"
          "     tgz-out directory tarball\n"
          "\n"
          "DESCRIPTION\n"
          "    This command packs the contents of directory and downloads it to local\n"
          "    file \"tarball\".\n"
          "\n"
          "    *This function is deprecated.* In new code, use the \"tar-out\" 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 = "tgz-out directory tarball",
  .run = run_tgz_out
};

struct command_entry umask_cmd_entry = {
  .name = "umask",
  .help = "NAME\n"
          "    umask - set file mode creation mask (umask)\n"
          "\n"
          "SYNOPSIS\n"
          "     umask mask\n"
          "\n"
          "DESCRIPTION\n"
          "    This function sets the mask used for creating new files and device nodes\n"
          "    to \"mask & 0777\".\n"
          "\n"
          "    Typical umask values would be 022 which creates new files with\n"
          "    permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and 002 which creates new\n"
          "    files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\".\n"
          "\n"
          "    The default umask is 022. This is important because it means that\n"
          "    directories and device nodes will be created with 0644 or 0755 mode even\n"
          "    if you specify 0777.\n"
          "\n"
          "    See also \"get_umask\", umask(2), \"mknod\", \"mkdir\".\n"
          "\n"
          "    This call returns the previous umask.\n"
          "\n"
          "",
  .synopsis = "umask mask",
  .run = run_umask
};

struct command_entry wipefs_cmd_entry = {
  .name = "wipefs",
  .help = "NAME\n"
          "    wipefs - wipe a filesystem signature from a device\n"
          "\n"
          "SYNOPSIS\n"
          "     wipefs device\n"
          "\n"
          "DESCRIPTION\n"
          "    This command erases filesystem or RAID signatures from the specified\n"
          "    \"device\" to make the filesystem invisible to libblkid.\n"
          "\n"
          "    This does not erase the filesystem itself nor any other data from the\n"
          "    \"device\".\n"
          "\n"
          "    Compare with \"zero\" which zeroes the first few blocks of a device.\n"
          "\n"
          "",
  .synopsis = "wipefs device",
  .run = run_wipefs
};