diff options
author | Colin Walters <walters@verbum.org> | 2016-05-31 11:53:27 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2016-06-01 15:02:41 +0000 |
commit | c148631a98407647bb989bb73d2b707e309344f9 (patch) | |
tree | b0e28f8093224a06e69c92204e137ae879337a0f /src/ostree/ot-builtin-show.c | |
parent | f725d39f111bd0d362a583c3a4902e3194fd74d8 (diff) | |
download | ostree-c148631a98407647bb989bb73d2b707e309344f9.tar.gz |
lib: Drop GFile variant mapping API for fd-relative
In addition to generic fd relative porting,
this is a necessary preparatory step for libglnx porting, because
when I tried to use `g_mapped_file_new` I hit an issue with
it using a different error domain from GIO.
Thankfully libglnx consistently uses the GIO error domain, and here
we're now using it for the `open()` call.
Closes: #317
Approved by: jlebon
Diffstat (limited to 'src/ostree/ot-builtin-show.c')
-rw-r--r-- | src/ostree/ot-builtin-show.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/ostree/ot-builtin-show.c b/src/ostree/ot-builtin-show.c index a1b4db5f..ef541c2a 100644 --- a/src/ostree/ot-builtin-show.c +++ b/src/ostree/ot-builtin-show.c @@ -51,12 +51,9 @@ do_print_variant_generic (const GVariantType *type, GError **error) { gboolean ret = FALSE; - g_autoptr(GFile) f = NULL; g_autoptr(GVariant) variant = NULL; - f = g_file_new_for_path (filename); - - if (!ot_util_variant_map (f, type, TRUE, &variant, error)) + if (!ot_util_variant_map_at (AT_FDCWD, filename, type, TRUE, &variant, error)) goto out; ot_dump_variant (variant); |