* Logging is more helpful when you log which files an error occured on...
This commit is contained in:
		@@ -61,14 +61,14 @@ add_watch(int fd, const char * path)
 | 
				
			|||||||
	wd = inotify_add_watch(fd, path, IN_CREATE|IN_CLOSE_WRITE|IN_DELETE|IN_MOVE);
 | 
						wd = inotify_add_watch(fd, path, IN_CREATE|IN_CLOSE_WRITE|IN_DELETE|IN_MOVE);
 | 
				
			||||||
	if( wd < 0 )
 | 
						if( wd < 0 )
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		DPRINTF(E_ERROR, L_INOTIFY, "inotify_add_watch() [%s]\n", strerror(errno));
 | 
							DPRINTF(E_ERROR, L_INOTIFY, "inotify_add_watch(%s) [%s]\n", path, strerror(errno));
 | 
				
			||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	nw = malloc(sizeof(struct watch));
 | 
						nw = malloc(sizeof(struct watch));
 | 
				
			||||||
	if( nw == NULL )
 | 
						if( nw == NULL )
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		DPRINTF(E_ERROR, L_INOTIFY, "malloc()\n");
 | 
							DPRINTF(E_ERROR, L_INOTIFY, "malloc() error\n");
 | 
				
			||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	nw->wd = wd;
 | 
						nw->wd = wd;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user