summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-01-22 12:47:35 +0100
committerGravatar Martin Szulecki2010-01-22 12:47:35 +0100
commite6b08f71f9ebf06541551f49a3ecda324918e440 (patch)
treeca672fefeb729100d68e1c5c11d09267a858f5d0 /tools
parentf725355489c4a203012ba74a58483945772e6578 (diff)
downloadlibimobiledevice-e6b08f71f9ebf06541551f49a3ecda324918e440.tar.gz
libimobiledevice-e6b08f71f9ebf06541551f49a3ecda324918e440.tar.bz2
Indent output of iphoneinfo in key/value mode
Diffstat (limited to 'tools')
-rw-r--r--tools/iphoneinfo.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/iphoneinfo.c b/tools/iphoneinfo.c
index 7c41033..acb62f7 100644
--- a/tools/iphoneinfo.c
+++ b/tools/iphoneinfo.c
@@ -55,6 +55,8 @@ static const char *domains[] = {
NULL
};
+static int indent_level = 0;
+
int is_domain_known(char *domain);
void print_usage(int argc, char **argv);
void plist_node_to_string(plist_t node);
@@ -265,7 +267,9 @@ void plist_node_to_string(plist_t node)
case PLIST_ARRAY:
case PLIST_DICT:
printf("\n");
+ indent_level++;
plist_children_to_string(node);
+ indent_level--;
break;
default:
break;
@@ -283,6 +287,7 @@ void plist_children_to_string(plist_t node)
plist_dict_next_item(node, it, &key, &subnode);
while (subnode)
{
+ printf("%*s", indent_level, "");
printf("%s: ", key);
free(key);
key = NULL;