return NULL;
}
-// Resolve all symlinks, returning malloc() memory.
-char *xrealpath(char *path)
-{
- char *new = realpath(path, NULL);
- if (!new) perror_exit("realpath '%s'", path);
- return new;
-}
-
void xchdir(char *path)
{
if (chdir(path)) error_exit("chdir '%s'", path);
}
// 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;