hal/volume_id fat.c, 1.5, 1.6 iso9660.c, 1.4, 1.5 isw_raid.c, 1.2,
1.3 lvm.c, 1.4, 1.5 romfs.c, 1.3, 1.4 volume_id.c, 1.8, 1.9
David Zeuthen
david at freedesktop.org
Mon Jul 25 21:40:45 PDT 2005
Update of /cvs/hal/hal/volume_id
In directory gabe:/tmp/cvs-serv14737/volume_id
Modified Files:
fat.c iso9660.c isw_raid.c lvm.c romfs.c volume_id.c
Log Message:
2005-07-26 David Zeuthen <davidz at redhat.com>
* drive_id/ata.c, drive_id/drive_id.c, drive_id/scsi.c,
hald/device.c, hald/device_store.c, hald/linux2/apm.c,
hald/linux2/osspec.c, hald/linux2/pcmcia_utils.c,
hald/linux2/probing/probe-storage.c, tools/hal-device.c,
volume_id/fat.c, volume_id/iso9660.c, volume_id/isw_raid.c,
volume_id/lvm.c, volume_id/romfs.c, volume_id/volume_id.c: This is
a patch (against CVS) to fix several compiler warnings with gcc
3.x and 4.x. Please review. Patch from Danny Kukawka
<danny.kukawka at web.de>.
Index: fat.c
===================================================================
RCS file: /cvs/hal/hal/volume_id/fat.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- fat.c 27 Jun 2005 14:52:03 -0000 1.5
+++ fat.c 26 Jul 2005 04:40:43 -0000 1.6
@@ -127,7 +127,7 @@
continue;
dbg("found ATTR_VOLUME_ID id in root dir");
- return dir[i].name;
+ return (char *) dir[i].name;
}
dbg("skip dir entry");
@@ -267,7 +267,7 @@
dir = (struct vfat_dir_entry*) buf;
- label = get_attr_volume_id(dir, root_dir_entries);
+ label = (__u8 *) get_attr_volume_id(dir, root_dir_entries);
vs = (struct vfat_super_block *) volume_id_get_buffer(id, off, 0x200);
if (vs == NULL)
@@ -312,7 +312,7 @@
count = buf_size / sizeof(struct vfat_dir_entry);
dbg("expected entries 0x%x", count);
- label = get_attr_volume_id(dir, count);
+ label = (__u8 *) get_attr_volume_id(dir, count);
if (label)
break;
Index: iso9660.c
===================================================================
RCS file: /cvs/hal/hal/volume_id/iso9660.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- iso9660.c 27 Jun 2005 14:52:03 -0000 1.4
+++ iso9660.c 26 Jul 2005 04:40:43 -0000 1.5
@@ -110,7 +110,7 @@
}
volume_id_set_label_raw(id, is->volume_id, 32);
- volume_id_set_label_string(id, svd_label, 32);
+ volume_id_set_label_string(id, (__u8 *) svd_label, 32);
strcpy(id->type_version, "Joliet Extension");
goto found;
}
Index: isw_raid.c
===================================================================
RCS file: /cvs/hal/hal/volume_id/isw_raid.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- isw_raid.c 27 Jun 2005 14:52:03 -0000 1.2
+++ isw_raid.c 26 Jul 2005 04:40:43 -0000 1.3
@@ -71,7 +71,7 @@
return -1;
volume_id_set_usage(id, VOLUME_ID_RAID);
- strncpy(id->type_version, &isw->sig[sizeof(ISW_SIGNATURE)-1], 6);
+ strncpy(id->type_version, (char *) &isw->sig[sizeof(ISW_SIGNATURE)-1], 6);
id->type = "isw_raid_member";
return 0;
Index: lvm.c
===================================================================
RCS file: /cvs/hal/hal/volume_id/lvm.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- lvm.c 27 Jun 2005 14:52:03 -0000 1.4
+++ lvm.c 26 Jul 2005 04:40:43 -0000 1.5
@@ -101,7 +101,7 @@
return -1;
found:
- strncpy(id->type_version, lvm->type, 8);
+ strncpy(id->type_version, (char *) lvm->type, 8);
volume_id_set_usage(id, VOLUME_ID_RAID);
id->type = "LVM2_member";
Index: romfs.c
===================================================================
RCS file: /cvs/hal/hal/volume_id/romfs.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- romfs.c 27 Jun 2005 14:52:03 -0000 1.3
+++ romfs.c 26 Jul 2005 04:40:43 -0000 1.4
@@ -56,7 +56,7 @@
return -1;
if (memcmp(rfs->magic, "-rom1fs-", 4) == 0) {
- size_t len = strlen(rfs->name);
+ size_t len = strlen((char *) rfs->name);
if (len) {
volume_id_set_label_raw(id, rfs->name, len);
Index: volume_id.c
===================================================================
RCS file: /cvs/hal/hal/volume_id/volume_id.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- volume_id.c 27 Jun 2005 14:52:03 -0000 1.8
+++ volume_id.c 26 Jul 2005 04:40:43 -0000 1.9
@@ -221,18 +221,18 @@
struct volume_id *id;
__u8 tmp_node[VOLUME_ID_PATH_MAX];
- snprintf(tmp_node, VOLUME_ID_PATH_MAX,
+ snprintf((char *) tmp_node, VOLUME_ID_PATH_MAX,
"/dev/.volume_id-%u-%u-%u", getpid(), major(devt), minor(devt));
tmp_node[VOLUME_ID_PATH_MAX] = '\0';
/* create tempory node to open the block device */
- unlink(tmp_node);
- if (mknod(tmp_node, (S_IFBLK | 0600), devt) != 0)
+ unlink((char *) tmp_node);
+ if (mknod((char *) tmp_node, (S_IFBLK | 0600), devt) != 0)
return NULL;
- id = volume_id_open_node(tmp_node);
+ id = volume_id_open_node((char *) tmp_node);
- unlink(tmp_node);
+ unlink((char *) tmp_node);
return id;
}
More information about the hal-commit
mailing list