hal/drive_id ata.c,1.1,1.2 drive_id.c,1.1,1.2 scsi.c,1.1,1.2

David Zeuthen david at freedesktop.org
Mon Jul 25 21:40:44 PDT 2005


Update of /cvs/hal/hal/drive_id
In directory gabe:/tmp/cvs-serv14737/drive_id

Modified Files:
	ata.c drive_id.c scsi.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: ata.c
===================================================================
RCS file: /cvs/hal/hal/drive_id/ata.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ata.c	7 Feb 2005 21:24:16 -0000	1.1
+++ ata.c	26 Jul 2005 04:40:42 -0000	1.2
@@ -59,9 +59,9 @@
 	if (ioctl(id->fd, HDIO_GET_IDENTITY, &ata_id) != 0)
 		return -1;
 
-	set_str(id->model, ata_id.model, 40);
-	set_str(id->serial, ata_id.serial_no, 20);
-	set_str(id->firmware, ata_id.fw_rev, 8);
+	set_str((char *) id->model, ata_id.model, 40);
+	set_str((char *) id->serial, ata_id.serial_no, 20);
+	set_str((char *) id->firmware, ata_id.fw_rev, 8);
 
 	return 0;
 }

Index: drive_id.c
===================================================================
RCS file: /cvs/hal/hal/drive_id/drive_id.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- drive_id.c	7 Feb 2005 21:24:16 -0000	1.1
+++ drive_id.c	26 Jul 2005 04:40:42 -0000	1.2
@@ -113,18 +113,18 @@
 	struct drive_id *id;
 	__u8 tmp_node[DRIVE_ID_PATH_MAX];
 
-	snprintf(tmp_node, DRIVE_ID_PATH_MAX,
+	snprintf((char *) tmp_node, DRIVE_ID_PATH_MAX,
 		 "/dev/.drive_id-%u-%u-%u", getpid(), major(devt), minor(devt));
 	tmp_node[DRIVE_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 = drive_id_open_node(tmp_node);
+	id = drive_id_open_node((char *) tmp_node);
 
-	unlink(tmp_node);
+	unlink((char *) tmp_node);
 
 	return id;
 }

Index: scsi.c
===================================================================
RCS file: /cvs/hal/hal/drive_id/scsi.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- scsi.c	7 Feb 2005 21:24:16 -0000	1.1
+++ scsi.c	26 Jul 2005 04:40:42 -0000	1.2
@@ -121,9 +121,9 @@
 		return -1;
 	}
 
-	set_str(id->vendor, &buf[8], 8);
-	set_str(id->model, &buf[16], 16);
-	set_str(id->revision, &buf[32], 12);
+	set_str((char *) id->vendor, &buf[8], 8);
+	set_str((char *) id->model, &buf[16], 16);
+	set_str((char *) id->revision, &buf[32], 12);
 
 	/* get serial number from page 0x80 */
 	memset(buf, 0, BUFFER_SIZE);
@@ -136,7 +136,7 @@
 	dbg("page 0x80 serial number length %i", len);
 	if (len > DRIVE_ID_SERIAL_SIZE)
 		len = DRIVE_ID_SERIAL_SIZE;
-	set_str(id->serial, &buf[4], len);
+	set_str((char *) id->serial, &buf[4], len);
 
 	return 0;
 }




More information about the hal-commit mailing list