[USB-BRINGUP-TRUNK]
[reactos.git] / base / system / diskpart / list.c
1 /*
2 * PROJECT: ReactOS DiskPart
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: base/system/diskpart/list.c
5 * PURPOSE: Manages all the partitions of the OS in
6 * an interactive way
7 * PROGRAMMERS: Lee Schroeder
8 */
9 #include "diskpart.h"
10
11 static VOID list_disk(VOID)
12 {
13 /* Header labels */
14 PrintResourceString(IDS_LIST_DISK_HEAD);
15 PrintResourceString(IDS_LIST_DISK_LINE);
16
17 printf("\n\n");
18 }
19
20 static VOID list_partition(VOID)
21 {
22 printf("List Partition!!\n");
23 }
24
25 static VOID list_volume(VOID)
26 {
27 PrintResourceString(IDS_LIST_VOLUME_HEAD);
28 }
29
30 static VOID list_vdisk(VOID)
31 {
32 printf("List VDisk!!\n");
33 }
34
35 BOOL list_main(INT argc, WCHAR **argv)
36 {
37 /* gets the first word from the string */
38 if (argc == 1)
39 {
40 help_list(0, NULL);
41 return TRUE;
42 }
43
44 /* determines which to list (disk, partition, etc.) */
45 if(!wcsicmp(argv[1], L"disk"))
46 {
47 list_disk();
48 }
49 else if(!wcsicmp(argv[1], L"partition"))
50 {
51 list_partition();
52 }
53 else if(!wcsicmp(argv[1], L"volume"))
54 {
55 list_volume();
56 }
57 else if(!wcsicmp(argv[1], L"vdisk"))
58 {
59 list_vdisk();
60 }
61 else
62 {
63 help_list(0, NULL);
64 }
65
66 return TRUE;
67 }
68
69
70 VOID help_list(INT argc, WCHAR **argv)
71 {
72 PrintResourceString(IDS_HELP_CMD_LIST);
73 }