File: portato.c.diff

package info (click to toggle)
mailleds 0.93-9
  • links: PTS
  • area: main
  • in suites: woody
  • size: 156 kB
  • ctags: 108
  • sloc: ansic: 816; makefile: 107; sh: 17
file content (36 lines) | stat: -rw-r--r-- 973 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
*** portato.c.BACKUP	Fri Feb 16 14:36:59 1996
--- portato.c	Fri Feb 16 15:06:41 1996
***************
*** 98,101 ****
--- 98,102 ----
  unsigned char *devbuf = NULL;
  unsigned char *statbuf = NULL;
+ unsigned char led_perm = 0;
  int dev_size = 0;
  int stat_size = 0;
***************
*** 394,397 ****
--- 395,399 ----
  	   break;
        }
+       led_perm |= bm;
        if ( !strcmp(arg2, "cpu") || !strcmp(arg2, "disk") ||
  	!strcmp(arg2, "intr") || !strcmp(arg2, "swap") )
***************
*** 634,637 ****
--- 636,640 ----
     int stat_fd = 0;
     register unsigned char port_value = 0x00;
+    register unsigned char old_port_value = 0x00;
     register int i;
     int old_file_size;
***************
*** 698,701 ****
--- 701,707 ----
  
  #ifndef TESTCOMPILE
+       old_port_value = port_in(port_address);
+       /* Don't step on other program's toes. */
+       port_value |= (old_port_value & ~led_perm);
        port_out(port_address, port_value);
  #endif