diff options
| author | aalok <none@none> | 2008-06-03 14:12:55 -0700 |
|---|---|---|
| committer | aalok <none@none> | 2008-06-03 14:12:55 -0700 |
| commit | a423e759b1b3e58affccafde9c320c61d7566a21 (patch) | |
| tree | a1b813a115342d268cae1767c1df431ea25f0ab3 /usr/src/cmd/lofiadm | |
| parent | 18061c656cfeed11077d5725b11f34c879cd7f6c (diff) | |
| download | illumos-joyent-a423e759b1b3e58affccafde9c320c61d7566a21.tar.gz | |
6694129 lofiadm -U always works
6694813 lofiadm -fd on a compressed file can leak memory
Diffstat (limited to 'usr/src/cmd/lofiadm')
| -rw-r--r-- | usr/src/cmd/lofiadm/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr/src/cmd/lofiadm/main.c b/usr/src/cmd/lofiadm/main.c index 22fd0d6bea..7a1f567407 100644 --- a/usr/src/cmd/lofiadm/main.c +++ b/usr/src/cmd/lofiadm/main.c @@ -404,9 +404,9 @@ lofi_uncompress(int lfd, const char *filename) /* If the file isn't compressed, we just return */ if ((ioctl(lfd, LOFI_CHECK_COMPRESSED, &li) == -1) || - (li.li_algorithm == '\0')) { + (li.li_algorithm[0] == '\0')) { delete_mapping(lfd, devicename, filename, B_TRUE); - return; + die("%s is not compressed\n", filename); } if ((compfd = open64(devicename, O_RDONLY | O_NONBLOCK)) == -1) { @@ -426,7 +426,7 @@ lofi_uncompress(int lfd, const char *filename) delete_mapping(lfd, devicename, filename, B_TRUE); free(dir); free(file); - return; + die("%s could not be uncompressed\n", filename); } /* @@ -441,7 +441,7 @@ lofi_uncompress(int lfd, const char *filename) delete_mapping(lfd, devicename, filename, B_TRUE); free(dir); free(file); - return; + die("%s could not be uncompressed\n", filename); } /* Now read from the device in MAXBSIZE-sized chunks */ |
