home: hub: mkinitfs

Download patch

ref: 2aeed4fdf55d94f2fdb08107108a3e79fda1aee9
parent: 567d60c3af74d0ac4d9d2ed91d0f548963ce9693
author: Natanael Copa <ncopa@alpinelinux.org>
date: Thu Oct 8 15:06:21 CDT 2015

nlplug-findfs: fix exit code

retun success if anything of what we searched for was found.

--- a/nlplug-findfs.c
+++ b/nlplug-findfs.c
@@ -617,7 +617,7 @@
 	struct ueventconf conf;
 	int event_count = 0;
 	size_t total_bytes;
-	int ret = 1, found = 0;
+	int found = 0;
 	char *program_argv[2] = {0,0};
 	pthread_t tid;
 
@@ -722,10 +722,8 @@
 		found |= process_uevent(buf, len, &conf);
 
 		if ((found & FOUND_DEVICE)
-		    || ((found & FOUND_BOOTREPO) && (found & FOUND_APKOVL))) {
-			ret = 0;
+		    || ((found & FOUND_BOOTREPO) && (found & FOUND_APKOVL)))
 			break;
-		}
 
 		if (fds[0].revents & POLLHUP) {
 			dbg("parent hung up\n");
@@ -742,7 +740,7 @@
 		conf.fork_count,
 		event_count, total_bytes);
 
-	return ret;
+	return found ? 0 : 1;
 }