microcode_ctl/microcode_ctl.patch

75 lines
2.4 KiB
Diff
Raw Normal View History

2005-01-10 23:48:30 +00:00
--- microcode_ctl-1.11/microcode_ctl.c~ Sat Apr 14 23:18:13 2001
+++ microcode_ctl-1.11/microcode_ctl.c Fri Dec 7 10:31:08 2001
@@ -36,8 +36,8 @@
#define BUFFER_SIZE 4096
#define MAX_MICROCODE 2000000
-#define MICROCODE_DEVICE_DEFAULT "/dev/cpu/microcode"
-#define MICROCODE_FILE_DEFAULT "/etc/microcode.dat"
+#define MICROCODE_DEVICE_DEFAULT "/dev/cpu/0/microcode"
+#define MICROCODE_FILE_DEFAULT "/etc/firmware/microcode.dat"
/* yuck */
#ifndef MICROCODE_IOCFREE
2005-01-10 23:48:30 +00:00
--- microcode_ctl-1.11/Makefile~ Mon Jun 11 16:57:42 2001
+++ microcode_ctl-1.11/Makefile Tue Jan 8 20:20:58 2002
@@ -20,7 +20,7 @@
PREFIX = /usr/local
INSDIR = $(PREFIX)/sbin
-MANDIR = $(PREFIX)/man/man8
+MANDIR = $(PREFIX)/share/man/man8
MICDIR = /etc
RCFILE = microcode_ctl.start
@@ -45,7 +45,7 @@
$(DESTDIR)$(RCLINKTO)
- $(INS) -s -m 755 $(PROGRAM) $(DESTDIR)$(INSDIR)
+ $(INS) -m 755 $(PROGRAM) $(DESTDIR)$(INSDIR)
- $(INS) -m 644 $(MICROCODE) $(DESTDIR)$(MICDIR)/microcode.dat
+ $(INS) -m 644 $(MICROCODE) $(DESTDIR)/etc/firmware/microcode.dat
$(INS) -m 644 $(MANPAGE) $(DESTDIR)$(MANDIR)
gzip -9f $(DESTDIR)$(MANDIR)/$(MANPAGE)
2005-01-10 23:48:30 +00:00
--- microcode_ctl-1.11/microcode_ctl.c~ 2004-10-28 20:37:08.000000000 -0400
+++ microcode_ctl-1.11/microcode_ctl.c 2004-10-28 20:37:35.000000000 -0400
@@ -168,7 +168,7 @@ int main(int argc, char *argv[])
if (upload) {
if((return_code = do_update(device, filename)))
- exit(return_code);
+ exit(0);
} else
usage();
2005-01-10 23:48:30 +00:00
--- microcode_ctl-1.11/microcode_ctl.c.org 2003-05-28 19:56:22.000000000 +0200
+++ microcode_ctl-1.11/microcode_ctl.c 2003-05-28 19:57:01.000000000 +0200
@@ -95,11 +95,13 @@
{
FILE *fd;
char line_buffer[BUFFER_SIZE];
- int microcode[MAX_MICROCODE];
+ int *microcode;
int *pos;
int outfd;
int wrote, length;
+ microcode=malloc(sizeof(int)* MAX_MICROCODE);
+ if (!microcode) return ENOMEM;
if( (fd=fopen(filename, "r")) == NULL){
if(print_error_messages)
2005-01-10 23:48:30 +00:00
--- microcode_ctl-1.11/microcode_ctl.c~ 2003-12-13 15:05:56.000000000 +0100
+++ microcode_ctl-1.11/microcode_ctl.c 2003-12-13 15:05:56.000000000 +0100
@@ -146,7 +146,7 @@
return errno;
}
- if( (wrote = write(outfd, &microcode, length)) < 0){
+ if( (wrote = write(outfd, microcode, length)) < 0){
if(print_error_messages)
fprintf(stderr, "%s: error writing to '%s' errno=%d (%s)\n"
"%s: there may be messages from the driver in your system log.\n",