Skip to contentSkip to conversation

mount.nfs: Don't silently ignore invalid protocol versions.

PATCH New Steve Dickson 1 participant 1 message Jan 7, 2014

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

PATCH 1/1 mount.nfs: Don't silently ignore invalid protocol versions.

---
 utils/mount/network.c | 4 ++++
 1 file changed, 4 insertions(+)
utils/mount/network.c +4 -0
index 2853d00..2fdd2c0 100644
@@ -1245,6 +1245,8 @@ nfs_nfs_version(struct mount_options *options, unsigned long *version)
 				*version = tmp;
 				return 1;
 			}
+			nfs_error(_("%s: parsing error on 'vers=' option\n"),
+					progname);
 			return 0;
 		case PO_NOT_FOUND:
 			nfs_error(_("%s: parsing error on 'vers=' option\n"),
@@ -1262,6 +1264,8 @@ nfs_nfs_version(struct mount_options *options, unsigned long *version)
 				*version = tmp;
 				return 1;
 			}
+			nfs_error(_("%s: parsing error on 'nfsvers=' option\n"),
+					progname);
 			return 0;
 		case PO_NOT_FOUND:
 			nfs_error(_("%s: parsing error on 'nfsvers=' option\n"),
Signature · 1 line
1.8.3.1