diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2011-07-11 00:40:33 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2011-07-11 00:40:33 (GMT) |
commit | 1f1693722646de5ac8d2299a22121a760941f75e (patch) | |
tree | 44b86a5fa26439b35b5416ff47f8612f3733c5fd /src/analysis | |
parent | cb8d8fb7a69dfd7ef03585d921ddccfc452f39de (diff) |
Saved improvements of binaries support.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@208 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis')
-rw-r--r-- | src/analysis/binary.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/analysis/binary.c b/src/analysis/binary.c index f13a887..15be43e 100644 --- a/src/analysis/binary.c +++ b/src/analysis/binary.c @@ -445,6 +445,7 @@ GOpenidaBinary *g_openida_binary_new_from_file(const char *filename) GOpenidaBinary *g_openida_binary_new_from_xml(xmlXPathContextPtr context, const char *path) { GOpenidaBinary *result; /* Adresse à retourner */ + char *type; /* Tupe de binaire à charger */ size_t access_len; /* Taille d'un chemin interne */ char *access; /* Chemin pour une sous-config.*/ char *filename; /* Chemin du binaire à charger */ @@ -456,6 +457,14 @@ GOpenidaBinary *g_openida_binary_new_from_xml(xmlXPathContextPtr context, const result = NULL; + /* Type */ + + type = get_node_prop_value(context, path, "type"); + + printf("###type### %s\n", type); + + free(type); + /* Chemin du fichier à retrouver */ access = strdup(path); @@ -627,6 +636,10 @@ bool g_openida_binary_save(const GOpenidaBinary *binary, xmlDocPtr xdoc, xmlXPat result = true; + /* Type */ + + result &= add_string_attribute_to_node(xdoc, context, path, "type", "file"); + /* Nom du fichier associé */ access = strdup(path); |