summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2020-06-04 23:31:21 +0200
committerGravatar Martin Szulecki2020-06-04 23:31:21 +0200
commitd173fd9b3243e9a2d5703271e2aa646050ca996e (patch)
tree2e60cfa8ef423bd1c515d5048711c0bcb204a46a
parent74a4782bc07e8f6df74a4298ecbd34ec037c2d81 (diff)
downloadifuse-d173fd9b3243e9a2d5703271e2aa646050ca996e.tar.gz
ifuse-d173fd9b3243e9a2d5703271e2aa646050ca996e.tar.bz2
Add title columns and use double quotes for each item in "--list-apps" output
This might actually be called listing apps in CSV format output now.
-rw-r--r--src/ifuse.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ifuse.c b/src/ifuse.c
index 842aec6..d2ec42d 100644
--- a/src/ifuse.c
+++ b/src/ifuse.c
@@ -758,6 +758,10 @@ static void list_available_apps(idevice_t dev)
goto leave_cleanup;
}
+ /* output colum titles */
+ printf("\"%s\",\"%s\",\"%s\"\n", "CFBundleIdentifier", "CFBundleVersion", "CFBundleDisplayName");
+
+ /* output rows with app information */
uint32_t i = 0;
for (i = 0; i < plist_array_get_size(apps); i++) {
plist_t node = plist_array_get_item(apps, i);
@@ -783,7 +787,7 @@ static void list_available_apps(idevice_t dev)
if (val) {
plist_get_string_val(val, &name);
}
- printf("%s, \"%s\", \"%s\"\n", bid, ver, name);
+ printf("\"%s\",\"%s\",\"%s\"\n", bid, ver, name);
free(bid);
free(ver);
free(name);