diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2012-12-17 12:28:19 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-01-09 13:56:07 +0100 |
commit | 377666075f7eb5ee07e0c76ed18ce417f7491150 (patch) | |
tree | 159f5852bcb06c99dcf2bd859d7eb945b8359300 /libmsi | |
parent | 6106dcb112c0ff995744281c5a343a7918491884 (diff) | |
download | msitools-377666075f7eb5ee07e0c76ed18ce417f7491150.tar.gz msitools-377666075f7eb5ee07e0c76ed18ce417f7491150.tar.xz msitools-377666075f7eb5ee07e0c76ed18ce417f7491150.zip |
database: make export() GObject-like
Diffstat (limited to 'libmsi')
-rw-r--r-- | libmsi/libmsi-database.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/libmsi/libmsi-database.c b/libmsi/libmsi-database.c index de1456a..33e0702 100644 --- a/libmsi/libmsi-database.c +++ b/libmsi/libmsi-database.c @@ -1333,8 +1333,11 @@ done: * * row4 : data <tab> data <tab> data <tab> ... data <cr> <lf> */ -LibmsiResult libmsi_database_export( LibmsiDatabase *db, const char *szTable, - int fd ) +gboolean +libmsi_database_export (LibmsiDatabase *db, + const char *table, + int fd, + GError **error) { unsigned r = LIBMSI_RESULT_OUTOFMEMORY; @@ -1344,9 +1347,13 @@ LibmsiResult libmsi_database_export( LibmsiDatabase *db, const char *szTable, return LIBMSI_RESULT_INVALID_HANDLE; g_object_ref(db); - r = _libmsi_database_export( db, szTable, fd ); + r = _libmsi_database_export(db, table, fd); g_object_unref(db); - return r; + + if (r != LIBMSI_RESULT_SUCCESS) + g_set_error (error, LIBMSI_RESULT_ERROR, r, G_STRFUNC); + + return r == LIBMSI_RESULT_SUCCESS; } typedef struct _tagMERGETABLE |