summaryrefslogtreecommitdiff
path: root/src/bin/eeze/eeze_disk_ls
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-02-03 00:04:19 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-02-03 10:59:04 +0100
commit94ddd709dbae52a729179d8ad7ac4f8b06845ea3 (patch)
tree4c52f7f8a329a59beb3a9e552af4f5d7a92c0043 /src/bin/eeze/eeze_disk_ls
parenteab798c753e72eece526ceccf3c9beb441b5f5ff (diff)
eeze: move binaries into subdirectories
in order to move to cmake we are moving every binary into its own subdirectory.
Diffstat (limited to 'src/bin/eeze/eeze_disk_ls')
-rw-r--r--src/bin/eeze/eeze_disk_ls/eeze_disk_ls.c71
1 files changed, 71 insertions, 0 deletions
diff --git a/src/bin/eeze/eeze_disk_ls/eeze_disk_ls.c b/src/bin/eeze/eeze_disk_ls/eeze_disk_ls.c
new file mode 100644
index 0000000000..7499bf098e
--- /dev/null
+++ b/src/bin/eeze/eeze_disk_ls/eeze_disk_ls.c
@@ -0,0 +1,71 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <stdio.h>
6
7#include <Ecore.h>
8#include <Eeze.h>
9#include <Eeze_Disk.h>
10
11/* simple app to print disks and their mount points */
12
13int
14main(void)
15{
16 Eina_List *disks;
17 const char *syspath;
18
19 eeze_init();
20 eeze_disk_function();
21
22 disks = eeze_udev_find_by_type(EEZE_UDEV_TYPE_DRIVE_MOUNTABLE, NULL);
23 printf("Found the following mountable disks:\n");
24 EINA_LIST_FREE(disks, syspath)
25 {
26 Eeze_Disk *disk;
27
28 disk = eeze_disk_new(syspath);
29 printf("\t%s - %s:%s\n", syspath, eeze_disk_devpath_get(disk), eeze_disk_mount_point_get(disk));
30 eeze_disk_free(disk);
31 eina_stringshare_del(syspath);
32 }
33
34 disks = eeze_udev_find_by_type(EEZE_UDEV_TYPE_DRIVE_REMOVABLE, NULL);
35 printf("Found the following removable drives:\n");
36 EINA_LIST_FREE(disks, syspath)
37 {
38 Eeze_Disk *disk;
39
40 disk = eeze_disk_new(syspath);
41 printf("\t%s - %s:%s\n", syspath, eeze_disk_devpath_get(disk), eeze_disk_mount_point_get(disk));
42 eeze_disk_free(disk);
43 eina_stringshare_del(syspath);
44 }
45
46 disks = eeze_udev_find_by_type(EEZE_UDEV_TYPE_DRIVE_INTERNAL, NULL);
47 printf("Found the following internal drives:\n");
48 EINA_LIST_FREE(disks, syspath)
49 {
50 Eeze_Disk *disk;
51
52 disk = eeze_disk_new(syspath);
53 printf("\t%s - %s\n", syspath, eeze_disk_devpath_get(disk));
54 eeze_disk_free(disk);
55 eina_stringshare_del(syspath);
56 }
57
58 disks = eeze_udev_find_by_type(EEZE_UDEV_TYPE_GPIO, NULL);
59 printf("Found the following GPIO(s):\n");
60 EINA_LIST_FREE(disks, syspath)
61 {
62 Eeze_Disk *disk;
63
64 disk = eeze_disk_new(syspath);
65 printf("\t%s - %s:%s\n", syspath, eeze_disk_devpath_get(disk), eeze_disk_mount_point_get(disk));
66 eeze_disk_free(disk);
67 eina_stringshare_del(syspath);
68 }
69
70 return 0;
71}