OSDN Git Service

Add and use xmmap.
authorElliott Hughes <enh@google.com>
Wed, 24 May 2017 00:35:49 +0000 (17:35 -0700)
committerRob Landley <rob@landley.net>
Thu, 25 May 2017 00:56:58 +0000 (19:56 -0500)
commit12f0744f340746b3a1c1accfdf993d6548f33e56
tree7fa4ac6625bcaff12c300f4ef54d53649cfe7628
parent5a159cceb35fe08e444bd5a1771f8059888b03ff
Add and use xmmap.

Everyone forgets that mmap returns MAP_FAILED rather than NULL on failure.
Every use of mmap in toybox was either doing the wrong check, or no check
at all (including the two I personally added).
lib/lib.h
lib/xwrap.c
toys/android/load_policy.c
toys/other/hexedit.c
toys/other/modinfo.c
toys/pending/mdev.c
toys/posix/file.c