aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbb/loop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libbb/loop.c b/libbb/loop.c
index 09b2beaa7..81dfca4d1 100644
--- a/libbb/loop.c
+++ b/libbb/loop.c
@@ -60,7 +60,7 @@ char *query_loop(const char *device)
60 if ((fd = open(device, O_RDONLY)) < 0) return 0; 60 if ((fd = open(device, O_RDONLY)) < 0) return 0;
61 if (!ioctl(fd, BB_LOOP_GET_STATUS, &loopinfo)) 61 if (!ioctl(fd, BB_LOOP_GET_STATUS, &loopinfo))
62 dev=bb_xasprintf("%ld %s", (long) loopinfo.lo_offset, 62 dev=bb_xasprintf("%ld %s", (long) loopinfo.lo_offset,
63 loopinfo.lo_file_name); 63 (char *)loopinfo.lo_file_name);
64 close(fd); 64 close(fd);
65 65
66 return dev; 66 return dev;
@@ -114,7 +114,7 @@ int set_loop(char **device, const char *file, int offset)
114 /* If device free, claim it. */ 114 /* If device free, claim it. */
115 if(rc && errno==ENXIO) { 115 if(rc && errno==ENXIO) {
116 memset(&loopinfo, 0, sizeof(loopinfo)); 116 memset(&loopinfo, 0, sizeof(loopinfo));
117 safe_strncpy(loopinfo.lo_file_name, file, LO_NAME_SIZE); 117 safe_strncpy((char *)loopinfo.lo_file_name, file, LO_NAME_SIZE);
118 loopinfo.lo_offset = offset; 118 loopinfo.lo_offset = offset;
119 /* Associate free loop device with file. */ 119 /* Associate free loop device with file. */
120 if(!ioctl(dfd, LOOP_SET_FD, ffd) && 120 if(!ioctl(dfd, LOOP_SET_FD, ffd) &&
@@ -125,7 +125,7 @@ int set_loop(char **device, const char *file, int offset)
125 file isn't pretty either. In general, mounting the same file twice 125 file isn't pretty either. In general, mounting the same file twice
126 without using losetup manually is problematic.) 126 without using losetup manually is problematic.)
127 */ 127 */
128 } else if(strcmp(file,loopinfo.lo_file_name) 128 } else if(strcmp(file,(char *)loopinfo.lo_file_name)
129 || offset!=loopinfo.lo_offset) rc=-1; 129 || offset!=loopinfo.lo_offset) rc=-1;
130 close(dfd); 130 close(dfd);
131try_again: 131try_again: