updates
This commit is contained in:
		| @@ -1,7 +1,7 @@ | |||||||
| # Unix | # Unix | ||||||
| AR=ar | AR=ar | ||||||
| AS=as | AS=as | ||||||
| CC=gcc | CC=gcc -Wall | ||||||
| RANLIB=ranlib | RANLIB=ranlib | ||||||
| CFLAGS=-I$(ROOT) -I$(ROOT)/include -I$(ROOT)/kern -c -ggdb -D_THREAD_SAFE -pthread # not ready for this yet: -Wall | CFLAGS=-I$(ROOT) -I$(ROOT)/include -I$(ROOT)/kern -c -ggdb -D_THREAD_SAFE -pthread # not ready for this yet: -Wall | ||||||
| O=o | O=o | ||||||
|   | |||||||
							
								
								
									
										10
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								README
									
									
									
									
									
								
							| @@ -23,9 +23,13 @@ See http://swtch.com/drawterm/ | |||||||
| TO DO: | TO DO: | ||||||
| ------ | ------ | ||||||
|  |  | ||||||
| - Drawterm seems to have ssl synchronization problems. |  | ||||||
| Specifically, fcp bigfile /mnt/term/tmp reliably wedges it. |  | ||||||
|  |  | ||||||
| - Should clean up the code so that gcc -Wall doesn't print | - Should clean up the code so that gcc -Wall doesn't print | ||||||
| any warnings. | any warnings. | ||||||
|  |  | ||||||
|  | - Should import latest /dev/draw to allow resize of window | ||||||
|  |  | ||||||
|  | - Should copy 9term code and make console window a real | ||||||
|  | 	9term window instead. | ||||||
|  |  | ||||||
|  | - Should implement /dev/label. | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										34
									
								
								cpu.c
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								cpu.c
									
									
									
									
									
								
							| @@ -82,6 +82,25 @@ usage(void) | |||||||
| } | } | ||||||
| int fdd; | int fdd; | ||||||
|  |  | ||||||
|  | int | ||||||
|  | mountfactotum(void) | ||||||
|  | { | ||||||
|  | 	int fd; | ||||||
|  | 	 | ||||||
|  | 	if((fd = dialfactotum()) < 0) | ||||||
|  | 		return; | ||||||
|  | 	if(sysmount(fd, -1, "/mnt/factotum", MREPL, "") < 0){ | ||||||
|  | 		fprint(2, "mount factotum: %r\n"); | ||||||
|  | 		return; | ||||||
|  | 	} | ||||||
|  | 	if((fd = open("/mnt/factotum/ctl", OREAD)) < 0){ | ||||||
|  | 		fprint(2, "open /mnt/factotum/ctl: %r\n"); | ||||||
|  | 		return; | ||||||
|  | 	} | ||||||
|  | 	close(fd); | ||||||
|  | 	return 0; | ||||||
|  | } | ||||||
|  |  | ||||||
| void | void | ||||||
| cpumain(int argc, char **argv) | cpumain(int argc, char **argv) | ||||||
| { | { | ||||||
| @@ -140,19 +159,10 @@ cpumain(int argc, char **argv) | |||||||
| 		usage(); | 		usage(); | ||||||
| 	}ARGEND; | 	}ARGEND; | ||||||
|  |  | ||||||
| 	if((fd = dialfactotum()) < 0) | 	if(mountfactotum() < 0){ | ||||||
| 		fprint(2, "dial factotum: %r\n"); |  | ||||||
| 	else if(sysmount(fd, -1, "/mnt/factotum", MREPL, "") < 0) |  | ||||||
| 		fprint(2, "mount factotum: %r\n"); |  | ||||||
| 	else if((fd = open("/mnt/factotum/ctl", OREAD)) < 0) |  | ||||||
| 		fprint(2, "open /mnt/factotum/ctl: %r\n"); |  | ||||||
| 	else |  | ||||||
| 		close(fd); |  | ||||||
|  |  | ||||||
| 		if(secstoreserver == nil) | 		if(secstoreserver == nil) | ||||||
| 			secstoreserver = authserver; | 			secstoreserver = authserver; | ||||||
|  | 	        if(havesecstore(secstoreserver, user)){ | ||||||
|         if(secstoreserver && havesecstore(secstoreserver, user)){ |  | ||||||
| 	                s = secstorefetch(secstoreserver, user, nil); | 	                s = secstorefetch(secstoreserver, user, nil); | ||||||
| 	                if(s){ | 	                if(s){ | ||||||
| 	                        if(strlen(s) >= sizeof secstorebuf) | 	                        if(strlen(s) >= sizeof secstorebuf) | ||||||
| @@ -160,7 +170,7 @@ cpumain(int argc, char **argv) | |||||||
| 	                        strcpy(secstorebuf, s); | 	                        strcpy(secstorebuf, s); | ||||||
| 	                } | 	                } | ||||||
| 	        } | 	        } | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	if(argc != 0) | 	if(argc != 0) | ||||||
| 		usage(); | 		usage(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user