rpms/avrdude/F-8 avrdude-5.5.usbtiny.64bit.patch, NONE, 1.1 avrdude.spec, 1.4, 1.5

Trond Danielsen (trondd) fedora-extras-commits at redhat.com
Tue Jan 15 20:47:48 UTC 2008


Author: trondd

Update of /cvs/extras/rpms/avrdude/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1509

Modified Files:
	avrdude.spec 
Added Files:
	avrdude-5.5.usbtiny.64bit.patch 
Log Message:
* Fri Jan 11 2008 Trond Danielsen <trond.danielsen at gmail.com> - 5.5-2
- Added patch for 64-bit systems.
- Corrected the URL to the avrude homepage.


avrdude-5.5.usbtiny.64bit.patch:

--- NEW FILE avrdude-5.5.usbtiny.64bit.patch ---
--- avrdude-5.5/usbtiny.c	2007-10-29 09:40:04.000000000 -0600
+++ avrdude-5.5.patched/usbtiny.c	2008-01-06 07:13:41.000000000 -0700
@@ -138,7 +138,7 @@
     fprintf( stderr, "Operation %d not defined for this chip!\n", op );
     return -1;
   }
-  memset(cmd, 0, sizeof(cmd));
+  memset(cmd, 0, 4);
   avr_set_bits(p->op[op], cmd);
 
   return pgm->cmd(pgm, cmd, res);
@@ -286,19 +286,19 @@
   int nbytes;
 
   // Make sure its empty so we don't read previous calls if it fails
-  memset(res, '\0', sizeof(res) );
+  memset(res, '\0', 4 );
 
   nbytes = usb_in( USBTINY_SPI,
 		   (cmd[1] << 8) | cmd[0],  // convert to 16-bit words
 		   (cmd[3] << 8) | cmd[2],  //  "
-			res, sizeof(res), 8 * sck_period );
+			res, 4, 8 * sck_period );
   if (verbose > 1) {
     // print out the data we sent and received
-    printf( "CMD: [%02x %02x %02x %02x] [%02x %02x %02x %02x]\n",
+    printf( "CMD: [%02x %02x %02x %02x] [%02x %02x %02x %02x] \n",
 	    cmd[0], cmd[1], cmd[2], cmd[3],
 	    res[0], res[1], res[2], res[3] );
   }
-  return ((nbytes == sizeof(res)) &&      // should have read 4 bytes
+  return ((nbytes == 4) &&      // should have read 4 bytes
 	  res[2] == cmd[1]);              // AVR's do a delayed-echo thing
 }
 


Index: avrdude.spec
===================================================================
RCS file: /cvs/extras/rpms/avrdude/F-8/avrdude.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- avrdude.spec	29 Dec 2007 23:20:51 -0000	1.4
+++ avrdude.spec	15 Jan 2008 20:47:14 -0000	1.5
@@ -1,12 +1,13 @@
 Name:           avrdude
 Version:        5.5
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Software for programming Atmel AVR Microcontroller
 
 Group:          Applications/Engineering
 License:        GPLv2+
-URL:            http://www.bsdhome.com/avrdude/
+URL:            http://www.nongnu.org/avrdude
 Source0:        http://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.gz
+Patch0: 	avrdude-5.5.usbtiny.64bit.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  flex
@@ -32,6 +33,7 @@
 
 %prep
 %setup -q
+%patch0 -p1
 chmod -x safemode.c doc/TODO
 sed -i 's|/usr/local/etc/avrdude.conf|/etc/avrdude/avrdude.conf|g' doc/avrdude.texi avrdude.1
 sed -i 's|/etc/avrdude.conf|/etc/avrdude/avrdude.conf|g' doc/avrdude.texi avrdude.1
@@ -79,6 +81,10 @@
 
 
 %changelog
+* Fri Jan 11 2008 Trond Danielsen <trond.danielsen at gmail.com> - 5.5-2
+- Added patch for 64-bit systems.
+- Corrected the URL to the avrude homepage.
+
 * Sat Dec 29 2007 Trond Danielsen <trond.danielsen at gmail.com> - 5.5-1
 - New upstream version
 - Fixed minor rpmlint warning.




More information about the fedora-extras-commits mailing list