summaryrefslogtreecommitdiff
path: root/lib/device/dev-swap.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/device/dev-swap.c')
-rw-r--r--lib/device/dev-swap.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/device/dev-swap.c b/lib/device/dev-swap.c
index b8ebcca..346b60a 100644
--- a/lib/device/dev-swap.c
+++ b/lib/device/dev-swap.c
@@ -14,8 +14,6 @@
#include "lib.h"
#include "metadata.h"
-#include "xlate.h"
-#include "filter.h"
#ifdef linux
@@ -42,14 +40,15 @@ int dev_is_swap(struct device *dev, uint64_t *signature)
{
char buf[10];
uint64_t size;
- int page, ret = 0;
+ unsigned page;
+ int ret = 0;
if (!dev_get_size(dev, &size)) {
stack;
return -1;
}
- if (!dev_open(dev)) {
+ if (!dev_open_readonly(dev)) {
stack;
return -1;
}