From c5b1d4d6b14f22b5e2f7ae42eb01bf2746b8001c Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 13 Mar 2006 15:45:16 +0000 Subject: Patch from Denis Vlasenko to add xstat() and use it. --- util-linux/swaponoff.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'util-linux') diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index ce55a132a..473325d0c 100644 --- a/util-linux/swaponoff.c +++ b/util-linux/swaponoff.c @@ -23,8 +23,7 @@ static int swap_enable_disable(const char *device) int status; struct stat st; - if (stat(device, &st) < 0) - bb_perror_msg_and_die("cannot stat %s", device); + xstat(device, &st); /* test for holes */ if (S_ISREG(st.st_mode)) -- cgit v1.2.3