Skip to contentSkip to conversation

text-based mount command: Fixed typo in po_rightmost

PATCH New Steve Dickson 1 participant 1 message Jan 31, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 text-based mount command: Fixed typo in po_rightmost

Fixed typo in po_rightmost() that was cause options like nolock, bg, udp, tcp, proto, v2, v3, vers, nfsvers to either be ignored or interrupted

utils/mount/parse_opt.c +1 -1
index 4934508..280f3e5 100644
@@ -448,7 +448,7 @@ unsigned int po_rightmost(struct mount_options *options, const char *keys[])
 		for (option = options->tail; option; option = option->prev) {
 			for (i = 0; keys[i] != NULL; i++)
 				if (strcmp(option->keyword, keys[i]) == 0)
-					return i;
+					return i+1;
 		}
 	}