Removed unused control fifo in devmand.
This commit is contained in:
		
							parent
							
								
									a55f435a36
								
							
						
					
					
						commit
						b15f6fdf41
					
				| @ -11,7 +11,6 @@ | |||||||
| #include "usb_driver.h" | #include "usb_driver.h" | ||||||
| #include "proto.h" | #include "proto.h" | ||||||
| 
 | 
 | ||||||
| #define CONTROL_FIFO_PATH "/var/tmp/devmand_control" |  | ||||||
| #define SERVICE_BINARY "/bin/service" | #define SERVICE_BINARY "/bin/service" | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -383,7 +382,6 @@ static void parse_config() | |||||||
|  *           cleanup                                                        * |  *           cleanup                                                        * | ||||||
|  *===========================================================================*/ |  *===========================================================================*/ | ||||||
| static void cleanup() { | static void cleanup() { | ||||||
| 	int res; |  | ||||||
| 	struct devmand_driver_instance *inst; | 	struct devmand_driver_instance *inst; | ||||||
| 	/* destroy fifo */ | 	/* destroy fifo */ | ||||||
| 	dbg("cleaning up... "); | 	dbg("cleaning up... "); | ||||||
| @ -393,10 +391,6 @@ static void cleanup() { | |||||||
| 		run_downscript (inst); | 		run_downscript (inst); | ||||||
| 		stop_driver(inst); | 		stop_driver(inst); | ||||||
| 	} | 	} | ||||||
| 	res = remove(CONTROL_FIFO_PATH); |  | ||||||
| 	if (res != 0) { |  | ||||||
| 		fprintf(stderr, "WARNING: could not remove control fifo"); |  | ||||||
| 	} |  | ||||||
| 	unlink("/var/run/devmand.pid"); | 	unlink("/var/run/devmand.pid"); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -430,7 +424,7 @@ void create_pid_file() | |||||||
|  *===========================================================================*/ |  *===========================================================================*/ | ||||||
| int main(int argc, char *argv[]) | int main(int argc, char *argv[]) | ||||||
| { | { | ||||||
| 	int opt, optindex, res; | 	int opt, optindex; | ||||||
| 	struct devmand_usb_driver *driver; | 	struct devmand_usb_driver *driver; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -488,14 +482,6 @@ int main(int argc, char *argv[]) | |||||||
| 
 | 
 | ||||||
| 	create_pid_file(); | 	create_pid_file(); | ||||||
| 
 | 
 | ||||||
| 	/* create control socket if not exists */ |  | ||||||
| 	res = mkfifo(CONTROL_FIFO_PATH, S_IWRITE); |  | ||||||
| 
 |  | ||||||
| 	if ( !((res == 0) || (res == EEXIST)) ) { |  | ||||||
| 		fprintf(stderr, "Could not create control FIFO (%d)\n", res); |  | ||||||
| 		exit(1); |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	parse_config(); | 	parse_config(); | ||||||
| 	LIST_FOREACH(driver, &drivers, list) { | 	LIST_FOREACH(driver, &drivers, list) { | ||||||
| 		run_cleanscript(driver); | 		run_cleanscript(driver); | ||||||
| @ -907,7 +893,6 @@ static void main_loop() | |||||||
| 		fclose(fd); | 		fclose(fd); | ||||||
| 
 | 
 | ||||||
| 		if (res == NULL) { | 		if (res == NULL) { | ||||||
| 			/* TODO: wait for control events */ |  | ||||||
| 			usleep(50000); | 			usleep(50000); | ||||||
| 			continue; | 			continue; | ||||||
| 		} | 		} | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Kees Jongenburger
						Kees Jongenburger