aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-01-30 17:30:22 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-01-30 17:30:22 +0000
commitceb070a100864f72fb680abd83143eb7fff5cafb (patch)
tree18dfc68ae459b003fc81ad570de58da63d66d993 /libbb
parent840f2f9e34480f04a53dca599b7ae2d818e62476 (diff)
downloadbusybox-w32-ceb070a100864f72fb680abd83143eb7fff5cafb.tar.gz
busybox-w32-ceb070a100864f72fb680abd83143eb7fff5cafb.tar.bz2
busybox-w32-ceb070a100864f72fb680abd83143eb7fff5cafb.zip
with 2.4 kernel headers, lo_file_name is char, but with 2.6
headers we get a u8 for lo_file_name, so always cast to (char *) when treating it as such. git-svn-id: svn://busybox.net/trunk/busybox@13720 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-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: