OSDN Git Service

libpagemap: make pm_kernel_* APIs consistently return negative errors.
authorSandeep Patil <sspatil@google.com>
Wed, 15 Aug 2018 21:22:55 +0000 (14:22 -0700)
committerSandeep Patil <sspatil@google.com>
Thu, 16 Aug 2018 16:51:51 +0000 (09:51 -0700)
commitd796224ad2387c542f36983e609fffa7d78aaa92
tree2b3bd9b6bb599fe603f2e045f70162ae4f66ee3c
parent9d3d54a4642c0b7047fda7555d1eec164b0fd052
libpagemap: make pm_kernel_* APIs consistently return negative errors.

pm_kernel_* APIs return errnos as error values, which works because
almost all callers check if the return value is 'true' or 'false'.
Most other APIs in libpagemap return negative errors however.

Fix pm_kernel_* APIs to be consistent with other library functions.

Bug: 111694435
Test: procrank; procmem 1; librank

Change-Id: Ia5cbf6a5676bc797f7cf0843f8b90228bfc3eaec
Signed-off-by: Sandeep Patil <sspatil@google.com>
libpagemap/pm_kernel.c