summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
94c3d7c)
mount.nfs should not only fail when an invalid option values
are supplied (as it does), it should also print a diagnostic
message identifying the problem
Signed-off-by: Steve Dickson <steved@redhat.com>
return 1;
}
case PO_BAD_VALUE:
return 1;
}
case PO_BAD_VALUE:
+ nfs_error(_("%s: invalid value for 'nfsprog=' option"),
+ progname);
}
return 0;
case PO_NOT_FOUND:
}
return 0;
case PO_NOT_FOUND:
- nfs_error(_("%s: option parsing error\n"),
+ nfs_error(_("%s: parsing error on 'vers=' option\n"),
+ nfs_error(_("%s: invalid value for 'vers=' option"),
+ progname);
return 0;
}
case 4: /* nfsvers */
return 0;
}
case 4: /* nfsvers */
}
return 0;
case PO_NOT_FOUND:
}
return 0;
case PO_NOT_FOUND:
- nfs_error(_("%s: option parsing error\n"),
+ nfs_error(_("%s: parsing error on 'nfsvers=' option\n"),
+ nfs_error(_("%s: invalid value for 'nfsvers=' option"),
+ progname);
return 1;
}
case PO_BAD_VALUE:
return 1;
}
case PO_BAD_VALUE:
+ nfs_error(_("%s: invalid value for 'port=' option"),
+ progname);
return 1;
}
case PO_BAD_VALUE:
return 1;
}
case PO_BAD_VALUE:
+ nfs_error(_("%s: invalid value for 'mountprog=' option"),
+ progname);
return 1;
}
case PO_BAD_VALUE:
return 1;
}
case PO_BAD_VALUE:
+ nfs_error(_("%s: invalid value for 'mountvers=' option"),
+ progname);
return 1;
}
case PO_BAD_VALUE:
return 1;
}
case PO_BAD_VALUE:
+ nfs_error(_("%s: invalid value for 'mountport=' option"),
+ progname);
struct pmap nfs_pmap, mnt_pmap;
sa_family_t family;
struct pmap nfs_pmap, mnt_pmap;
sa_family_t family;
- if (!nfs_options2pmap(options, &nfs_pmap, &mnt_pmap)) {
- nfs_error(_("%s: bad mount options"), progname);
+ if (!nfs_options2pmap(options, &nfs_pmap, &mnt_pmap))
/* Skip UMNT call for vers=4 mounts */
if (nfs_pmap.pm_vers == 4)
/* Skip UMNT call for vers=4 mounts */
if (nfs_pmap.pm_vers == 4)