aboutsummaryrefslogtreecommitdiff
path: root/toys/other
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-07-30 19:22:55 -0500
committerRob Landley <rob@landley.net>2014-07-30 19:22:55 -0500
commit3c69835d6e0b4f8e72e441ae5e34439612790844 (patch)
tree40e72b86d19d159791f1f658aa94274fc12e3ec0 /toys/other
parentfd14a61e941828c580bd476bb51f371f3d1ddf09 (diff)
downloadtoybox-3c69835d6e0b4f8e72e441ae5e34439612790844.tar.gz
As long as I had to write xabspath(), no point in wrapping realpath().
Diffstat (limited to 'toys/other')
-rw-r--r--toys/other/losetup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/toys/other/losetup.c b/toys/other/losetup.c
index aad722e4..e96a125d 100644
--- a/toys/other/losetup.c
+++ b/toys/other/losetup.c
@@ -106,8 +106,9 @@ static void loopback_setup(char *device, char *file)
}
// Associate file with this device?
} else if (file) {
- char *s = xrealpath(file);
+ char *s = xabspath(file, 1);
+ if (!s) perror_exit("file"); // already opened, but if deleted since...
if (ioctl(lfd, LOOP_SET_FD, ffd)) perror_exit("%s=%s", device, file);
loop->lo_offset = TT.offset;
loop->lo_sizelimit = TT.size;