microcode_ctl/microcode_ctl.patch
2005-01-11 00:38:17 +00:00

49 lines
1.4 KiB
Diff

--- 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)
--- 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)
@@ -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",