GMappedFile: return an error when trying to map a device
authorMatthias Clasen <mclasen@redhat.com>
Sat, 17 Sep 2011 23:58:28 +0000 (19:58 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 18 Sep 2011 00:03:00 +0000 (20:03 -0400)
commitf18eab2ac75ee457a4ff76a30bc4b727887be8da
treee5f65291f9aa21a0a999c8af00a886eecb4b91bb
parentb83e0a39fbab49430767484a3af1a35dd21404e0
GMappedFile: return an error when trying to map a device

Previously, we were returning an empty buffer for all filenames
where fstat() gives a size of 0. But this is only appropriate
for regular files.

Also improve the documentation around this issue. Based on a
patch by Ryan Lortie.

Conflicts:

glib/tests/mappedfile.c

https://bugzilla.gnome.org/show_bug.cgi?id=659212
docs/reference/glib/tmpl/fileutils.sgml
glib/gmappedfile.c
glib/tests/mappedfile.c